79648127

Date: 2025-06-02 03:09:38
Score: 2.5
Natty:
Report link

Xcode writes out IDE workspace data constantly on a timer, on the main thread (WHY ON THE MAIN THREAD APPLE!?!), which is what causes this stuttering. Seeing it even on a M4 Pro (as revealed by using Instruments to sample Xcode).

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

79648123

Date: 2025-06-02 03:06:37
Score: 3
Natty:
Report link

Can you delete the yarn.lock file and run yarn install again?

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Can you
  • High reputation (-1):
Posted by: qichuan

79648122

Date: 2025-06-02 03:05:36
Score: 2
Natty:
Report link

Proxy the root / path instead of /myapp

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

79648118

Date: 2025-06-02 02:55:34
Score: 2
Natty:
Report link

Could someone perhaps also elaborate on the properties? There are zero comments in source, so it is difficult to know what the intended purpose is. Especially in comparison and/or contrast of ReturnedClass, which I take to mean the intended CLR type in question, DefaultValue.

DefaultValue, somewhat obvious albeit without comments, in my case looking at NodaTime.Duration.Zero, right. So if we're talking about NodaTime.Duration, then what is PrimitiveClass in that picture? Could be for instance string? Or System.TimeSpan? Or what else?

Thank you...

abstract System.Type PrimitiveClass { get; }
abstract object DefaultValue { get; }
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Michael W. Powell

79648111

Date: 2025-06-02 02:27:29
Score: 0.5
Natty:
Report link

I am also trying to get this working, either locally or on colab. I have not succeeded yet.

I do not have enough karma to comment, so I post an answer.

It looks like mmpose was developed with PyTorch 1.8. Colab has a different PyTorch version.

Also, mmpose was developed with Python 3.8.

