79723177

Date: 2025-08-02 07:00:06
Score: 3
Natty:
Report link

None of the proposed solution work. It keeps creating a subfolder, or even worth, a 1Kb archive for each folders

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

79723176

Date: 2025-08-02 06:55:05
Score: 4
Natty:
Report link

the javascript looks fine but the html doesn't look right for a javascript function call.

also the purpose of functions is to write once and call many times, so using

<body onload="printBtn();"> defeats that purpose; so how do we call it again???
Reasons:
  • Blacklisted phrase (1): ???
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: cloudmichael

79723174

Date: 2025-08-02 06:52:04
Score: 1.5
Natty:
Report link

This is an old question but I have not seen an answer anywhere that does not use Xarray (which is overkill for this simple example). Since I recently made such a function using pandas and base Python alone, I thought I would share it here. It's pretty lengthy to handle all foreseeable cases, but please let me know if you find an edge case that Claude Code and I haven't anticipated.

import pandas as pd
from typing import Union, Optional
import calendar


def custom_year_averages(
    data: pd.Series,
    start_month: int,
    end_month: int,
    years: Optional[Union[int, list, range]] = None
) -> pd.Series:
    """
    Compute weighted averages over custom year periods that may straddle calendar years.
    
    Parameters
    ----------
    data : pd.Series
        Time series data with DatetimeIndex. Can be daily or monthly frequency.
    start_month : int
        Starting month of the custom year (1-12).
    end_month : int
        Ending month of the custom year (1-12).
    years : int, list, range, or None
        Year(s) for which to compute averages. If None, computes for all available years.
        For straddling periods (e.g., Apr-Mar), year refers to the year of the end month.
    
    Returns
    -------
    pd.Series
        Series index by year, with weighted averages as values.
        
    Examples
    --------
    .. jupyter-execute::
    
        import pandas as pd
        import numpy as np
        
        # Create sample monthly data
        dates = pd.date_range('2020-01-01', '2023-12-31', freq='M')
        values = np.arange(len(dates))  # Sequential values for clarity
        ts = pd.Series(values, index=dates, name='monthly_values')
        
        # Example 1: Single year (int)
        # Compute Jan-Mar average for 2021 only
        avg_single = custom_year_averages(ts, 1, 3, years=2021)
        print("Single year (2021):")
        print(avg_single)
        print()
        
        # Example 2: List of specific years
        # Compute Apr-Mar averages for selected years
        avg_list = custom_year_averages(ts, 4, 3, years=[2021, 2023])
        print("Specific years [2021, 2023]:")
        print(avg_list)
        print()
        
        # Example 3: Range of years
        # Compute Oct-Sep averages for consecutive years
        avg_range = custom_year_averages(ts, 10, 9, years=range(2021, 2024))
        print("Range of years (2021-2023):")
        print(avg_range)
        print()
        
        # Example 4: All available years (None - default)
        # Compute Jan-Dec averages for all years in data
        avg_all = custom_year_averages(ts, 1, 12, years=None)
        print("All available years (None):")
        print(avg_all)
        print()
        
        # Example 5: Straddling periods with different year specifications
        # Apr-Mar periods: year refers to the March year
        avg_straddle = custom_year_averages(ts, 4, 3, years=range(2021, 2024))
        print("Straddling periods (Apr-Mar), years 2021-2023:")
        print(avg_straddle)
    
    .. jupyter-execute::
    
        # Daily data example with uneven spacing
        daily_dates = pd.to_datetime([
            '2021-01-01', '2021-01-05', '2021-01-20',
            '2021-02-01', '2021-02-15', '2021-02-28',
            '2021-03-05', '2021-03-25', '2021-03-31'
        ])
        daily_values = [10, 15, 20, 25, 30, 35, 40, 45, 50]
        daily_ts = pd.Series(daily_values, index=daily_dates, name='daily_data')
        
        # Compute weighted average (accounts for uneven spacing)
        daily_avg = custom_year_averages(daily_ts, 1, 3, years=2021)
        print("Daily data with uneven spacing (Jan-Mar 2021):")
        print(f"Weighted average: {daily_avg.iloc[0]:.2f}")
        print(f"Simple mean: {daily_ts.mean():.2f}")
        print("(Note: weighted average accounts for time intervals between observations)")
    """
    if not isinstance(data.index, pd.DatetimeIndex):
        raise ValueError("Data must have a DatetimeIndex")
    
    if not (1 <= start_month <= 12 and 1 <= end_month <= 12):
        raise ValueError("Months must be between 1 and 12")
    
    # Determine if the period straddles calendar years
    straddles_year = start_month > end_month
    
    # Get available years from data
    data_years = sorted(data.index.year.unique())
    
    if years is None:
        if straddles_year:
            # For straddling periods, we need data from both years
            years = [y for y in data_years if y > min(data_years)]
        else:
            years = data_years
    elif isinstance(years, int):
        years = [years]
    
    results = {}
    
    for year in years:
        if straddles_year:
            # Period spans two calendar years (e.g., Apr 2020 to Mar 2021)
            start_date = pd.Timestamp(year=year-1, month=start_month, day=1)
            end_date = pd.Timestamp(year=year, month=end_month, day=calendar.monthrange(year, end_month)[1])
        else:
            # Period within single calendar year
            start_date = pd.Timestamp(year=year, month=start_month, day=1)
            end_date = pd.Timestamp(year=year, month=end_month, day=calendar.monthrange(year, end_month)[1])
        
        # Filter data for this period
        mask = (data.index >= start_date) & (data.index <= end_date)
        period_data = data[mask]
        
        if len(period_data) == 0:
            continue
            
        # Calculate weighted average
        weighted_avg = _calculate_weighted_average(period_data, start_date, end_date)
        
        # Use the ending year as the index (standard for fiscal years)
        results[year] = weighted_avg
    
    # Return results only for years that have data
    return pd.Series(list(results.values()), index=list(results.keys()), name=data.name or 'weighted_average')


def _calculate_weighted_average(
    data: pd.Series, 
    period_start: pd.Timestamp, 
    period_end: pd.Timestamp
) -> float:
    """
    Calculate weighted average where weights are based on time intervals.
    
    For monthly data, each month gets equal weight regardless of days.
    For other frequencies, weights are based on time intervals.
    """
    if len(data) == 0:
        return np.nan
    
    if len(data) == 1:
        return data.iloc[0]
    
    # Sort data by index
    data = data.sort_index()
    timestamps = data.index.to_series()
    
    # Check if this looks like monthly data (all timestamps are month-ends)
    is_monthly = all(
        ts.day == calendar.monthrange(ts.year, ts.month)[1] 
        for ts in timestamps
    )
    
    if is_monthly:
        # For monthly data, give each month equal weight
        return data.mean()
    
    # For non-monthly data, use time-interval weighting
    intervals = []
    
    for i, ts in enumerate(timestamps):
        if i == 0:
            # First observation: from period start to midpoint with next
            if len(timestamps) > 1:
                interval_end = ts + (timestamps.iloc[i+1] - ts) / 2
            else:
                interval_end = period_end
            interval_start = period_start
        elif i == len(timestamps) - 1:
            # Last observation: from midpoint with previous to period end
            interval_start = timestamps.iloc[i-1] + (ts - timestamps.iloc[i-1]) / 2
            interval_end = period_end
        else:
            # Middle observations: from midpoint with previous to midpoint with next
            interval_start = timestamps.iloc[i-1] + (ts - timestamps.iloc[i-1]) / 2
            interval_end = ts + (timestamps.iloc[i+1] - ts) / 2
        
        # Ensure intervals don't extend beyond the period
        interval_start = max(interval_start, period_start)
        interval_end = min(interval_end, period_end)
        
        interval_duration = (interval_end - interval_start).total_seconds()
        intervals.append(max(interval_duration, 0))  # Ensure non-negative
    
    weights = np.array(intervals)
    
    # Handle case where all weights are zero
    if weights.sum() == 0:
        return data.mean()
    
    # Calculate weighted average
    weighted_sum = (data.values * weights).sum()
    total_weight = weights.sum()
    
    return weighted_sum / total_weight
Reasons:
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: CommonClimate

79723172

Date: 2025-08-02 06:50:03
Score: 0.5
Natty:
Report link

Consistent Hashing

Sticky Sessions

Sticky sessions can use consistent hashing as a strategy, but they don’t have to. Typically, sticky sessions use a map or hashMap of session ID -> worker.

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

79723171

Date: 2025-08-02 06:48:03
Score: 1
Natty:
Report link

(Sorry if this post is useless, but in case it does help somebody I wanted to post.)

The answer put me on the right path. I wanted to resize the RectTransform of an image so that the size of the RT was close to the size of the rendered image (so only the image area was noticed by OnPointerClick). This StackOverflow post helped me size the width of the RT to the image, and I used a cross-multiply and divide to change the height when needed.

//getting the image
Image img = selectionRectTran.img;

//the initial/base size of the RT, resetting to it here
img.GetComponent<RectTransform>().sizeDelta = initialWidthHeightForSelectionImg;

float width = 0f;
float height = initialWidthHeightForSelectionImg.y; //default height


width = RectTranUtils.GetDesiredWidth(img); //from https://stackoverflow.com/questions/65385248/unity-get-the-actual-rendered-sprite-height-in-image-ui
width = Mathf.Clamp(width, 0f, img.GetComponent<RectTransform>().sizeDelta.x);

Debug.Log($"width diff: {Mathf.Abs(width - initialWidthHeightForSelectionImg.x)}");

//if the image is as wide as possible (ie, basically 0 diff between width between width and the default width)
//and the sprite - in pixels - is wider than it is tall, so there's some unwanted bounding box space on top and below the image
if (Mathf.Abs(width - initialWidthHeightForSelectionImg.x) < GameManager.TinyAmount 
    && img.sprite.texture.width > img.sprite.texture.height)
{
    //h = width * height of image in pixels / width of image in pixels
    height = width * img.sprite.texture.height / img.sprite.texture.width;
}

img.GetComponent<RectTransform>().sizeDelta = new Vector2(width, height);
        
Reasons:
  • Blacklisted phrase (1): StackOverflow
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Smerf

79723170

Date: 2025-08-02 06:46:02
Score: 2
Natty:
Report link

Great video solution , I still facing some problem
I have changed my splash-icon.png in ./assets/images/splash-icon.png
(deleted the default splash screen of react-native with expo) but still my app is showing the default splash screen,

i have cleared the cache : npx expo start -c
still the problem persist

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

79723168

Date: 2025-08-02 06:45:02
Score: 1
Natty:
Report link

I resolved the issue by moving the controller class declaration to the top of the controller file. It seems the previous structure was affecting how the framework recognized the controller. After the change, everything started working as expected.

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

79723154

Date: 2025-08-02 06:01:53
Score: 1
Natty:
Report link

As the error suggests, using the + operator for concatenation is only valid if both sides are strings. Python uses string formatting instead of concatenation when mixing strings and variables. In modern Python (3.6+), your example can be simplified using f-strings:

name = "Alice"
age = 25
message = f"My name is {name} and I am {age} years old."
print(message)

This format is easier to read, and avoids the TypeError. Prior to Python 3.6, you would have needed to use the % operator and sprintf-style formatting:

name = "Alice"
age = 25
message = "My name is %s and I am %d years old." % (name, age)
print(message)

In addition to the official Python docs linked above, there is also a good tutorial at Real Python that discusses these techniques in more detail.

Reasons:
  • Blacklisted phrase (1.5): a good tutorial
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Math Rules

79723152

Date: 2025-08-02 06:01:53
Score: 0.5
Natty:
Report link

✅ 1. Use socket.reconnectStrategy

In the modern node‑redis client (v4 and later), you don’t use the old retry_strategy option. Instead, you configure reconnection using the socket.reconnectStrategy option when creating a client:

js

CopyEdit