Going to the PyTorch old versions page (https://pytorch.org/get-started/previous-versions/), I noticed there is a version 1.8.2 with LTS support. See below for relevant commands to install the correct versions of all python packages.

Here is the command that I used (Conda on Linux):
conda install python=3.8 pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia


(Snippet from: https://pytorch.org/get-started/previous-versions/)

v1.8.2 with LTS support

Conda

OSX

macOS is currently not supported for LTS.

Linux and Windows
# CUDA 10.2
# NOTE: PyTorch LTS version 1.8.2 is only supported for Python <= 3.8.
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-lts

# CUDA 11.1 (Linux)
# NOTE: 'nvidia' channel is required for cudatoolkit 11.1 <br> <b>NOTE:</b> Pytorch LTS version 1.8.2 is only supported for Python <= 3.8.
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia

# CUDA 11.1 (Windows)
# 'conda-forge' channel is required for cudatoolkit 11.1 <br> <b>NOTE:</b> Pytorch LTS version 1.8.2 is only supported for Python <= 3.8.
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c conda-forge

# CPU Only
# Pytorch LTS version 1.8.2 is only supported for Python <= 3.8.
conda install pytorch torchvision torchaudio cpuonly -c pytorch-lts

# ROCM5.x

Not supported in LTS.

Wheel

OSX

macOS is currently not supported in LTS.

Linux and Windows
# CUDA 10.2
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu102

# CUDA 11.1
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111

# CPU Only
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu

# ROCM5.x

Not supported in LTS.
Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: jonbenfri

79648109

Date: 2025-06-02 02:13:25
Score: 0.5
Natty:
Report link

Use \K before (\d+), like this:

(?<=fill:#00d5ff)[\s\S]*?\K(\d+)(?=<\/tspan>)

\K resets the starting point of the reported match. Any previously consumed characters are no longer included in the final match.

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

79648085

Date: 2025-06-02 01:26:13
Score: 1.5
Natty:
Report link

Ah yeah, Git’s being a bit too smart for what you’re trying to do.

Even though you removed the remote, your new repo still shares the exact same commit hash as the template — so when you fetch from it again (even with --shallow-since), Git recognizes that commit and says, “Hey! I know more about this history,” and pulls it in. That’s why your shallow history gets unshallowed.

Git identifies commits by their SHA-1, and since both repos share that SHA, Git treats them as part of the same history graph, no matter what remotes you have set.

So how to fix it?
To stop Git from linking the two histories, you basically need to make the commits look unrelated. Let me show you couple ways.

At first, create a new root (break history).

Use --orphan to create a new branch that doesn’t share any history.

Like this =>

git checkout --orphan new-main

git commit -m "Start fresh"

git cherry-pick main # or cherry-pick a few commits you care about

git branch -M new-main

Now your repo doesn’t share any SHAs with the template — so Git can’t accidentally “help” you.

Next, don’t clone, just copy.

If you're using this as a template anyway, you could just copy the files instead of cloning.

Like this =>

rsync -av --exclude='.git' template/ new-repo/

cd new-repo

git init

git add .

git commit -m "Initial commit from template"

That gives you a clean, standalone repo with no shared history.

Hope this helps someone out there dealing with the same Git weirdness — don't worry, you're not crazy, Git's just very good at remembering things 😄

Reasons:
  • Whitelisted phrase (-1): Hope this helps
  • RegEx Blacklisted phrase (1.5): how to fix it?
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Arthur Boyd

79648081

Date: 2025-06-02 01:19:12
Score: 1
Natty:
Report link

While I generally agree with @jsbueno 's answer that overloading will require `typing.overload` I'm not sure it is needed for your example.

Sure, regarding the part of your question about "Can I somehow 'overload' decorator?" yes, you can and you would need `typing.overload` (as already mentioned) and you can read more about it in the official PEP-484 (python-enhancement-proposal) specifically the part about overloading: https://peps.python.org/pep-0484/#function-method-overloading

However, decorators are going to behave more like a C++ generic constructor for functions in your example through some syntactic sugar. So, regarding the remaining part of your question: "Can I use some nice solutions in this case?" yes, just make the method static.

The only issue with your example code I see is the class method is not marked as 'static' but implemented as static, yet called on the instance when used.

e.g, more decorators is simple and works in this case

   # double decorate static class method to drop the unused self argument
   @nice
   @staticmethod
   def sumup(a, b):
       return a + b

This way your @nice decorator takes the "static" "member" method (e.g., instead of the C++ covariant-like argument) output by the @staticmethod decorator which takes the static class function as input, you could also move the scope of a, b, to the decorator like so:

def nice(f, *args, **kwargs):
   @wraps(f)
   def decorator(*args, **kwargs):
       result = f(*args, **kwargs)
       return 'result is: %s' % str(result)
   
   return decorator

from my light testing:

from functools import wraps
def nice(f, *args, **kwargs):
    @wraps(f)
    def decorator(*args, **kwargs):
        result = f(*args, **kwargs)
        return 'result is: %s' % str(result)
    
    return decorator


@nice
def sumup(a, b):
    return a+ b


# >>> sumup(9, 8)
# 'result is: 17'
# >>> 

# >>> class Test:
# ...    def __init__(self):
# ...        pass
# ...    
# ...    @nice
# ...    def sumup(self, a, b):
# ...        return a + b
# ...        
# >>> cls = Test()
# ... print(cls.sumup(4, 8))
# ... 
# result is: 12
# >>> 

sorry for the rushed answer, hopefully this helps.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @jsbueno
  • Low reputation (1):
Posted by: Reactive-Firewall

79648076

Date: 2025-06-02 01:11:10
Score: 0.5
Natty:
Report link
%dw 2.0
output application/json
---
{
  data: payload groupBy $.EMP_ID pluck ((value, key) -> {
    empID: value[0].EMP_ID,
    jobData: value groupBy ($.EMP_ID ++ '|' ++ $.DEPT_ID ++ '|' ++ $.OPRT_UNIT_CODE ++ '|' ++ $.PROD_CODE) pluck ((subValue, subKey) -> {
      DEPT_ID: subValue[0].DEPT_ID, 
      OPRT_UNIT_CODE: subValue[0].OPRT_UNIT_CODE,
      PROD_CODE: subValue[0].PROD_CODE,
      orgData: subValue map ((item, index) -> {
        OrgCode: item.NODE_CODE,
        AllocPct: item.ALLOC_PCT
      })
    })
  })
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Mahari

79648060

Date: 2025-06-02 00:30:01
Score: 0.5
Natty:
Report link

Your code has a major issue: the while thread_request_token.is_alive(): pass line creates a blocking loop that freezes the GUI until the thread finishes. This is not ideal, as it prevents Tkinter from updating the interface properly. Instead, you should use a callback function once the thread completes.

Here’s a better version of your code using threading and Tkinter's after() method, which allows the UI to remain responsive:

import threading

def change_login_to_wait():
    frame_waiting.grid(row=0, column=0, padx=10, pady=10)
    frame_discord_login.grid_forget()

def change_wait_to_session():
    frame_discord_session.grid(row=0, column=0, padx=10, pady=10)
    frame_autoticket.grid(row=0, column=1, padx=10, pady=10)
    frame_waiting.grid_forget()

def request_token():
    """Function that runs in a separate thread to request token."""
    bls_at.request_discord_token(input_email.get(), input_password.get())

def on_login_complete():
    """Called once the login process completes."""
    lbl_discord_username.configure(text=bls_at.USER_NAME)
    change_wait_to_session()

def login_user():
    change_login_to_wait()

    # Start thread for request, then check its completion using after()
    thread_request_token = threading.Thread(target=request_token)
    thread_request_token.start()

    # Schedule a periodic check without freezing the GUI
    check_thread_completion(thread_request_token)

def check_thread_completion(thread):
    """Checks if the thread is alive, then schedules another check."""
    if thread.is_alive():
        frame_waiting.after(100, lambda: check_thread_completion(thread))
    else:
        on_login_complete()

btn_login = CTkButton(
    frame_discord login,
    text="Login",
    command=login user,
    width=LOGIN_ELEMENTS_WIDTH
)
Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ron

79648058

Date: 2025-06-02 00:24:00
Score: 4.5
Natty:
Report link

In your react code (if using axios), are you setting parameter withCredentials: true?

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Abhinav Kumar Gurung

79648057

Date: 2025-06-02 00:20:59
Score: 1
Natty:
Report link
import React, { useEffect, useState } from 'react';

export default function Dashboard() {
  const [user, setUser] = useState(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    fetch('/api/user')
      .then((res) => res.json())
      .then((data) => {
        setUser(data);
        setLoading(false);
      });
  }, []);

  return (
    <h2>
      Hi, {loading ? 'loading...' : user.firstName}!
    </h2>
  );
}

You can also use a ternary to conditionally render based on data availability:

{user ? (
  <h2>Hi, {user.firstName}!</h2>
) : (
  <h2>Hi, loading...</h2>
)}

I’ve faced this challenge before when building dashboards that rely on asynchronous API data. Finding a balance between clean code and good user experience is key. From my experience, managing explicit loading states and using the nullish coalescing operator (??) often leads to the most reliable and readable solution.

I hope my answer helps you.

I learned a lot from you. Thank you.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: user30692829

79648054

Date: 2025-06-02 00:16:58
Score: 1.5
Natty:
Report link

i found one of the solution, if you know more, please let me know -solution is very simple, as greetings is simple list, let make it empty using this line of code :

greeting.current.controls=[]

so that updated fragment  will be this :
    def hello_here(e):
        greeting.current.controls=[]
        greeting.current.controls.append(ft.Text(f'hello {first_name.current.value} {last_name.current.value}'))
        first_name.current.value =""
        last_name.current.value =""
        first_name.current.focus()
Reasons:
  • Whitelisted phrase (-1): solution is
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: rain snow

79648047

Date: 2025-06-02 00:08:55
Score: 4.5
Natty:
Report link

i have same problem

00:00:38 CRITICAL  [php] Uncaught Error: Unknown named parameter $value ["exception" => Error { …}]

In AbstractLoader.php line 104:

  Unknown named parameter $value
Reasons:
  • Blacklisted phrase (1): i have same problem
  • Low length (0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): i have same problem
  • Low reputation (1):
Posted by: Mickael Longpres

79648042

Date: 2025-06-01 23:54:52
Score: 1.5
Natty:
Report link

I think that a native PBI solution is not available. Here is one workaround:

Exchange Manager name and Manager rank. This way Manager rank will be in small multiples and you will be able to sort descending by this rank. It will also display the name of the manager.

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

79648037

Date: 2025-06-01 23:48:51
Score: 2.5
Natty:
Report link

to solve the issue, 1 download the newest PowerShell 2. go back android studio terminal, 3 inside the terminal settings go to shell path and locate where you have downloaded the newest PowerShell and select that path way and the issue is solve.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mi Si Yuh Security Systems

79648026

Date: 2025-06-01 23:39:49
Score: 1.5
Natty:
Report link

⚠️ This guide is for developers who want to keep their Windows clean — no side hustle with NPM, no unnecessary Node.js setup, and no extra tech they'll barely use or never touch again.

🔥 Part 1: Firebase CLI Setup (No NPM, No Node, No BS)

  1. Download the Firebase CLI
    Go to: https://github.com/firebase/firebase-tools/releases
    ⚠️ Avoid firebase-tools-instant-win.exe. That version uses Firepit and will likely break stuff or throw confusing errors like FormatException or SyntaxError: Unexpected end of JSON. Go for firebase-tools-win.exe for an easy life.

  2. Rename the file
    Rename your downloaded file to:

    firebase.exe
    
  3. Move it to a folder you control
    Example path: C:\Users\<yourusername>\firebase\firebase.exe

  4. Copy the path of the folder
    Example: C:\Users\<yourusername>\firebase\

  5. Add it to your Windows PATH

    • Open Start Menu → search “environment variables”
    • Click Environment Variables
    • Under System Variables, select Path → click Edit
    • Click New → paste the path from step 4
  6. Test if it works
    Open a new terminal window and run:

    firebase --version
    

    If it shows a version number, you're golden.
    If not… maybe scream into the void or talk to your favorite AI assistant.

  7. (Optional reset if you've failed before)

    firebase logout
    
  8. Now log in properly

    firebase login
    
  9. Confirm it's working

    firebase projects:list
    

    You should see your Firebase projects listed here. If not, something's off.


Part 2:🔥 Flutter + Firebase Setup (No NPM Required)

At this point, you can either:

Follow the official instructions shown in your Firebase Console (go to your project → click Add app → select Flutter → follow Step 2),
OR
Just follow these simplified, no-nonsense steps below:

  1. Activate FlutterFire CLI

    dart pub global activate flutterfire_cli
    

    (Don’t ask why. Just trust the process.)

  2. From your Flutter project root, run:

    flutterfire configure --project=<YOUR_PROJECT_ID>
    

    It’ll:

    • Ask what platforms you’re targeting (Android, iOS, Web, etc.)
    • Auto-generate lib/firebase_options.dart
    • Set everything up inside your Firebase Console
  3. Follow what the terminal says
    It’ll walk you through the rest — way better than Google Docs, tbh.


🗯 Final Words

📣 Dear Google,
Please write docs for actual humans, not only for engineers who graduated from Hogwarts.
We just want Firebase in our app without sacrificing our sanity. Thanks.


✅ You're now Firebase-powered.
❌ No NPM bloat.
🧼 System stays clean.
💯 Developers stay sane.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): This guide
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: acpSiam

79648010

Date: 2025-06-01 23:13:42
Score: 2
Natty:
Report link

Okay, so your Airflow task is getting stuck on requests.post() when trying to grab a Keycloak token, even though it works fine locally and in a plain venv. This is a classic "it works on my machine" but not in Airflow!

Here's a rundown of what's likely going on and how to fix it, in a more Stack Overflow-friendly way:


It sounds like your Airflow task is hanging when it tries to make the requests.post() call to Keycloak. This usually points to network issues from the Airflow worker, how the request itself is configured, or sometimes even Keycloak being picky.

Here’s what I’d check, step-by-step:

  1. The BIG One: Timeouts! Your requests.post(...) call doesn't have a timeout. If the network is a bit slow or Keycloak takes a moment longer to respond from the Airflow worker, your request will just sit there waiting... forever.

    Fix: Always add a timeout.

    Python

    try:
        response = requests.post(
            token_url,
            data=token_data,
            headers=headers,
            timeout=(10, 30),  # (connect_timeout_seconds, read_timeout_seconds)
            verify=False # We'll talk about this next!
        )
        response.raise_for_status() # Good for catching 4xx/5xx errors
        #... rest of your code
    except requests.exceptions.Timeout:
        logger.error("Request to Keycloak timed out!")
        raise
    except requests.exceptions.RequestException as e:
        logger.error(f"Something went wrong with the request: {e}")
        raise
    
    
  2. Network Gremlins in the Airflow Worker: Your Airflow worker lives in a different environment than your local machine.

    • Firewalls/Security Groups: Can the worker actually reach your Keycloak server's address and port? Test this from inside the worker environment if you can (e.g., curl from a worker pod if you're on Kubernetes).

    • Proxies: Does your Airflow environment need an HTTP/HTTPS proxy to get to the internet or your Keycloak instance? If so, requests needs to be told about it (either via environment variables HTTP_PROXY/HTTPS_PROXY or the proxies argument in requests.post).

    • DNS: Can the worker resolve the Keycloak hostname? Again, test from the worker.

  3. SSL Verification (verify=False): You've got verify=False. While this can bypass some SSL issues, it's a security risk (Man-in-the-Middle attacks). Sometimes, even with verify=False, underlying SSL libraries can behave differently in different environments.

    • Better Fix: Get the CA certificate for your Keycloak instance and tell requests to use it:

      Python

      response = requests.post(..., verify='/path/to/your/ca_bundle.pem')
      
      

      Or set the REQUESTS_CA_BUNDLE environment variable in your worker.

    • Debugging SSL: If you suspect SSL, you can try openssl s_client -connect your-keycloak-host:port from the worker to see handshake details.

  4. Keycloak Server Being Strict:

    • Is Keycloak configured to only allow requests from certain IPs? Your worker's IP might not be on the list. Check Keycloak's admin console and server logs.

    • Any weird client policies or rate limiting on the Keycloak side?

  5. Python Environment Mismatch: Are the versions of requests, urllib3, or even Python itself the same in your Airflow worker as in your working venv? Subtle differences can cause issues.

    • Fix: Use a requirements.txt to ensure your Airflow environment is built consistently.
  6. Airflow Worker Resources: Less likely to cause a silent hang on requests.post itself, but if the worker is starved for CPU or memory, things can get weird or very slow. Check your worker logs for any OOM errors.

  7. Super-Detailed Logging (for desperate times): If you're really stuck, you can enable http.client debug logging to see exactly what's happening at the HTTP level. It's very verbose, so use it sparingly.

    Python

    import http.client as http_client
    import logging
    http_client.HTTPConnection.debuglevel = 1
    logging.basicConfig() # You need to initialize logging, otherwise you'll not see debug output.
    logging.getLogger().setLevel(logging.DEBUG)
    requests_log = logging.getLogger("requests.packages.urllib3")
    requests_log.setLevel(logging.DEBUG)
    requests_log.propagate = True
    
    

    Put this at the top of your task file.

Quick Summary of Code Improvements:

Python

import requests
import logging
from airflow.models import Variable
from urllib.parse import urljoin
import urllib3

logger = logging.getLogger("airflow.task") # Use Airflow's task logger

def get_keycloak_token() -> str:
    # Consider if you really need to disable this warning. Best to fix SSL.
    # urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

    keycloak_base_url = Variable.get("keycloak_base_url")
    #... (get other variables)...
    password = Variable.get("keycloak_password") # Ensure this isn't being double-JSON-encoded

    token_url = urljoin(keycloak_base_url, f"/realms/{Variable.get('keycloak_realm')}/protocol/openid-connect/token")

    token_data = {
        'grant_type': 'password',
        'username': Variable.get("keycloak_username"),
        'password': password,
        'client_id': Variable.get("keycloak_client_id"),
    }
    headers = {"Content-Type": "application/x-www-form-urlencoded"}

    logger.info(f"Attempting to get token from: {token_url}")
    try:
        response = requests.post(
            token_url,
            data=token_data,
            headers=headers,
            timeout=(10, 30),  # Connect, Read timeouts
            # BEST: verify='/path/to/your/ca_bundle.pem'
            # For now, if you must:
            verify=False
        )
        response.raise_for_status() # Will raise an exception for 4XX/5XX errors
        token_json = response.json()
        access_token = token_json.get('access_token')
        if not access_token:
            logger.error("Access token not found in Keycloak response.")
            raise ValueError("Access token not found")
        logger.info("Successfully obtained Keycloak token.")
        return access_token
    except requests.exceptions.Timeout:
        logger.error(f"Timeout connecting to Keycloak at {token_url}")
        raise
    except requests.exceptions.HTTPError as e:
        logger.error(f"HTTP error from Keycloak: {e.response.status_code} - {e.response.text}")
        raise
    except requests.exceptions.ConnectionError as e:
        logger.error(f"Connection error to Keycloak: {e}")
        raise
    except Exception as e:
        logger.error(f"An unexpected error occurred while getting Keycloak token: {e}", exc_info=True)
        raise

# Tip: Consider using Airflow Connections to store your Keycloak credentials
# instead of Variables for better security and management.

Start with the timeout. That's the most common culprit for this kind of hang. Then move on to network and SSL. Good luck!

Reasons:
  • RegEx Blacklisted phrase (1.5): resolve the Keycloak hostname?
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: some random guy

79648005

Date: 2025-06-01 23:03:40
Score: 0.5
Natty:
Report link

facing the same problem, i lately post my short solution:

(define (map-nested f L)

    (define (map-nested-aux x)
      (if (list? x)
           (map map-nested-aux x)
           (apply f (list x))))

    (map map-nested-aux L))

example:

(map-nested sin '(0.1 0.2 (0.3) 0.4))
'(0.09983341664682815 0.19866933079506122 (0.29552020666133955) 0.3894183423086505)
Reasons:
  • Whitelisted phrase (-2): solution:
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same problem
  • Low reputation (0.5):
Posted by: Damien Mattei

79648002

Date: 2025-06-01 22:56:38
Score: 1
Natty:
Report link

Answer / Workaround I Found
EF doesn’t enforce precision for computed columns unless you explicitly cast the result inside the SQL string:

.HasComputedColumnSql("CAST(([Price] * ([DurationInMinutes] / 60.0)) AS DECIMAL(18, 2))")

The .HasPrecision(...) method only affects non-computed columns unless your computed expression already returns the expected precision. EF doesn’t auto-wrap or warn you — so you have to handle that casting yourself.

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

79647999

Date: 2025-06-01 22:48:37
Score: 1
Natty:
Report link

when you install something from an external url that cannot be versioned or that the content can change, docker cannot cache the command and need to execute it at every build.

In your case, the package is not redownloaded because of the mount, the package is present so no need to be redownloaded but the docker run line is steel executed.

(i'm not english native so i hope it is comprehensible)

Reasons:
  • Whitelisted phrase (-1): In your case
  • No code block (0.5):
  • Starts with a question (0.5): when you in
  • Low reputation (1):
Posted by: fabiocuciuffo

79647997

Date: 2025-06-01 22:42:36
Score: 1.5
Natty:
Report link

try add to your quasar.config

css: [
  'app.scss',
  '~quasar-ui-qcalendar/src/css/calendar-day.scss' // <---ADD
],
//-------
build: {
  webpackTranspile: true,
  webpackTranspileDependencies: [ /quasar-ui-qcalendar[\\/]src/ ]  // <---ADD
}

More information: https://qcalendar.netlify.app/getting-started/installation

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

79647996

Date: 2025-06-01 22:41:35
Score: 0.5
Natty:
Report link

Okay, I understand. It looks like you're grappling with a pretty common headache in ggplot2: how to make two dashed lines of different colors clearly visible when they overlap, especially if you want them to have the exact same dash pattern but just... offset a bit, so the dashes don't land right on top of each other. That's a totally reasonable thing to want!

Here's the gist of what's going on and what you can (and can't easily) do, based on how R and ggplot2 handle lines:

The Not-So-Great News: Direct "Dash Phase" Control Isn't Really a Thing in R/ggplot2

Unfortunately, R's graphics engine (which ggplot2 uses under the hood) doesn't have a simple switch or parameter to say, "Hey, for this second blue line, start drawing the dashes just a little bit later along the line than you did for the red one."

So, What Are Your Best Bets?

Since a direct "phase" control is off the table within R's standard graphics, here are the most practical ways people tackle this:

  1. The "True but Complicated" Fix: SVG Export and stroke-dashoffset

    • If you absolutely need that perfect phase control, the way to get it is to step outside R's direct rendering. The SVG (Scalable Vector Graphics) format does support an attribute called stroke-dashoffset which does exactly what you want.

    • The process would be: create your ggplot2 plot -> export it to SVG (e.g., using the gridSVG package) -> then programmatically edit that SVG file to add the stroke-dashoffset to one of your lines -> then use the modified SVG.

    • This is powerful but definitely more involved than a simple ggplot2 tweak.

  2. Making Lines Visually Distinct with ggfx (A Good ggplot2-Friendly Option)

    • The ggfx package lets you add some cool visual effects to ggplot2 layers. While it won't shift the dash phase, it can make one line stand out from the other.

    • A good candidate is with_outer_glow(). You could apply a subtle glow to one of your lines. It doesn't change the dashes themselves but makes the line appear slightly "thicker" or haloed, helping to distinguish it.

    • Conceptual Example:

      R

      # install.packages("ggfx") # if you haven't already
      library(ggplot2)
      library(ggfx)
      
      ggplot(data.frame(x=1:5,y=1:5)) +
        geom_point(aes(x=x,y=y)) +
        geom_abline(slope=1, intercept=1, linetype='dashed', color='red', linewidth=2) +
        with_outer_glow( # Apply glow to the blue line
          geom_abline(slope=1, intercept=1, linetype='dashed', color='blue', linewidth=2),
          colour = "lightblue", # Or even "blue" for a softer edge
          sigma = 1.5,        # Adjust for how much glow
          expand = 1          # Might need to tweak this
        )
      
      
    • This keeps you within the ggplot2 world and can be quite effective.

  3. The Standard Workarounds (Which You Mentioned Wanting to Avoid, But Just for Completeness):

    • Transparency (alpha): geom_abline(..., alpha = 0.5) on the top line. Simple, but leads to mixed colors where dashes overlap.

    • Slightly Different Linetypes: Your example of a solid red line under a dashed blue line is one way. Or, using two different dash patterns (e.g., linetype = "dashed" vs. linetype = "longdash" or linetype = "dotdash"). This is often the most straightforward if you can accept a slight difference in the dash appearance.

    • Slight Positional Offset (If Your Data Allows): If it doesn't misrepresent your data, you could add a tiny numerical offset to the intercept of one of the lines so they aren't perfectly on top of each other.

Regarding That "Red Protruding" Antialiasing Thing:

Yeah, that little artifact where one color seems to "bleed" or "protrude" around the edge of another when they're close or overlapping is usually due to antialiasing. Antialiasing smooths out jagged edges, but how different graphics devices (your screen, PNGs, PDFs) do this can vary, and sometimes it results in these subtle visual quirks.

In a Nutshell:

It stinks that there isn't a simple dash_phase argument in ggplot2. For making overlapping dashed lines distinct when you want the same dash pattern:

Hope this helps clear things up, even if it's not the magic bullet solution we all wish R had for this one!

Reasons:
  • Whitelisted phrase (-1): Hope this helps
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: some random guy

79647995

Date: 2025-06-01 22:40:35
Score: 2
Natty:
Report link

You could start with the flutter documentation. Starting any new language the documentation for that language will have all the important information you need to start your learning.

Learn Flutter documentation

Dart documentation

I see you tagged android, In the documentation it has flutter for android developers that helps you convert your understanding of android to flutter.

You could also find sample projects you could download and go over the code in your own time and look at the documentation at parts you don’t understand that help me quickly understand flutter. You can find small sample projects anywhere for GitHub to YouTube to blogs.

Reasons:
  • Blacklisted phrase (1): help me
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: kyle

79647989

Date: 2025-06-01 22:32:33
Score: 6.5
Natty: 7.5
Report link

Experiencing the same issue and wondering if you found a solution to this?

Reasons:
  • Blacklisted phrase (1): if you found a solution
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: cp0921

79647985

Date: 2025-06-01 22:25:31
Score: 5
Natty:
Report link

Can you tell me what your response is by using this console

console.log(typeof tx.wait); console.log(tx);

I think .wait() might not be valid here due to the nature of the function.

Reasons:
  • RegEx Blacklisted phrase (2.5): Can you tell me what your
  • Low length (0.5):
  • No code block (0.5):
  • Starts with a question (0.5): Can you
  • Low reputation (1):
Posted by: Talha Amin

79647977

Date: 2025-06-01 22:07:26
Score: 3.5
Natty:
Report link

Microsoft - you only had to add additional permission...

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

79647973

Date: 2025-06-01 21:51:23
Score: 3.5
Natty:
Report link

I don't know my friend you will get the answer

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

79647964

Date: 2025-06-01 21:43:21
Score: 4.5
Natty:
Report link

You can edit the URL handling
Check out the following link:
https://medium.com/@iman.rameshni/django-health-check-89fb6ad39b0c

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: iman rameshni

79647963

Date: 2025-06-01 21:41:20
Score: 4.5
Natty: 4.5
Report link

I wrote a walkthrough for that on medium here;

https://medium.com/@kevostein2k47/how-to-add-natural-voices-in-microsoft-text-to-speech-tts-67d0ee5a9973

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: kevinscki

79647960

Date: 2025-06-01 21:36:19
Score: 1
Natty:
Report link

To build on Pedro's discovery of support for unnamed sections in Python 3.13, an example:

import configparser

config = "config.ini"

cparser = configparser.ConfigParser(allow_unnamed_section=True)
cparser.read(config)

value = cparser.get(configparser.UNNAMED_SECTION, 'key1')

and while OP has no need to write/modify the original file, for those who do:

cparser.set(configparser.UNNAMED_SECTION, 'key1', 'new_val')

with open(config, 'w') as cf:
    cparser.write(cf)
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: udance4ever

79647956

Date: 2025-06-01 21:28:17
Score: 2
Natty:
Report link

In my case, I just deleted my Android 34 API emulator and created a new one with 33 API and it worked,

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

79647954

Date: 2025-06-01 21:26:16
Score: 3
Natty:
Report link

Movie download Answers generated by AI tools are not allowed due to Stack Overflow's artificial intelligence policy

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

79647951

Date: 2025-06-01 21:24:16
Score: 3
Natty:
Report link

I am seeing the same error. This is a new error because my code worked just a few days ago. I am also using Selenium with options:

        options = webdriver.ChromeOptions()
        options.add_argument('--headless=new')
        options.add_argument('ignore-certificate-errors')
        options.add_experimental_option('excludeSwitches', ['enable-logging'])
        browser = webdriver.Chrome(options=options)

Hopefully someone knows an work around.
Reasons:
  • Has code block (-0.5):
  • Me too answer (2.5): I am seeing the same error
  • Low reputation (1):
Posted by: Deborah Jones

79647947

Date: 2025-06-01 21:18:14
Score: 4
Natty: 4.5
Report link

that option doesn't disable yaml parsing, what am I doing wrong?

--from markdown-yaml_metadata_block
Reasons:
  • Blacklisted phrase (1): what am I doing wrong?
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: gianni

79647936

Date: 2025-06-01 21:05:11
Score: 4.5
Natty: 4.5
Report link

it is super easy
Check out the following link:
https://medium.com/@iman.rameshni/django-health-check-89fb6ad39b0c

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: iman rameshni

79647926

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

possibly this is a bug in react-native-screens version 4.11.1, you should open an issue at "https://github.com/software-mansion/react-native-screens", for now you can use version 4.10 as a temporary solution. "yarn add [email protected]" or specify in package.json.

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: RDev

79647919

Date: 2025-06-01 20:47:06
Score: 4
Natty: 4.5
Report link

There is another part of the documentation called Adding someone else to such chat or channel.

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

79647912

Date: 2025-06-01 20:40:04
Score: 1.5
Natty:
Report link

I think that if you have a big team, it’s better to use a professional live translation tool that adapts to your team’s needs and comes with support for your meetings on MS Teams. I recently wrote a blog on MS Teams' capabilities in this area and how Interprefy can help businesses solve the lack of live translation options. It’s in-depth!
https://www.interprefy.com/resources/blog/live-translation-options-for-ms-teams-2025-interpretation-and-ai-captions

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

79647911

Date: 2025-06-01 20:39:03
Score: 1.5
Natty:
Report link

The following code worked just fine on Kali Linux for the purpose of preventing sleep. The above answer that involved setting the volume up and down did not work on Kali. I do not know about Windows or MacOS.

import pyautogui, time

while True:
    pyautogui.moveTo(100, 100)
    pyautogui.moveTo(500, 500)
    time.sleep(5)
Reasons:
  • Blacklisted phrase (1): did not work
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Matthew Bendyna

79647910

Date: 2025-06-01 20:38:03
Score: 1
Natty:
Report link

I think I figured this out:

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

79647896

Date: 2025-06-01 20:21:59
Score: 0.5
Natty:
Report link

Invalid input type <class 'langchain_core.messages.human.HumanMessage'>. Must be a PromptValue, str, or list of BaseMessages.

message = [HumanMessage("what is the capital of India")]

keep HumanMessage in Array.
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Manoj Gupta

79647891

Date: 2025-06-01 20:13:57
Score: 3
Natty:
Report link

Good idea. But after a 404, the browser instance automatically closes, and the URL is no longer accessible.

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

79647889

Date: 2025-06-01 20:12:57
Score: 1
Natty:
Report link

The way I did it (if you have a Windows machine) is to set it up in your ODBC Data Source Administrator and click Add

enter image description here

In the next screen, choose SQL Server and fill in your DSN information then hit next

enter image description here

Then toggle With Windows NT authentication and finish the rest

enter image description here

And you can test the connection from the wizard.

Then you can go into R with the following:

library(RODBC)
con <- odbcConnect(dsn="your_dsn")

Hope that works for you.

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

79647883

Date: 2025-06-01 20:03:55
Score: 1.5
Natty:
Report link

What about this?

This allows me to continue using `Enum`, but forces me to check whether the object I'm serializing has a `_to_db` method.

class MyEnum(Enum):
    VALUE = auto()

    def _to_db(self) -> Self:
        return self.value
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): What
Posted by: suizokukan

79647861

Date: 2025-06-01 19:30:47
Score: 3.5
Natty:
Report link

A TYPO3 version later, but a similar problem with v13.4 - maybe the same cause. I have a dropdown in my navbar to login/logout on every page.
My setup:

lib.loginBox = USER
lib.loginBox {

plugin.felogin.showForgotPassword = 0
 felogin.showForgotPassword = 0
#page und showForgotPassword don't work
# 5 page with regular plugin
plugin.tx_felogin_login.settings.pages = 5

plugin.tx_felogin_login.settings.showLogoutFormAfterLogin = 1 
#outdated? https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.5.x/Important-98122-FixFeloginVariableNameInTypoScriptSetup.html
plugin.tx_felogin_login.settings.showForgotPasswordLink = 0
plugin.tx_felogin_login.settings.showForgotPassword = 0

  userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
  extensionName = Felogin
  pluginName = Login
  
  settings < plugin.tx_felogin_login.settings 
  
  settings {
   #pages - ##Storage Page with the Website User Records## plugin
   pages = 7
   # does not work
   #    showForgotPassword = 1
   showForgotPassword = 0
   showLogoutFormAfterLogin = 1

  }
  #custom templates
  view {
    templateRootPaths {
       #10 = {$plugin.tx_felogin_login.view.templateRootPath}
       50 = EXT:ubsp/Resources/ext/fe_login/Resources/Private/Templates2/
        }
    partialRootPaths {   
       50 = EXT:ubsp/Resources/ext/fe_login/Resources/Private/Partials2/
        }
    } 
    
} 


  

in my navbar template I use <f:cObject typoscriptObjectPath="lib.loginBox" />
This work fine, but has some disadvantages
Problems I'm struggeling with:

When I try to use a more simple template in the dropdown, I can't login (refer to https://t3forum.net/d/900-fe-login-in-navbar/23).

Do I have a mistake or is this a bug in felogin?
Thanks in advance for your help

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (3): Thanks in advance
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: wini

79647859

Date: 2025-06-01 19:28:46
Score: 1
Natty:
Report link

Large diagrams are often easier to understand when broken down into smaller, related groups of tables. For example:

How to do it:

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

79647858

Date: 2025-06-01 19:28:46
Score: 0.5
Natty:
Report link

This dockerfile was created for me when i ran the commands to start a new rails project, and it was intended for production only. So the dockerfile specifically only gave me access to certain files with

chown -R $USERNAME:$USERNAME db log storage tmp

Adding the directories I actually want to be developing in here is necessary, so in my case the app directory.

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

79647857

Date: 2025-06-01 19:27:46
Score: 1.5
Natty:
Report link
function rotateAround(p1, p2,angle,dist) {
    for(let i =0; i<p1.length; i++) {
        let dx = p2[i].x + Math.cos(angle) * dist;
        let dy = p2[i].y + Math.sin(angle) * dist;
        p1[i].x = dx;
        p1[i].y = dy;
    }
}

Managed to find a way around this using arrays.

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

79647856

Date: 2025-06-01 19:25:45
Score: 1.5
Natty:
Report link

Give the class to tag and use font-style as normal.if it is already than put !important.

.fontstyle{

  font-style:normal;
}
<i class="fontstyle">Hello</i> 
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Bina Kunadiya

79647850

Date: 2025-06-01 19:16:43
Score: 2.5
Natty:
Report link

Dear potential colleagues,

In my opinion Android documentation still does not implement completely what it is technically known as "modularity", since it is difficult to find for each function or software element a full implementation example to be immediately reused for creating your application.

The provided example codes are spread among many various websites, including GitHub; sometimes there is also nobody who checks the code for correctness or updates before publication.

The functions related to GNSS and to the phone module are partially blocked in comparison of what you can access by means of lower level commands, i.e. commands sent on UART.

These problems do not happen or rarely happen when you write software using the C language, especially for safety applications; the access to the GNSS position is fast and clear too.

I would ask Android to revise its documentation; do you agree with me?

Thanks for your precious collaboration and job.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: X.E

79647840

Date: 2025-06-01 19:00:37
Score: 2
Natty:
Report link

Not much can be said from just an error. But make sure you have Node.js and check your path file for npm.

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

79647838

Date: 2025-06-01 18:59:37
Score: 1
Natty:
Report link

As described in the reddit post linked by Daniel the answer to my question is to use nvr.

In neovim's internal terminal you can run command like this:

<cmd> | nvr -o -
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: mike27

79647806

Date: 2025-06-01 18:18:27
Score: 4.5
Natty:
Report link

I have implemented a polars wrapper that supports pandas style query, eval and more. Here is the link to my post https://stackoverflow.com/a/79501438/22601993

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Blacklisted phrase (1): Here is the link
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Lowell Winston

79647804

Date: 2025-06-01 18:17:26
Score: 0.5
Natty:
Report link

Your WordPress site stores important settings in its database. When you reinstalled WordPress, new default data was created, overwriting the connections (pointers) to your old settings—but the old settings are often still there.

Here's how you can try to restore everything:

Create a Backup!

Back up all your files and the database now before you proceed.

Check Your Database Connection

Make sure the database credentials in your wp-config.php file are correct.

Activate Theme & Plugins

Log in to your WordPress admin, reactivate your theme (e.g., WoodMart) and your plugins. Some plugins might automatically retrieve their old settings, others might not.

Save Permalinks

Go to Settings > Permalinks and save them twice. This ensures your links function correctly.

Review Theme Settings

Sometimes theme settings get overwritten. If you have a backup, you might be able to restore these in the database (only do this if you know what you're doing).

Verify Data

WooCommerce orders, users, and products should still be present, as they're often stored in specific database tables.

Check Your Media

Look in your uploads folder to see if your images are still there.

Conduct a Security Check

After recovery, you should scan your site with a security plugin and change all passwords.

In short: Your database is still there, but WordPress created new connections. You now need to reactivate your theme, plugins, and links, and check if everything is running correctly.

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

79647803

Date: 2025-06-01 18:17:26
Score: 1.5
Natty:
Report link

Apparently this solved the issue...

-- Create a policy that allows authenticated users to read their own data
CREATE POLICY "Users can read their own profile" ON app_users
FOR SELECT 
TO authenticated 
USING (auth_id = auth.uid());
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: victor garcia exposito

79647802

Date: 2025-06-01 18:16:26
Score: 1.5
Natty:
Report link

Please upgrade Flutter to 3.32.1

Ref: https://github.com/flutter/flutter/issues/168849

Reasons:
  • Probably link only (1):
  • Low length (2):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Michał Dobi Dobrzański

79647798

Date: 2025-06-01 18:08:24
Score: 0.5
Natty:
Report link

Not sure this is a clean solution, but at least it is working.

Step one

make sure the annotation processing module has access to the com.sun.tools.javac.tree package by adding a add-exports command to JDK. In maven this is done by adding the following section in the maven-compiler-plugin config section:

<compilerArgs>
   <arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
</compilerArgs>

If you are using an other build system, you can for sure find a way to pass this parameter to javac.

Step two

Make sure that the annotation processor "opens" the neccesary modules on runtime. To do this, I followed the same approach that lombok does here. Please note that I had to also copy much of the permit package.

Step three

Once acess to com.sun.tools.javac.tree is ensured, you can cast the public interface types from com.sun.source.tree to their actual implementation from com.sun.tools.javac.tree and gain access to the write operations. Strangely, this is not done through setters, but access to public fields. Not super consistent to java standards, but at least it is possible :)

For example, I casted LiteralTree -> JCTree.JCLiteral and swap my booleans (was the goal of my POC) like that:

if (tree instanceof JCTree.JCLiteral casted && casted.getKind() == Tree.Kind.BOOLEAN_LITERAL) {
    casted.value = Objects.equals(casted.value, 1)? 0 : 1;
}

Huge thanks to @slaw for pointing out the lombok code responsible for opening the packages. You should definately get the credit for this solution. Feel free to copy-paste this in its entirety or parts of it and I will mark it as accepted answer.

Opinion alert

Finally, I just wanted to note that am surprised that the public API "normaly" available to annotation processors do not allow AST modifications. They only provide read-access (probably useful for compile-time validations) and the ability to generate new files, but not to modify existing ones.

So, heavily hacking java9 modules and gain access to private packages seems to be the only way to go at the moment. This is at least what lombok does, and the only solution I found. I find this sad.

If AST modifications should not be allowed (for security or whatever), then there should be no "backdoor" to do so, and thus, lombok should not exist at all. Of course, this would be a massive hit to java's usability and popularity.

If on the other hand, AST modifications should be allowed (count my vote here), then there should be a clear, open, and documented API to do so. One should not need to hack their way through, by using sun.misc.Unsafe to open private packages. This is simply a messy and sad way to do things.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @slaw
  • Self-answer (0.5):
Posted by: Alkis Mavridis

79647792

Date: 2025-06-01 18:04:23
Score: 1.5
Natty:
Report link

Replace Stimulsoft.Reports.Engine with Stimulsoft.Reports.Engine.NetCore.

Source

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

79647787

Date: 2025-06-01 17:50:20
Score: 2.5
Natty:
Report link

It's not making sense to use and open new tab. we usually using to don't reload page so for new window/tap pages tag is good, use it

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

79647782

Date: 2025-06-01 17:45:18
Score: 1
Natty:
Report link

I was receiving this issue when running on iOS platform and tried flutter clean as recommended by people here but nothing worked for me except for deleting the podfile.lock and running pod install.

If you want a complete set of commands, copy/paste this into terminal:

cd ios
rm Podfile.lock
pod install
cd ..
flutter pub get
Reasons:
  • Blacklisted phrase (1): but nothing work
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mohammed Fareed

79647780

Date: 2025-06-01 17:45:18
Score: 3
Natty:
Report link

add libname with:

g++ -o -l picohttp -L

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

79647770

Date: 2025-06-01 17:31:15
Score: 1
Natty:
Report link

No, it is impossible to safely and universally “delete” cyclic links from the Enum objects themselves without violating their performance and structure, because:

Enum objects and related methaclasses (Enumtype) by definition have complex and cyclic internal connections (see their Source Code).

Changing the Enum inlands on the fly is a bad idea: this will lead to bugs and unexpected behavior.

The best and correct path:

Serialize enum objects as lines (Myenum.value.name or Myenum.value.value) and in decering to restore them along these lines (see the examples below).

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

79647767

Date: 2025-06-01 17:26:13
Score: 1.5
Natty:
Report link

It turned out to be very simple:

all I needed to do was to first group the controls and charts by selecting them all and doing Arrange > Group then add (again) the score card that I needed not be affected by the controls which would not be included in the previous grouping

after that selecting anything on the controls on the dashboard will not affect my out-of-group score card last added.

source: https://cloud.google.com/looker/docs/studio/apply-controls-to-specific-charts

Reasons:
  • Blacklisted phrase (0.5): I need
  • No code block (0.5):
  • Self-answer (0.5):
Posted by: Francisco Cortes

79647766

Date: 2025-06-01 17:25:13
Score: 4
Natty:
Report link

You need to set the access control allow origin header in the API gateway. 'Options' request must have the conditions set for CORS.

Follow this article https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors-console.html

Reasons:
  • Blacklisted phrase (1): this article
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Vashishtha Srivastava

79647764

Date: 2025-06-01 17:24:12
Score: 3
Natty:
Report link

It looks like your application cannot connect to the database server using JDBC. Because either you have wrong JDBC URL connection string, or have problems with the database driver, or you database is not running, or the connection cannot be established due to blocking network.

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

79647762

Date: 2025-06-01 17:20:12
Score: 2.5
Natty:
Report link

If you want to do a bunch in a day without Selenium go for Netnut proxies and the product is called Unblocker. you surely would be able to parse thousands in a day using REquests.

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

79647744

Date: 2025-06-01 16:56:06
Score: 2.5
Natty:
Report link

in your package.json, '@rstfx-ui/reset-dropdown-menu'is not present. Instead '@radix-ui/react-dismissable-layer' is present

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

79647742

Date: 2025-06-01 16:55:06
Score: 2
Natty:
Report link

I remember that earlier we used to get Filepaths in the input type file html tag. But I think the browser does not allow us to do that anymore. I dont think this will be possible to get filepaths

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

79647739

Date: 2025-06-01 16:51:00
Score: 7 🚩
Natty:
Report link

Try this video. It helped me sort this problem.

https://www.google.com/search?q=android+studio+error+metadata.bin+(The+system+cannot+find+the+file+specified)&rlz=1C1VDKB_enZA1099ZA1099&oq=android+studio+error+metadata.bin+(The+system+cannot+find+the+file+specified)&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCjEyMzc1ajBqMTWoAgiwAgE&sourceid=chrome&ie=UTF-8#fpstate=ive&vld=cid:2c2ecb63,vid:RCilI7QKmvY,st:0

Reasons:
  • Blacklisted phrase (2): Try this video
  • Blacklisted phrase (1): this video
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Paul Hinrichsen

79647737

Date: 2025-06-01 16:45:58
Score: 5.5
Natty:
Report link

Could you share to us what the library do you use that you have success to drive SSD1309?
maybe .c and .h library.

Reasons:
  • RegEx Blacklisted phrase (2.5): Could you share
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Mochamad Ari Bagus Nugroho

79647734

Date: 2025-06-01 16:40:57
Score: 1
Natty:
Report link

As Antd comes with different input types meaning different classNames. Check the input className using inspect, then add global css such as:
Inspect-Image

.ant-input-number-input::placeholder {
  color: #666 !important;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sara

79647718

Date: 2025-06-01 16:23:53
Score: 1.5
Natty:
Report link

add this to page

<style>
trix-editor {
    min-height: 300px !important;
}
</style>
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ihsan

79647714

Date: 2025-06-01 16:17:51
Score: 2
Natty:
Report link

I finally achieved what I wanted to do.
After clicking a button to choose the level, the composable AdditionScreen is called. I then compare the level value with the difficulty value from data. If it matches, nothing to do. If not, I call the updateGameDifficulty(level) function to update the difficulty, num1 and num2.

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

79647713

Date: 2025-06-01 16:16:51
Score: 1.5
Natty:
Report link

The above solution .carousel-dark has been deprecated in Bootstrap 5.3

I have used the following solution. Added:

data-bs-theme="dark"

to the carousel element

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

79647700

Date: 2025-06-01 16:03:48
Score: 3
Natty:
Report link

import CV from "../Assets/File/CV.pdf";

Download CV
Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Md Mehedi Hasan

79647697

Date: 2025-06-01 16:00:47
Score: 4.5
Natty: 5
Report link

Here is a more complete list of the strange characters: https://www.i18nqa.com/debug/utf8-debug.html

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

79647692

Date: 2025-06-01 15:54:45
Score: 1.5
Natty:
Report link

You can use Hibernate Filter with Spring Boot JPA but you have to enable it. I think you are missing the code to enable it.
Refer to Using Hibernate Filter with Spring Boot JPA and How can I activate hibernate filter in Spring Boot (This one contains Git repo as an example too).

Reasons:
  • Blacklisted phrase (0.5): How can I
  • Whitelisted phrase (-1.5): You can use
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Yasin Ahmed

79647689

Date: 2025-06-01 15:50:44
Score: 0.5
Natty:
Report link

I managed to find a solution. I replaced flashcardSetRepository.delete(flashcardSet) with

flashcardSet.getUser().getFlashcardSets().remove(flashcardSet);

Full code:

@Transactional
public void deleteFlashcardSet(Long userId, Long flashcardSetId) {

    FlashcardSet flashcardSet = flashcardSetRepository.findById(flashcardSetId)
            .orElseThrow(() -> new ResourceNotFoundException("Flashcard set not found"));

    if(!flashcardSet.getUser().getUserId().equals(userId)){
        throw new UnauthorizedException("User does not have permission to delete this flashcard set");
    }

    flashcardSet.getUser().getFlashcardSets().remove(flashcardSet);
}

Now I don't have to use entityManager.clear() or direct query.

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

79647687

Date: 2025-06-01 15:50:44
Score: 1.5
Natty:
Report link

You just need to check if the device is touch-sensitive.

const isMobileDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Hùng Đỗ

79647682

Date: 2025-06-01 15:44:42
Score: 4
Natty:
Report link

I am become the following error when i compile for android. for linux desktop i have no errors

Error: Gradle task assembleDebug failed with exit code 1

Reasons:
  • RegEx Blacklisted phrase (1): i have no error
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Stefan

79647681

Date: 2025-06-01 15:42:41
Score: 7 🚩
Natty:
Report link

Unfortunately, such a flag is already set. Perhaps the problem is bad proxy certificates. Is there any way to make Chrome trust such proxies?

Reasons:
  • Blacklisted phrase (1): Is there any
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Cawendish Jag

79647677

Date: 2025-06-01 15:37:39
Score: 12
Natty: 7
Report link

I added the above codes in cart.twig in OpenCart 4.0.2.3, but it doesn't work. Can someone help me with a code for version 4?

Thanks in advance

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): Thanks in advance
  • RegEx Blacklisted phrase (3): Can someone help me
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: uracort

79647675

Date: 2025-06-01 15:34:39
Score: 1.5
Natty:
Report link

Your PHP function connect_course_history($student_id, $course_code, $numberofdays) is declared to accept three arguments. However, when WordPress calls an AJAX action, it doesn't automatically pass $_POST or $_GET variables as direct function arguments.

<?php

add_action('wp_ajax_connect_course_history', 'connect_course_history_callback');

add_action('wp_ajax_nopriv_connect_course_history', 'connect_course_history_callback');


function connect_course_history_callback() {
    global $wpdb;

    // IMPORTANT: Retrieve data from $_POST
    
    $student_id   = isset($_POST['student_id']) ? sanitize_text_field($_POST['student_id']) : '';
    $course_code  = isset($_POST['course_code']) ? sanitize_text_field($_POST['course_code']) : '';
    $numberofdays = isset($_POST['numberofdays']) ? intval($_POST['numberofdays']) : 30; 

    
    if (empty($student_id) || empty($course_code)) {
        echo "<p>Error: Missing Student ID or Course Code.</p>";
        wp_die(); // Always use wp_die() or die() at the end of AJAX callbacks
    }

        $sql = $wpdb->prepare("CALL sp_connect_course_history(%s, %s, %d);", $student_id, $course_code, $numberofdays);

    $wpdb->query($sql); 
    
    $course_history = $wpdb->get_results($sql);
    
    if ($wpdb->last_error) {
        error_log("Database Error in connect_course_history: " . $wpdb->last_error);
        echo "<p>Database error: Could not retrieve course history.</p>";
        wp_die();
    }

    if (empty($course_history)) {
        echo "<p>No course history found for this student or course.</p>";
        wp_die();
    }

    
    $output = "<table><thead><tr><th>DATE</th><th>Grade</th></tr></thead><tbody>";

    foreach ($course_history as $course) {
        $output .= "<tr>";
        $output .= "<td>" . esc_html($course->DATE) . "</td>"; 
        $output .= "<td>" . esc_html($course->grade) . "</td>";
        $output .= "</tr>";
    }

    $output .= "</tbody></table>";

    echo $output; 
    wp_die();    
}
?>

Your JavaScript is mostly fine, as it correctly sends the data. The problem was on the PHP side.

function courseGradeHistory(student_id_param) { 
  
  if (typeof jQuery === 'undefined') {
    console.error('jQuery is not defined. Please ensure jQuery is loaded before this script.');
    return;
  }

  var course_code = document.getElementById("course_code").value;
  var $resultsContainer = jQuery('#studentCourseSchedule'); 
  var student_id = student_id_param || document.getElementById("student_id").value; 

  console.log("Course Code: " + course_code);
  console.log("Student ID: " + student_id);

  if (!student_id || !course_code) {
    alert("Please provide both Student ID and Course Code.");
    return;
  }

  alert("Loading Course History for Student ID: " + student_id + " and Course Code: " + course_code);

  $resultsContainer.html('<p>Loading Courses...</p>');

  
  jQuery.ajax({ 
    url: ajaxurl, 
    type: 'POST',
    data: {
      action: 'connect_course_history', 
      student_id: student_id,
      course_code: course_code,
      numberofdays: 30 
    },
    success: function(data) {
      $resultsContainer.html(data);
      console.log("AJAX Success:", data); 
    },
    error: function(xhr, status, error) {
      $resultsContainer.html('<p>Error loading courses. Please try again.</p>');
      console.error('AJAX Error:', status, error, xhr.responseText); 
    }
  });
}
Reasons:
  • RegEx Blacklisted phrase (2.5): Please provide
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: bulbul islam

79647674

Date: 2025-06-01 15:31:38
Score: 1
Natty:
Report link

I came here looking for this:

import util from 'util'

// Customize the log depth
util.inspect.defaultOptions.depth = 5;

Maybe others will find it useful too

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

79647673

Date: 2025-06-01 15:31:38
Score: 3.5
Natty:
Report link

Someone had the same issue with a very similar torch version (2.2.1), and the fix seems to be to upgrade to torch>=2.3: https://github.com/pytorch/pytorch/issues/126632#issuecomment-2119140224

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Valérian Rey

79647670

Date: 2025-06-01 15:26:37
Score: 0.5
Natty:
Report link

You can do this in v5 with

    someAction: assign(({ event, context, self }) => {
      const state = self.getSnapshot().value;
      console.log('someAction', state);

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

79647666

Date: 2025-06-01 15:18:35
Score: 1
Natty:
Report link

The wrong syntax in HQL query. Change the query code to

@Query(value="FROM Chat as c where (first_user = :userId or second_user = :lastId)")
    Page<Chat> findNextUserChats(
            @Param("userId") long id,
            @Param("lastId") long lastId,
            @Param("lastUpdatedAt") String lastUpdatedAt,
            Pageable pageable);
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: SOLoose

79647661

Date: 2025-06-01 15:14:34
Score: 1.5
Natty:
Report link

Instead of using a router, just use a state variable in the parent component (VideoPageTabs) to track whether to show the TagList or the new component (ComponentA). Pass a callback from the parent to TagList so it can tell the parent when a list item is clicked. On click, the parent flips the state variable to swap out TagList with ComponentA. This approach keeps everything in the same page/tab and doesn’t need URL changes (no routing).

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

79647657

Date: 2025-06-01 15:09:32
Score: 1
Natty:
Report link

Have you enabled Stacking in the visualization options? You must set it to the value "Normal"

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • High reputation (-2):
Posted by: knittl

79647642

Date: 2025-06-01 14:50:27
Score: 2
Natty:
Report link

the controller returns code 204

this is not important, because a controller can return any value, but a transaction failed. In this case any changes to the database will be rolled back.

This means that you should test the actual values passed through the controller as a parameter. Because missing incorrect value nothing will be deleted.

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

79647628

Date: 2025-06-01 14:35:23
Score: 0.5
Natty:
Report link

Spark created multiple base directories and delta directories in hdfs. If you copy the hdfs directory for table. Then have to pick the latest base directory (base directories are numbers) and then all delta directories.

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

79647611

Date: 2025-06-01 14:20:19
Score: 0.5
Natty:
Report link

Some ideas:

  1. Did you try logging the requests and see if they're duplicated as a whole? -> that would point to some server/deployment misconfiguration. If it's just the events, most likely it's your code. You said that no duplicate requests are hitting the server. But would Laravel logs show any duplicates?
  2. Did you try logging the stack trace in the event constructor? That would clarify what triggers these events down the stack and if it's the same flow. Given it's all processed synchronously that should help.
  3. Do you have any switches that disable any events where !app->environment('production') or similar? Have you tried running the app on your local with the APP_ENV=Prod .env settings to imitate prod?
  4. Clockwork is a good tool to trace your API requests and figure out what events are being launched, that might shed some light on the request.

Good luck!

Reasons:
  • Whitelisted phrase (-1): Have you tried
  • Whitelisted phrase (-2): Did you try
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Lukasz Zagroba

79647609

Date: 2025-06-01 14:20:19
Score: 1.5
Natty:
Report link

You could use

@Config(sdk = [31])

from Robolectric

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

79647604

Date: 2025-06-01 14:15:17
Score: 1.5
Natty:
Report link

not sure if it´s the same with next.js, but in vite for example the path needs to be edited. the font is stored in public, but somehow the path in the font-face needs to be written without public.

from:
path: "../../public/fonts/GlacialIndifference-Regular.otf"

to:
path: "../../fonts/GlacialIndifference-Regular.otf"

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

79647592

Date: 2025-06-01 14:00:13
Score: 0.5
Natty:
Report link

Is you wanted to output string:

>>> list(str(1234))
['1', '2', '3', '4']

If you want to output integers:

>>> map(int, str(1234))
[1, 2, 3, 4]

If you want to use no prebuilt methods (output int)

>>> [int(i) for i in str(1234)]

[1, 2, 3, 4]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Chase Miller

79647589

Date: 2025-06-01 13:58:12
Score: 1
Natty:
Report link

Sort in difference. This data is very useful for the students Mini

sort(machines.begin(), machines.end(), [](const pair<int, int>& a, const pair<int, int>& b) {
    return (a.second - a.first) > (b.second - b.first);});

Input = {(6,7), (3,9), (8,6)}

Output = {(3,9),(6,7),(8,6)}

Sort vector of pairs by second element ascending

vector<pair<int,int>> v = {{1, 3}, {2, 2}, {3, 1}};
sort(v.begin(), v.end(), [](const pair<int,int>& a, const pair<int,int>& b) {
    return a.second < b.second;
});

Input:
[(1,3), (2,2), (3,1)]

Output:
[(3,1), (2,2), (1,3)]

Sort vector of pairs by first ascending, then second descending

vector<pair<int,int>> v = {{1, 2}, {1, 3}, {2, 1}};
sort(v.begin(), v.end(), [](const pair<int,int>& a, const pair<int,int>& b) {
    if (a.first != b.first)
        return a.first < b.first;
    return a.second > b.second;
});

Input:
[(1,2), (1,3), (2,1)]

Output:
[(1,3), (1,2), (2,1)]

Sort vector of integers by absolute value descending

vector<int> v = {-10, 5, -3, 8};
sort(v.begin(), v.end(), [](int a, int b) {
    return abs(a) > abs(b);
});

Input:
[-10, 5, -3, 8]

Output:
[-10, 8, 5, -3]

Filter a vector to remove even numbers

vector<int> v = {1, 2, 3, 4, 5};
v.erase(remove_if(v.begin(), v.end(), [](int x) {
    return x % 2 == 0;
}), v.end());

Input:
[1, 2, 3, 4, 5]

Output:
[1, 3, 5]

Square each element in vector

vector<int> v = {1, 2, 3};
transform(v.begin(), v.end(), v.begin(), [](int x) {
    return x * x;
});

Input:
[1, 2, 3]

Output:
[1, 4, 9]

Sort strings by length ascending

vector<string> v = {"apple", "dog", "banana"};
sort(v.begin(), v.end(), [](const string& a, const string& b) {
    return a.size() < b.size();
});

Input:
["apple", "dog", "banana"]

Output:
["dog", "apple", "banana"]

Min heap of pairs by second element

auto cmp = [](const pair<int,int>& a, const pair<int,int>& b) {
    return a.second > b.second;
};
priority_queue<pair<int,int>, vector<pair<int,int>>, decltype(cmp)> pq(cmp);

pq.push({1, 20});
pq.push({2, 10});
pq.push({3, 30});

while (!pq.empty()) {
    cout << "(" << pq.top().first << "," << pq.top().second << ") ";
    pq.pop();
}

Input:
Pairs pushed: (1,20), (2,10), (3,30)

Output:
(2,10) (1,20) (3,30)

Sort points by distance from origin ascending

vector<pair<int,int>> points = {{1,2}, {3,4}, {0,1}};
sort(points.begin(), points.end(), [](const pair<int,int>& a, const pair<int,int>& b) {
    return (a.first*a.first + a.second*a.second) < (b.first*b.first + b.second*b.second);
});

Input:
[(1,2), (3,4), (0,1)]

Output:
[(0,1), (1,2), (3,4)]

Sort strings ignoring case

vector<string> v = {"Apple", "banana", "apricot"};
sort(v.begin(), v.end(), [](const string& a, const string& b) {
    string la = a, lb = b;
    transform(la.begin(), la.end(), la.begin(), ::tolower);
    transform(lb.begin(), lb.end(), lb.begin(), ::tolower);
    return la < lb;
});

Input:
["Apple", "banana", "apricot"]

Output:
["Apple", "apricot", "banana"]

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

79647571

Date: 2025-06-01 13:35:08
Score: 2
Natty:
Report link

Eben. You were sold a lie. Fix the error. A + B ≠ V2K, DEW. The RNC is becoming something that only a monster would attempt. Repeat. A monster.

Trying to get by. But need help.

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

79647563

Date: 2025-06-01 13:27:06
Score: 1
Natty:
Report link

I found that the key binding needed updating -- search for editor.action.copyLinesDownAction and verify it's the correct key binding. Mine was CTRL+Shift+Alt+Down.

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

79647561

Date: 2025-06-01 13:24:05
Score: 1.5
Natty:
Report link

It was a Python build issue. I figured it out — some C-extension modules (like for pickle) were not properly built, which caused the internal server error. After rebuilding the environment properly, the issue was resolved. Thank you!

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