import{ createClient } from 'redis'; const client = createClient({ socket: { reconnectStrategy: (retries, cause) => { if (retries >= MAX_ATTEMPTS) { return new Error('Too many reconnect attempts'); } // Return a delay in ms before next retry return calculateDelay(retries); } } }); client.on('error', err => console.error('Redis error', err)); await client.connect();

This gives full control—you can stop after a fixed number or vary delay. npm+12Redis+12Stack Overflow+12Stack OverflowUNPKG+4Redis Documentation+4Snyk+4


📦 Legacy support: node-redis-retry-strategy package

If you're using legacy clients expecting retry_strategy, or you need a drop‑in function:

Example:

js

CopyEdit

constredis = require('redis'); const retryStrategy = require('node-redis-retry-strategy'); const client = redis.createClient({ host: '127.0.0.1', port: 6379, retry_strategy: retryStrategy({ number_of_retry_attempts: 7, delay_of_retry_attempts: 1000, wait_time: 600000 }) });

This is helpful if you’re migrating older code or using compatibility layers. UNPKGSnyk


🧠 Why migrations matter: how defaults changed


✅ Summary Table

ScenarioHow to set retry countExample behaviorNew node‑redis (v4+)Use socket.reconnectStrategyYour custom function handles limits and delayLegacy code expecting retry_strategyUse node-redis-retry-strategy packageConfigure with number_of_retry_attempts etc.


A friendly example of humanized explanation:

Imagine Redis connection drops. You want it to try reconnecting a few times—say 5 attempts—with increasing wait times. In modern node‑redis, you hand it a little function:

js

CopyEdit

reconnectStrategy: (retries, err) => { if (retries >= 5) return new Error('Reached retry limit'); return retries * 500 + Math.random() * 100; }

That way, if Redis goes offline, your app will give it up after the 5th try. Before then, it’s patiently trying again with a touch of randomness (jitter).

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

79723147

Date: 2025-08-02 05:51:51
Score: 2
Natty:
Report link

from docx2pdf import convert

# Convert the Word document to PDF

pdf_path = "/mnt/data/Theoretical_and_Conceptual_Framework_Formatted.pdf"

convert("/mnt/data/Theoretical_and_Conceptual_Framework_Formatted.docx", pdf_path)

pdf_path

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

79723144

Date: 2025-08-02 05:44:49
Score: 1
Natty:
Report link

Top 5 đồ dùng học tập không thể thiếu cho học sinh mỗi năm học mới

Mỗi dịp năm học mới đến, việc chuẩn bị đầy đủ đồ dùng học tập là điều vô cùng quan trọng để học sinh bước vào một hành trình học tập hiệu quả và tự tin. Dưới đây là danh sách những món đồ học sinh nào cũng nên có trong cặp sách của mình.

1. Bút viết – Công cụ không thể thiếu

Bút bi, bút máy, bút chì là những vật dụng quen thuộc trong mỗi giờ học. Việc chọn bút phù hợp với tay cầm, mực đều và không lem sẽ giúp nét chữ đẹp hơn, viết lâu không bị mỏi tay. Những thương hiệu như Thiên Long, Pentel hay Deli luôn được phụ huynh tin tưởng lựa chọn.

2. Tập vở – Bạn đồng hành mỗi ngày

Tập vở nên được chọn theo từng môn học, có dòng kẻ rõ ràng, giấy trắng, dày và không thấm mực. Việc phân loại vở theo từng môn giúp học sinh ghi chép gọn gàng và dễ dàng ôn tập khi cần.

3. Thước, compa và bộ dụng cụ học toán

Đối với học sinh cấp 2, cấp 3, bộ thước kẻ, eke, compa là những đồ dùng học tập cần thiết. Các sản phẩm nên có độ chính xác cao, làm từ nhựa tốt, không dễ gãy và không có cạnh sắc nhọn.

4. Balo và hộp bút

Một chiếc balo nhẹ, chống gù, nhiều ngăn sẽ giúp các em mang theo đầy đủ sách vở mà vẫn bảo vệ cột sống tốt. Hộp bút giúp sắp xếp dụng cụ viết một cách gọn gàng, tránh thất lạc.

5. Đồ dùng sáng tạo: Màu vẽ, giấy thủ công

Không chỉ phục vụ học tập, những món như màu nước, bút highlight, giấy màu… còn giúp học sinh phát triển tư duy sáng tạo, đặc biệt quan trọng ở bậc tiểu học và mầm non.


🎒 Mua đồ dùng học tập chất lượng ở đâu?

Hiện nay, các bậc phụ huynh có thể dễ dàng mua đồ dùng học tập học sinh chính hãng, an toàn và giá cả hợp lý tại Tên website của bạn – nơi cung cấp đầy đủ các sản phẩm từ bút viết, vở, balo, hộp bút đến đồ dùng mỹ thuật. Các sản phẩm đều được chọn lọc kỹ càng, phù hợp với từng độ tuổi và cấp học.


Kết luận

Chuẩn bị đầy đủ đồ dùng học tập không chỉ giúp học sinh học tốt mà còn rèn luyện tính ngăn nắp, chủ động. Đầu tư vào những món đồ học tập chất lượng là cách thiết thực để đồng hành cùng con trên chặng đường học vấn.

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

79723142

Date: 2025-08-02 05:43:49
Score: 1
Natty:
Report link

1. Check Your Redirect URIEnsure the redirect URI you specify in your code exactly matches (character by character) the one registered in your Instagram App settings.

The URI must use https (not http). Instagram does not allow non-HTTPS redirect URIs for security reasons.

Avoid using localhost unless it’s explicitly allowed in your app settings.

2. Validate Instagram App Configuration

Make sure you are using the correct Instagram App ID, not a Facebook App ID.

Double-check your Instagram Developer Dashboard that:

The redirect URI is whitelisted under “Valid OAuth Redirect URIs”.

Your app is in “Live” or “Development” mode as needed and the test users are assigned if in “Development”.

3. Initiate the OAuth Flow Correctly

When the user clicks “Login with Instagram”, redirect them to the Instagram OAuth endpoint (example URL structure):

[

https://api.instagram.com/oauth/authorize

?client_id=YOUR_APP_ID

&redirect_uri=YOUR_REGISTERED_URL

&scope=user_profile,user_media

&response_type=code

]

Use window.location.href = authUrl; in your front-end code to perform the redirect.

4. Handling the Redirect

After the user logs in on Instagram and authorizes, Instagram will redirect to your URI with a code parameter:

[ YOUR_REGISTERED_URL?code=AUTHORIZATION_CODE ]

Capture this authorization code from the URL.

5. Exchange Code for Access Token

In your backend, POST to https://api.instagram.com/oauth/access_token including:

client_id

client_secret

grant_type (set to authorization_code)

redirect_uri (same one)

codee (the one from Instagram)

Make sure the backend endpoint is reachable and working properly.

6. Common Pitfalls

Invalid redirect_uri: This is the most frequent error. Triple-check the matching and HTTPS requirement.

Wrong environment: If the app is not Live, only registered test users can log in.

Cache/cookies: Sometimes, browser caching or cookies can cause old values (clear them if issues persist).

App Secret/PKCE: Instagram Basic Display does NOT support PKCE, and requires you to send the app secret in the token request.

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

79723136

Date: 2025-08-02 05:33:47
Score: 2
Natty:
Report link

Get-MailboxStatistics -Database 'Mailbox Database 123' |

Where-Object {$_.TotalItemSize.Value.ToMB() -le 5} |

Sort-Object TotalItemSize -Descending |

Select-Object DisplayName,TotalItemSize

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

79723134

Date: 2025-08-02 05:32:46
Score: 1
Natty:
Report link

You don’t need a domain, but having one gives you credibility and makes registration easier.

technically you can register an app for OAuth2 with most providers like Google without owning a custom domain. But it's often smoother with a domain, because:

So, you can go domain-free... it just means you might have to live with a few restrictions or workarounds.

Will app registration work for others using your app?

It depends on the provider and how you register:

Apps like Thunderbird do this: they register themselves as a trusted application with providers like Google, then walk users through OAuth login. Each user gets their own token, and the app doesn’t need to know your password.

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

79723124

Date: 2025-08-02 04:51:38
Score: 1.5
Natty:
Report link

In your gradle.properties, add this:

android.aapt2Version=8.6.1-11315950
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jithesh Kumar

79723121

Date: 2025-08-02 04:39:36
Score: 2
Natty:
Report link

Turns out I forgot to import hdf5plugin in the separate ipynb that I used to read in the h5 file. It works now.

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

79723120

Date: 2025-08-02 04:37:35
Score: 2
Natty:
Report link

You use libx264rgb, however mileage may vary depending on how you plan to play it (for instance if I watch it in mpv it looks correct, but in chromium the colors looked very much wrong). libaom-av1, libvpx-vp9 and libx265 also support this via the gbrp pixel format.

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

79723112

Date: 2025-08-02 04:06:29
Score: 4
Natty:
Report link

ok, apparently this is just a bug

https://github.com/golang/go/issues/71497?issue=golang%7Cgo%7C74835

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

79723080

Date: 2025-08-02 02:43:11
Score: 0.5
Natty:
Report link

You can add a named range for each section, and use the Named ranges sidebar as a clickable jump pad.

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

79723072

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

So, this issue will appear any time your package.json's dependencies field is in an invalid state. Mordy's comment is one way to get this to happen, Raja Uzair Zia's answer is another way, and one more is if external tooling directly edits the package.json file. (Expo is especially bad about this. If you try to npx expo install any invalid package, it'll happily break your package.json trying to install it.)

A fix is to go into your package.json and ensure that all packages A) exist on npm with the exact name seen in your package.json, and B) have valid names and version numbers.

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

79723054

Date: 2025-08-02 01:08:54
Score: 2.5
Natty:
Report link

This usually means there's a naming conflict in your environment most likely you have a file or folder named google.py or a directory named google/ in your current working directory or Python path which conflicts with the actual google package

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

79723052

Date: 2025-08-02 01:02:52
Score: 3
Natty:
Report link

I just realized that I was totally mistaken, because Talend Global Variables are Global just wihin the Talend job where they are set, not within the Talend Project. Daaaaaahhh But I think it still can be done with the help of the repository context groups variables.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: António Manuel Paraíso Pinto

79723051

Date: 2025-08-02 00:58:51
Score: 2
Natty:
Report link

I solved this problem for my employer who is heavy into protobuf and wanted to use it for file formats.

https://medium.com/@unclepaul84/efficiently-reading-and-writing-very-large-protobuf-files-local-disk-and-s3-approaches-a289c8855606

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Whitelisted phrase (-2): I solved
  • Probably link only (1):
  • Contains signature (1):
  • Low length (1):
  • No code block (0.5):
Posted by: unclepaul84

79723047

Date: 2025-08-02 00:49:49
Score: 2.5
Natty:
Report link

I fix the problem by adding a line to index.css

@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

if you want to read more: how-i-fixed-tailwind-css-v4-dark-mode-not-working-in-a-vite-react-project

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

79723040

Date: 2025-08-02 00:05:41
Score: 2
Natty:
Report link

Made a PDF Filler that works with Claude Desktop, Cursor, or any MCP, and open sourced it on Github here: https://github.com/silverstein/pdf-filler-simple/
Claude featured it as one of its first desktop extensions, and the github repo has some additional features.

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

79723039

Date: 2025-08-02 00:03:41
Score: 0.5
Natty:
Report link

Login as others have said. This command works fine for me.

podman push localhost/<image_name>:<tag> docker.io/<username>/<image_name>:<tag>

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

79723032

Date: 2025-08-01 23:49:38
Score: 1.5
Natty:
Report link

Yes, you will effectively need a topic per aggregation (if you have more than one partition). How you do this setup, is up to you and there is different tradeoffs as you mentioned already. If you will be able to get ordering is questionable for any solution I can think of?

If you are comfortable with switching from .NET to Java (using Kafka Streams), it might be the option with least manual toil. -- When Kafka Streams repartitions the input data using different aggregation-keys, it would also use multiple (shuffle/repartition) topics, and would introduce unorder. But you don't need to touch your upstream application which writes into the input topic, and Kafka Streams does a lot of heavy lifting for you.

You could also stick with .NET, and mimic what Kafka Streams does, but it of course much more work. And the un-order when writing into the aggregation topics is the same problem.

But frankly, I am not sure if your business logic really requires strict ordering, so the above two options might actually just work for you?

If ordering is really crucial, it might be possible to improve it, by actually having one input topic per aggregation. But it seems to be difficult to guarantee that the upstream application is writing into all input topics in the same order? And if possible to achieve this, it of course requires changes to your upstream application.

Reasons:
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2): any solution I can think of?
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • High reputation (-2):
Posted by: Matthias J. Sax

79723028

Date: 2025-08-01 23:43:36
Score: 3.5
Natty:
Report link

Yep, there is typer-shell now: https://github.com/FergusFettes/typer-shell

Reasons:
  • Probably link only (1):
  • Low length (2):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Mark Parker

79723024

Date: 2025-08-01 23:29:34
Score: 1.5
Natty:
Report link

Use Unique Bundle Identifiers per Scheme

Modify the Info.plist entry for CFBundleIdentifier to use a variable (e.g.(BUNDLE_IDENTIFIER)):

Set a Custom BUNDLE_IDENTIFIER in Build Settings

Go to your Build Configurations (or each scheme's associated configuration like Debug, Release, Mock) and add different Scheme and BUNDLE_IDENTIFIER

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

79723010

Date: 2025-08-01 22:44:24
Score: 0.5
Natty:
Report link

If you can structure your code so that the classes which contain this file system code can take a construct-only property saying which path to access, which defaults to the hardcoded one, then you can instantiate those classes with a test directory when running the code in a unit test.

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

79723009

Date: 2025-08-01 22:38:23
Score: 0.5
Natty:
Report link

You’re running into a classic SPA problem—history navigation (navigate(-n)) in React Router is async, so if you immediately try to do a “replace” after going back, it’ll probably happen too soon and mess up your navigation stack.

I’ve hit this myself, and yeah, stuff like timeouts and session storage might seem to work, but they’re hacky and break easily, especially in production or different browsers.


Here’s what’s actually reliable:

Let React Router’s location tell you when the navigation is done, then do your replace.
This way you don’t need to guess, wait, or stash state anywhere weird.

Drop-in Hook (for React Router v6/v7):

import { useNavigate, useLocation } from "react-router-dom";
import { useState, useEffect } from "react";

// Usage: const backAndReplace = useAtomicBackReplace();
//        backAndReplace(-3, "/new-route");
function useAtomicBackReplace() {
  const navigate = useNavigate();
  const location = useLocation();
  const [pending, setPending] = useState(null);

  function backAndReplace(steps, to) {
    setPending({ steps, to, from: location.pathname });
    navigate(steps);
  }

  useEffect(() => {
    if (pending && location.pathname !== pending.from) {
      navigate(pending.to, { replace: true });
      setPending(null);
    }
  }, [location, pending, navigate]);

  return backAndReplace;
}

How do you use it?
Just call backAndReplace(-3, "/your-new-route") wherever you’d normally want to do the navigation+replace.


Why bother with this instead of a setTimeout?

Because:

Browsers and environments differ in timing, so setTimeouts can fail randomly.

Session storage is overkill for something that’s just local UI navigation.

This “listens” for the navigation to finish, so you don’t need to guess.

Real-world usage:



const backAndReplace = useAtomicBackReplace();
// Example: Go back 3 steps, then replace that entry
backAndReplace(-3, "/new-route");
Reasons:
  • Blacklisted phrase (1): How do you
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Saravanan Nandhan

79723006

Date: 2025-08-01 22:26:20
Score: 3
Natty:
Report link

you need compile the project first to work outyou need compile the project first to work out

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

79722996

Date: 2025-08-01 22:13:17
Score: 1
Natty:
Report link

Yes, user-uploaded SVG files can indeed pose an XSS (Cross-Site Scripting) risk because SVG files can include executable JavaScript code. While you could sanitize SVG files using regular expression (regex) functions, this approach can be error-prone and might not catch all vulnerabilities.

The recommended best practice is to use specialized and up-to-date sanitization libraries:

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

79722994

Date: 2025-08-01 22:06:15
Score: 3
Natty:
Report link

TL,DR; It has become impossible. Avoid to cause any circumstances where IntelliJ IDEA wants to ask for more refactoring in a modal dialog.

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

79722977

Date: 2025-08-01 21:43:09
Score: 0.5
Natty:
Report link

Assuming it is 2 dimensional:

np.random.default_rng().permuted(Xtrain, axis=1)

np.random.default_rng().permuted(np.arange(9).reshape((3,3)), axis=1)
Out[6]: 
array([[0, 2, 1],
       [3, 4, 5],
       [8, 6, 7]])
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: omsrisagar

79722974

Date: 2025-08-01 21:39:08
Score: 1
Natty:
Report link

I use gclip and pclip from:

https://sourceforge.net/projects/unxutils/

Windows programs. Put them in a directory in your path and:

command | gclip # to load clipboard

pclip | command # to access clipboard

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

79722967

Date: 2025-08-01 21:30:06
Score: 2.5
Natty:
Report link

I think cygwin already does that. When I run my "Cygwin64 Terminal" that brings up mintty the path already has the Windows path in it.

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

79722952

Date: 2025-08-01 21:10:02
Score: 1.5
Natty:
Report link

1. Check pubspec.yaml

  assets:
    - assets/videos/disclaimer.mp4

make sure you have the correct path for your video player inside the assets folder.

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

79722951

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

Trouble shooting the infinite loop

  1. Configuration files have been addressed.

  2. The fact that an infinite loop can cause this issue has also been addressed.

  3. Increasing access to memory when there's a code error causing the consumption will result in disruptions for other users, if you're hosted on a shared server.

Here's a potential cause for your infinite loop, especially if you're using object oriented PHP.

Say you have two classes, one extends the other.

In your __construct of your child class, you may accidentally type something like this:

public function \__construct($myInitalizingInput){  
    self::\__construct($myInitalizingInput)  
}  

Notice the self:: ?

It should be parent::

Entering self on accident will result in fork bomb-like conditions.

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

79722949

Date: 2025-08-01 21:04:58
Score: 13.5
Natty: 6
Report link

Do you find any solution? i have the same question, since the max scene model limitation, i need to know if is posible to save and load the models

Reasons:
  • Blacklisted phrase (1): i have the same question
  • Blacklisted phrase (0.5): i need
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2.5): Do you find any
  • RegEx Blacklisted phrase (2): any solution?
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): i have the same question
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Daniel Gómez

79722935

Date: 2025-08-01 20:39:53
Score: 5.5
Natty: 6.5
Report link

What about be the best trigger to use in this case? Purchase? or as soon as the hashed email OR phone are available?

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): What
  • Low reputation (1):
Posted by: BackY

79722934

Date: 2025-08-01 20:38:52
Score: 1
Natty:
Report link

While SaaS providers’ private clouds may look similar to internal IT infrastructure at a high level (i.e., both are private, dedicated environments), they are fundamentally different in design philosophy, operational maturity, and customer-facing reliability. SaaS private clouds are engineered with cloud-native principles, extreme resilience, and service-level guarantees — far beyond what traditional internal IT usually provides.

So yes, both are "private" in terms of access, but SaaS providers' private clouds are purpose-built to serve external customers at scale, with enterprise-grade resilience and automation, unlike traditional internal IT.

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

79722923

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

For SageMath 'threejs' views of Graphics objects (as of mid-2025), the output cell is enclosed in an <iframe> element which seems to have a hard-coded height attribute. None of the methods previously posted here to increase the height worked for me for such output cells. So here are two workarounds for this fixed height, both of which did work in my case:

  1. Call the .show() method for the Graphics object that is using the 'threejs' viewer with the online=True option. Then in the resulting output cell, click the small circle-i info icon in the bottom right, and select the "Save as HTML" option. Save the resulting HTML to a local file, and then open that directly in a new window/tab in your browser via a file:///... URL. The graphics will re-render in that new window/tab, taking up your full browser window.

  2. Or, if you prefer not to open a separate window/mess with file:///... URLs, you can instead open the Developer Tools for your browser (e.g., in Firefox under the "More Tools" submenu of the main menu), and then select the (DOM) Inspector for your Developer Tools. Navigate to the <iframe> element of the graphics output cell in question (e.g., using the click-to-select button, and/or by moving within the tree until that element is selected). Then add a height: 100vh attribute to the element with the live CSS editor for the element (for example in the Firefox Developer Tools, this is just a text box to the right of the DOM display with the header "element {" that you can type directly into). Note this method only persists until the next time you re-run that cell.

Of course, I'd prefer some way of just setting that threejs viewer iframe height within the Sage Jupyter notebook itself -- if anybody knows of one, please post.

Reasons:
  • Blacklisted phrase (1): anybody know
  • Whitelisted phrase (-1): worked for me
  • RegEx Blacklisted phrase (2.5): please post
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Glen Whitney

79722922

Date: 2025-08-01 20:19:48
Score: 1
Natty:
Report link

Sometimes the FastReport folks reintroduce a bug that makes PDFs huge when you set AllowHTMLTags to true in order to use HTML tags in your TfrxMemoView objects, such as <b></b> for bold, or <i></i> for italics.

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

79722915

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

could someone please solve this issue. I am literally wasting hours on this issue and unable to fix it.

here is what i know about this problem. it's very weird stay with me for a second. so if I add the supa base related dependencies and then sync my project and run my code, it still runs. but if I add the use of those dependencies as in create a client. it stops. here is the crazy part. if I keep the imports and remove the code, the error persists and finally when I remove the import the error doesn't go away so now I have to remove the dependencies sync the project again, and then the app runs again. i don't even have the slightest clue about how to even begin solving this problem. it just simply says source must no be null. superbase << supanothelpfull

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

79722913

Date: 2025-08-01 20:01:44
Score: 2.5
Natty:
Report link

Found a solution using regex filtering: $.store.book[?(@.isbn =~ //)]

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Dmitry E.

79722907

Date: 2025-08-01 19:52:43
Score: 2
Natty:
Report link

You're running into a limitation of the free FPDI parser, which can't handle modern PDF compression (e.g., PDFs using object streams or compressed xref tables). The easiest and PHP-native way to handle this without relying on exec() is to use libmergepdf with the TcpdiDriver.

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

79722900

Date: 2025-08-01 19:35:39
Score: 0.5
Natty:
Report link

You can use multiple comma-delimited child selectors:

$.commits[*]['added', 'removed'][*]
Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tomas Petricek

79722893

Date: 2025-08-01 19:26:37
Score: 1
Natty:
Report link

Amazing solution, I used a simple variation of this solution like below:

- uses: actions/github-script@v6
  id: meta
  env:
    input_ctx: ${{ toJSON(inputs) }}
  with:
    script: |
        // Get input args
        const inputs = process.env?.input_ctx ?? {};
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: PULKIT KAPOOR

79722892

Date: 2025-08-01 19:25:36
Score: 5
Natty:
Report link

I am having the same issue with this package.json:

{
  "name": "wanderbuddies",
  "version": "1.0.0",
  "main": "index.ts",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "2.1.2",
    "@react-native-community/datetimepicker": "8.4.1",
    "@react-native-picker/picker": "^2.11.1",
    "@react-navigation/bottom-tabs": "^7.4.4",
    "@react-navigation/native": "^7.1.16",
    "@react-navigation/stack": "^7.4.4",
    "@types/react-native-vector-icons": "^6.4.18",
    "axios": "^1.11.0",
    "expo": "~53.0.20",
    "expo-av": "~15.1.7",
    "expo-clipboard": "~7.1.5",
    "expo-document-picker": "~13.1.6",
    "expo-file-system": "~18.1.11",
    "expo-image": "~2.4.0",
    "expo-image-picker": "~16.1.4",
    "expo-intent-launcher": "~12.1.5",
    "expo-sharing": "~13.1.5",
    "expo-status-bar": "~2.2.3",
    "expo-web-browser": "~14.2.0",
    "react": "19.0.0",
    "react-native": "0.79.5",
    "react-native-date-picker": "^5.0.13",
    "react-native-gesture-handler": "^2.27.2",
    "react-native-image-picker": "^8.2.1",
    "react-native-paper": "^5.14.5",
    "react-native-safe-area-context": "5.4.0",
    "react-native-screens": "~4.11.1",
    "react-native-vector-icons": "^10.3.0",
    "react-native-webview": "13.13.5"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@types/react": "~19.0.10",
    "typescript": "~5.8.3"
  },
  "private": true
}

Has someone solved it yet?

Reasons:
  • RegEx Blacklisted phrase (1.5): solved it yet?
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I am having the same issue
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Mazhar Ali

79722890

Date: 2025-08-01 19:23:35
Score: 1.5
Natty:
Report link

You Can Use onnxruntime Package To Run Onnx Model Directly Into Your Flutter App Rather Than Converting It Into Tflite Then Doing it.

Reasons:
  • Whitelisted phrase (-1.5): You Can Use
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Nikhil Wankhede

79722885

Date: 2025-08-01 19:13:32
Score: 1
Natty:
Report link

I dont think it can be done with 5 swaps and remain stable. 5 swaps and unstable, yes.

The reason I say this is swapping for non-contiguous elements is required for 5 swaps but in so doing, that defeats stability. Insertion Sort or Bubble Sort will guarantee stability but you are making sure that no contiguous element is not compared.

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

79722884

Date: 2025-08-01 19:13:32
Score: 2.5
Natty:
Report link

I've concluded that it is just not possible to modify query parameters with a proxy integration. One part of AWS docs says that it's possible, but all examples provided are for non-proxy integrations. My testing has confirmed that it's not possible.

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

79722883

Date: 2025-08-01 19:11:32
Score: 3
Natty:
Report link

We had same issue after changing ownership of the MQ Domain service account. After removing/adding the same AD groups, everything worked. I think the error is not exactly related to read the group membership, but finding the account in the correct groups.

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

79722867

Date: 2025-08-01 18:52:27
Score: 1.5
Natty:
Report link

Note that this answer might not have been an option at the time of this question.

Give your cell a range name:

enter image description here

With your cell selected click From Table/Range on the Data menu.

enter image description here

Power Query opens with the parameter in a query with the type automatically detected.

enter image description here

Right-click the parameter value and select drill down.

enter image description here

The query now returns a number and can be used in M-code.

enter image description here

There is a problem if your parameter is text. Power Query will try to be helpful and promote it to a column header.

enter image description here

You'll have to delete that from the resulting query and change the type to text.

enter image description here

Here is what it looks like after deleting the Promoted Headers and Changed Type steps, and adding the new Changed Type and Drill Down steps. I used the GUI and am showing the Advanced Editor for reference.

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: DavidG

79722847

Date: 2025-08-01 18:17:19
Score: 4
Natty:
Report link

Any updates? I'm seeing the same behavior.

enter image description here

Reasons:
  • RegEx Blacklisted phrase (0.5): Any updates
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: mariomenjr

79722844

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

JavaFX WebView is kinda stuck in the past when it comes to WebGL support, which is exactly what MapLibre needs. That's why it works fine when you open the HTML directly in Chrome but WebView just gives you a blank screen.

A couple ways you could go with this:

You could try using CDN links instead of local files - sometimes WebView gets weird with those relative paths. Something like:

HTML

<link href="https://cdn.jsdelivr.net/npm/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/maplibre-gl/dist/maplibre-gl.js"></script>

Honestly though? For a school project, I'd probably just ditch WebView entirely and grab GMapsFX or JxMaps. Saved me a ton of headaches when I was working on something similar.

in my understating try using logging to help understand what is actually failing , my advice would be to ditch webView for now cause of compatibility issue this does not answer your question but might help you move in right direction for this

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

79722842

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

The latest version definitely supports clicking on screenshots:

>>> import pyautogui
>>> button7location = pyautogui.locateOnScreen('calc7key.png', confidence=0.9)
>>> button7location
Box(left=1416, top=562, width=50, height=41)

Documentation here

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

79722833

Date: 2025-08-01 17:58:16
Score: 0.5
Natty:
Report link

Several years later, a simpler solution using geom_function() and only ggplot2 (version 3.5.2).

The approach is again the same as in this answer

# add variable to split by combination of year and generation
fantasy_df$yearxgen <- paste(fantasy_df$centralYear, fantasy_df$generation, sep = 'x')
# turn generation into a facto
fantasy_df$generation <- as.factor(fantasy_df$generation)

# initialize plot
gp <- ggplot()
# loop over combined variable, limit data to one combination of year and
# generation, plot scaled density with those params
for (i in unique(fantasy_df$yearxgen)){
  gp <- gp + geom_function(data = fantasy_df[fantasy_df$yearxgen == i,], 
                           fun = function(x, mu, sigma, lambda) lambda * dnorm(x, mu, sigma), 
                           args = list(mu = fantasy_df[fantasy_df$yearxgen == i,'mu'], 
                                       sigma = fantasy_df[fantasy_df$yearxgen == i,'sigma'], 
                                       lambda = fantasy_df[fantasy_df$yearxgen == i,'lambda']), 
                           xlim = c(0,400), aes(color = generation))
}
# split by variable
gp <- gp + facet_grid(centralYear ~ .)
# show plot
print(gp)
ggsave('figure.png')

enter image description here

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

79722830

Date: 2025-08-01 17:54:14
Score: 3
Natty:
Report link

Solved here

Add the package (via npm or yarn) jest-fixed-jsdom Then in jest.config.js

module.exports = {
  ...
  testEnvironment: 'jest-fixed-jsdom',
  ...
}

Reason (fullly explained here) jest-environment-jsdom pollyfills many core function that broke node compatibility

Thanks to @EstusFlask

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @EstusFlask
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Daniel Reinaldo Zorro Forero

79722826

Date: 2025-08-01 17:53:14
Score: 3
Natty:
Report link

With this solution you can resolve your problem related to connectivity of database engine.

thanks for this solution i am from last 5 days to resolve my this issue.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rahul Bilkar

79722824

Date: 2025-08-01 17:52:13
Score: 1
Natty:
Report link

#!/system/bin/sh

echo "🔧 Starting DesireMODULO Final..."

# Variables

resolution_x=1170

resolution_y=2532

dpi=460

sleep 1

echo "🎯 Setting resolution to ${resolution_x}x${resolution_y} and DPI to ${dpi} (simulated)"

sleep 1

# Disable animations for better performance

settings put global window_animation_scale 0

settings put global transition_animation_scale 0

settings put global animator_duration_scale 0

sleep 1

echo "🎯 Fire Button Size: 46 (Set manually in game)"

sleep 1

echo "🎯 Activating Aim Drag X=7.45 Y=7.30"

sleep 1

echo "✔️ Aim Optimizer Activated"

sleep 1

echo "🌐 Enabling Ping Boost..."

# Enable mobile data

svc data enable

sleep 1

echo "🔥 Thermal & GPU Boost Simulated"

sleep 1

echo "🧹 Clearing cached apps (simulated)..."

sleep 1

echo "🧠 Virtual RAM Boost Simulated..."

sleep 1

echo "🎮 Launching Free Fire..."

am start -n com.dts.freefireth/com.dts.freefireth.FFMainActivity

sleep 2

echo "✅ DesireMODULO Final Applied!"

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

79722803

Date: 2025-08-01 17:29:07
Score: 2.5
Natty:
Report link

Evitez les caractères spéciaux comme [#-~] lors de la configuration du mot de passe !
Ça devrait aller!

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

79722802

Date: 2025-08-01 17:27:07
Score: 4
Natty:
Report link

GO TO SETINGS AND ENABLE MINI MAP

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

79722787

Date: 2025-08-01 17:11:03
Score: 2.5
Natty:
Report link

Too bad I didn't see this 12 years ago. CIMPLICITY Screen editor has an option to save the *.cim file as a *.ctx file which all ascii text. Then you can search in notepad. Also, good rule of thumb is to keep all the scripting subroutines at the top level, Screen Object, and not spread them all out into the child screen objects.

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

79722782

Date: 2025-08-01 17:05:02
Score: 0.5
Natty:
Report link

Thank you, @Cagri ! Your example works for me too.
But we create mm2 connector in distributed mode using kafka connect restAPI and it works differently.
I've found the solution. It turns out there're group of specific parameters like that:

source.consumer.security.protocol
target.producer.security.protocol
source.admin.security.protocol
target.admin.security.protocol

and so on. So now my config looks like this and it works:

//mm2.json
{
  "name": "my_mm2_connector",
  "config":
{
  "connector.class": "org.apache.kafka.connect.mirror.MirrorSourceConnector",
  "source.cluster.alias": "src",
  "target.cluster.alias": "tgt",
  "source.cluster.bootstrap.servers": "kafa_sasl_ssl:9092",
  "target.cluster.bootstrap.servers": "kafka_plaintext:9092",
  "topics": "test_topic",
  "tasks.max": 1,
  "replication.factor": 1,
  "offset-syncs.topic.replication.factor": 1,
  "offset-syncs.topic.location": "target",
  "enabled": true,
  "source.security.protocol": "SASL_SSL",
  "source.ssl.keystore.type": "JKS",
  "source.ssl.truststore.type": "JKS",
  "source.ssl.truststore.location": "/opt/ssl/kafka.truststore.jks",
  "source.ssl.keystore.password": "changeit",
  "source.ssl.keystore.location": "/opt/ssl/kafka.keystore.jks",
  "source.ssl.truststore.password": "changeit",
  "source.sasl.mechanism": "PLAIN",
  "source.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"kafka\" password=\"kafka-password\";",
  "source.consumer.security.protocol": "SASL_SSL",
  "source.consumer.ssl.keystore.type": "JKS",
  "source.consumer.ssl.truststore.type": "JKS",
  "source.consumer.ssl.truststore.location": "/opt/ssl/kafka.truststore.jks",
  "source.consumer.ssl.keystore.password": "changeit",
  "source.consumer.ssl.keystore.location": "/opt/ssl/kafka.keystore.jks",
  "source.consumer.ssl.truststore.password": "changeit",
  "source.consumer.sasl.mechanism": "PLAIN",
  "source.consumer.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"kafka\" password=\"kafka-password\";",
  "source.admin.security.protocol": "SASL_SSL",
  "source.admin.ssl.keystore.type": "JKS",
  "source.admin.ssl.truststore.type": "JKS",
  "source.admin.ssl.truststore.location": "/opt/ssl/kafka.truststore.jks",
  "source.admin.ssl.keystore.password": "changeit",
  "source.admin.ssl.keystore.location": "/opt/ssl/kafka.keystore.jks",
  "source.admin.ssl.truststore.password": "changeit",
  "source.admin.sasl.mechanism": "PLAIN",
  "source.admin.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"kafka\" password=\"kafka-password\";",
  "target.security.protocol": "PLAINTEXT"
}
}

root@kafka$>curl -X POST -H "Content-Type: application/json" http://kafka-connect:8083/connectors -d @mm2.json
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Whitelisted phrase (-1): works for me
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Cagri
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Cumba

79722781

Date: 2025-08-01 17:04:01
Score: 0.5
Natty:
Report link

Starting 2025.2, PyCharm will show inlay hints next to reveal_type() calls:

a = [0] + ['']; reveal_type(a); list[str | int]

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

79722775

Date: 2025-08-01 16:52:58
Score: 1
Natty:
Report link

I've added these values to the docker composer yml, to increase the recourse, and the error has gone

deploy:
      resources:
        limits:
          memory: 4G
          cpus: '2.0'
        reservations:
          memory: 1G
          cpus: '0.5'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Isolde Ruano

79722745

Date: 2025-08-01 16:12:49
Score: 1
Natty:
Report link

For anyone who has the same problem

Finally, the issue was not caused by Mapster or HotChocolate, but it was a misconfiguration for DDD ValueObject for EF itself.

Instead of

public static class AdminModelBuilderExtension
{
    public static void ConfigureAdminModule(this ModelBuilder modelBuilder)
    {    
        modelBuilder.Entity<LegalEntity>(entity =>
        {
            entity
                .Property(le => le.Label)
                .HasConversion(le => le.Value, v => Label.Create(v).Value);

            entity.HasIndex(le => le.Label).IsUnique();
        });
    }
}

The well suited configuration for a DDD is by using ComplexProperty, as mentionned for example in this article

In my case, the configuration has switch to

public static class AdminModelBuilderExtension
{
    public static void ConfigureAdminModule(this ModelBuilder modelBuilder)
    {    
        modelBuilder.Entity<LegalEntity>(entity =>
        {
            entity.ComplexProperty(
                le => le.Label,
                label =>
                    label
                        .Property(l => l.Value)
                        .HasColumnName(StringHelper.ToSnakeCase(nameof(LegalEntity.Label)))

            // Index cannot be created on complexProperty
            // They are instead manually created in the migration
            // https://github.com/dotnet/efcore/issues/17123
        });
    }
}

However, as you can see, EF fluent API doesn't allow to set index directly on complexProperty. Those index must be created manually in your migration file.

Working with that setup, all previous

LegalEntity? test = await dbContext
    .LegalEntities.OrderBy(le => le.Label)
    .FirstOrDefaultAsync(CancellationToken.None);

doesn't work anymore, and should always be updated to

LegalEntity? test = await dbContext
    .LegalEntities.OrderBy(le => le.Label.Value)
    .FirstOrDefaultAsync(CancellationToken.None);
Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Rémi Lamotte

79722738

Date: 2025-08-01 16:05:46
Score: 5
Natty: 5
Report link

I tried MimeMessage.saveChanges und .writeTo but the .eml file opened by outlook is not editable, I cant enter to-adress, body text (...) . How to manage it?

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

79722732

Date: 2025-08-01 15:58:44
Score: 4.5
Natty: 5.5
Report link

It seems that there is a solution at below

https://github.com/microsoft/vscode/issues/65232

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

79722728

Date: 2025-08-01 15:49:41
Score: 1
Natty:
Report link

Just a quick reference example for every future user:

docker  run -d --name test_container -p 172.26.128.1:8082:1880 
  --health-cmd="curl -f http://localhost:8080/health || exit 1" 
  --health-interval=5s 
  --health-timeout=2s 
  --health-retries=1
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: MRTuCc

79722720

Date: 2025-08-01 15:44:39
Score: 1
Natty:
Report link

I had a similar problem with exiftool.

exiftool IMG_0220.JPG > /dev/clipboard

This left the Windows clipboard unchanged. To make sure a Cygwin program was writing to the clipboard, I changed it into the following. And that worked:

exiftool IMG_0220.JPG | cat > /dev/clipboard
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Paul Braakman

79722706

Date: 2025-08-01 15:30:36
Score: 2
Natty:
Report link

Read doesn't guarantee a null terminated string, which when tokenizing it and reusing that string, will leave old data in the input if the new data doesn't overwrite it. Like Ian and Weather vane mentioned it's best to use an alternative like getline() or fgets() .

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

79722705

Date: 2025-08-01 15:29:36
Score: 1.5
Natty:
Report link

I copied and adapted the ScrollBar from the sample app from Google, NowinAndroid: https://github.com/android/nowinandroid/tree/main/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar

At least, until there's a built-in option.

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

79722697

Date: 2025-08-01 15:22:34
Score: 2
Natty:
Report link

AFAIK, it is a TActionMainMenuBar in combination with a TActionManager.

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

79722689

Date: 2025-08-01 15:14:32
Score: 1.5
Natty:
Report link

With a quick search you should be able to find a distribution of GNU utilities for Windows.

As a specific tool for your use case I would suggest the Windows compiled version of sed. https://www.gnu.org/software/sed/sed.html

The full list of GNU utilities (https://www.gnu.org/software/software.html) includes many other desirable utilities, such as bash, coreutils, emacs, gawk, gcc, grep, groff, sed, tar, wdiff, and wget.

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

79722687

Date: 2025-08-01 15:14:32
Score: 0.5
Natty:
Report link

I had the same problem, my solution was to deactivate and reactivate my Conda env.

conda deactivate

then

conda activate ./.conda
Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: figredos

79722673

Date: 2025-08-01 15:02:29
Score: 3.5
Natty:
Report link

Have decided to change the model to use lists instead of arrays. Now working.

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

79722670

Date: 2025-08-01 15:01:28
Score: 5
Natty:
Report link

Found the answer here: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/map-static-files?view=aspnetcore-9.0

I needed to use UseStaticFiles() in my program.cs.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Xephis

79722647

Date: 2025-08-01 14:38:23
Score: 1.5
Natty:
Report link

I believe the problem is that you're running into a Django limitation:

ForeignKey fields auto-create a <field>_id attribute at the database level, so you cannot have both a model field named source_id and a ForeignKey source field, which causes the clash.

As @willeM_VanOnsem suggested, use an @property as a limited workaround.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @willeM_VanOnsem
  • Low reputation (1):
Posted by: alexander-shelton

79722643

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

If you are comfortable with defining the document data structure the task of reading, parsing, and merging multiple structured text files via Perl is relatively straight forward. Yes, it's another language with which you probably should be comfortable anyway, but it's an easy one to pick up and building a structured hash in Perl to assemble structured data is one of the primary features of the language.

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

79722639

Date: 2025-08-01 14:30:21
Score: 0.5
Natty:
Report link

In python class attributes are inherited, but the inheritance mechanism is not fully in effect when Python is resolving names during the execution of the child class's body.

Python follows a specific search path for the name CONF_CONST_POWER:

To access an attribute from the parent class during the child class's definition, you must explicitly reference the parent class name.

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

79722633

Date: 2025-08-01 14:26:21
Score: 0.5
Natty:
Report link

If you have the absolute path to the file the following is likely what you want:

Path path = new Path("D:\\test\\testfile.txt"))
IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);

... where Path is org.eclipse.core.runtime.Path. Bit easier that iterating, even though in @greg-449 's answer you should only have one entry in the array ;-)

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @greg-449
Posted by: Dave Carpeneto

79722630

Date: 2025-08-01 14:26:20
Score: 13
Natty: 8
Report link

I have the same problem in colab, any solution yet? Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): I have the same problem
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2): any solution yet?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Natalia

79722625

Date: 2025-08-01 14:22:19
Score: 3.5
Natty:
Report link

nice to see that others have tried similar attempts to mine, however the khan academy website doesn't let me use math.floor()

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

79722624

Date: 2025-08-01 14:22:19
Score: 1
Natty:
Report link

go to tsconfig.app.json

you will see:

"erasableSyntaxOnly": true,

change this to:

"erasableSyntaxOnly": false,
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: sultan s. alfaifi

79722619

Date: 2025-08-01 14:15:18
Score: 5
Natty:
Report link

So I dont have enough reputation points yet to comment or upvote, but the answer of "Insert name here" absolutely works. I've been looking for this for too long and cant believe that I finally found an answer. Thank you very much!
The issue is, that this post does not pop up to "Adding internal hyperlinks to runs in python pptx", which I think most people (including myself) searched for.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): to comment
  • Blacklisted phrase (0.5): upvote
  • RegEx Blacklisted phrase (1.5): I dont have enough reputation points
  • No code block (0.5):
  • Low reputation (1):
Posted by: GergaBendi

79722618

Date: 2025-08-01 14:14:17
Score: 1
Natty:
Report link

I recently done this so here is the process -

you need to save swiftData normally then take the new model struct with the same properties in swiftdata model for firebase ( just difference that in firebase struct you shouldn't make any property var and no init ) then using function sync the data of firebase and swiftdata which you have to keep in async ( the functions) .

Then call those function where you want that this should not be proceeded without syncing the data.

Write the functions for changing , adding new and syncing data for firebase (you'll get this help from gpt or some other stuff)

Then you are good to go .....!!!

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

79722599

Date: 2025-08-01 13:57:13
Score: 1
Natty:
Report link

I've added the CSS config from old vCenter 7 to the vCenter 8 UI by using Tampermonkey:

// ==UserScript==
// @name         Recover nowrap in vCenter
// @namespace    http://tampermonkey.net/
// @version      2025-08-01
// @description  Recover nowrap in vCenter
// @grant        GM_addStyle
// @include *
// ==/UserScript==



(function() {
    //'use strict';

    GM_addStyle('clr-dg-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }');
})();
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: daniel0290

79722586

Date: 2025-08-01 13:44:10
Score: 0.5
Natty:
Report link

I'm also relatively new the React Native Expo ecosystem, but I have found Expo Go finicky and prone to error (especially the QR code!) unless you use the basic Expo Go out of the box. For example, setting up a user auth flow is a nightmare with just Expo Go. I dispensed with Expo Go entirely and just use npx expo prebuild, which uses Xcode to compile and install your custom app onto a simulator or device (no tunnels or network errors). I'm not sure if that'll resolve your issue, but using the less convenient but more flexible approach helped me work through things!

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

79722575

Date: 2025-08-01 13:38:09
Score: 3
Natty:
Report link

I have been getting this problem like whenever i close the keyboard text input shifts slighlty upwards.

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

79722553

Date: 2025-08-01 13:15:04
Score: 1.5
Natty:
Report link

Nothing like a good night of sleep...

I was able to solve this issue with a bit of help. As expected, pydub is calling internally ffmpeg, so I have to rather to add it in the path manually via `os`, that is:

os.environ["PATH"] = ffmpeg_dir + os.pathsep + os.environ.get("PATH", "")

And there you go!

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

79722549

Date: 2025-08-01 13:13:02
Score: 4
Natty: 4
Report link

If we have to go through the long way of creating a new temporary file and copying the content of the previous files into the temporary file, renaming and deleting the previous file...

Than why are std::ios::beg, std::ios::cur and std::ios::end existing?

I mean what, what exactly are there use?

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

79722546

Date: 2025-08-01 13:12:02
Score: 1
Natty:
Report link

Just had a similar attack myself. I don't use wordpress but need php for form submissions. Someone injected an index.php file into public_html that prevented index.html from being read. Removing index.php didn't work as it kept coming back.

I found another, similar file called template.html in a subfolder and also noticed that index.html had the wrong file size. Deleting the template.php file and uploading a good copy of index.html seems to have worked, but I've also made public_html read-only.

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

79722536

Date: 2025-08-01 13:02:58
Score: 6.5
Natty:
Report link

Is there any way you can go at the compression from the other direction and have the dashboard decompress?

Reasons:
  • Blacklisted phrase (1): Is there any
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Is there any
  • Low reputation (1):
Posted by: Keith Higgs

79722532

Date: 2025-08-01 12:55:56
Score: 1.5
Natty:
Report link

I was using MSSQL connection open in my vb6 file

    Dim cnn As ADODB.Connection
    Dim rst As ADODB.Recordset
    Set cnn = New ADODB.Connection
    cnn.Open strConn 'where the error was thrown as in my question

I migrated to aspx web site and

  1. set permission for the exe to everyone security add everyone with all permissions

  2. then I called Process.Start from C# aspx website as per this answer

    Process proc = new Process();
    proc.StartInfo.FileName = "SAP_to_MSSQL.exe";
    proc.WorkingDirectory = @"D:\exepath\";
    proc.StartInfo.UseShellExecute = true;
    proc.StartInfo.Verb = "runas";
    proc.Start();

and it runs fine from my IIS-hosted aspx web site. Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user3103982

79722531

Date: 2025-08-01 12:54:56
Score: 1
Natty:
Report link

Yes. You can move to NAA and you will get sample code here

Office-Add-in-SSO-NAA

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Shyam sundar shah

79722527

Date: 2025-08-01 12:50:55
Score: 2.5
Natty:
Report link

I know this has been closed a long time ago but...

How does "protected" modifier come into play here?
Quarkus should be able to find the property and set it without using Reflection right?

Trying to work between checkstyle:visibilitymodifier and Quarkus package-private recommendations to avoid reflection.

Thanks!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ercaron

79722514

Date: 2025-08-01 12:32:50
Score: 2
Natty:
Report link

Yo lo hice asi:

$bd_empresa='tubasededatos';
$host='nombrehost';
$usuariobd = 'nombre usuario';
$clave = 'clave';
  //Conexion
   $dsn = "mysql:dbname=$bd_empresa;host=$host;charset=utf8";

try {
    $conn_emp = new PDO($dsn, $usuariobd, $clave, array(
                    PDO::MYSQL_ATTR_LOCAL_INFILE => true,));
    $conn_emp->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $conn_emp->exec("set names utf8");
    $conn_emp->query("SET SESSION sql_mode = ''");
    echo 'Conexion establecida<br>';
} catch (PDOException $e) {
    echo utf8_decode('Fallo en la conexión: ') . $e->getMessage();
}
function valida_index($tabla, $index){
    global $conn_emp;
    $Rindex=0;
    $siindex = "SHOW INDEX FROM $tabla WHERE KEY_NAME = '$index'";
    try{
       $Qindex = $conn_emp->query($siindex);
    }catch (PDOException $e) {
       echo utf8_decode('No se pudo consultar la informacion suministrada: ') . $e->getMessage();
       return $Rindex;
   }
   $Rindex = $Qindex->rowCount();
   return $Rindex;
}



$index = 'tuindice'; //Debe ser el nombre de un campo de la tabla
$tabla = 'tutabla';

$Rindex = valida_index($tabla, $index);

//echo $Rindex.'<br>';
if($Rindex>0){
   echo "Ya existe un indice: $index en esa tabla: $tabla<br>";
}else{
   $Tcolum = "ALTER TABLE $tabla ADD INDEX ($index)";
   try{
      $Qcolum =  $conn_emp->query($Tcolum);
      $Qcolum->closeCursor();
   }catch (Exception $e){
      echo utf8_decode('No se pudo crear el indice. Revise que este bien el nombre de la tabla y el campo del indice<br>') . $e->getMessage();
      return;
   }
   echo "El indice: $index fue creado, en la tabla: $tabla";
}
return;
Reasons:
  • Blacklisted phrase (2): crear
  • Long answer (-1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Martin