79195436

Date: 2024-11-16 15:20:03
Score: 1
Natty:
Report link

This worked pretty well for me

const response = await axios.get('url', {
        auth: {
          username: 'Jane',
          password: 'doe'
        },
      });
      const result = response.data;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Yusuf Yasir

79195435

Date: 2024-11-16 15:19:03
Score: 1.5
Natty:
Report link

version not mentioned in the Docs that seems to work

distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user237462

79195426

Date: 2024-11-16 15:17:02
Score: 2
Natty:
Report link

Your gradle files are corrupted Enter this path to solve this problem user/{user}/.gradle/wrapper/dists And delete your Gerdle folder so that Android Studio downloads the Gerdle files again to solve the problem

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

79195413

Date: 2024-11-16 15:10:00
Score: 1.5
Natty:
Report link

Here's a trick you can try:

git switch -c <new-branch>

(if you to make a new branch and switch to it)
OR

git checkout -b <new-branch>

(if you just want to make a new branch)

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

79195411

Date: 2024-11-16 15:08:00
Score: 2
Natty:
Report link

Define a distinct regex pattern for each data type (dates, times, numbers, ...) and combine them using the OR (|) operator.

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

79195403

Date: 2024-11-16 15:04:59
Score: 1
Natty:
Report link

I found the solution.

So, in PyCharm you need to install pyserial not serial, even though in code you call it as as serial! Of course!!!

Reasons:
  • Whitelisted phrase (-2): I found the solution
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Fred_was_here

79195402

Date: 2024-11-16 15:03:59
Score: 2
Natty:
Report link

By visiting this site you can see your report. Anyone with your powerbi credentials can see the report. Also if you want to embed the report in your personal website can do this by using embedded token.

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

79195394

Date: 2024-11-16 14:59:58
Score: 1
Natty:
Report link

SELECT usertype, CONCAT(start_station_name, " to ", end_station_name) AS route,
COUNT(*) AS num_trips, ROUND(AVG(CAST(tripduration AS INT64) / 60), 2) AS duration
FROM
bigquery-public-data.new_york.citibike_trips
GROUP BY start_station_name, end_station_name, usertype
ORDER BY
num_trips DESC
LIMIT 10;

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

79195388

Date: 2024-11-16 14:56:58
Score: 2
Natty:
Report link
http://newsabe.ir/2024/02/21/%D9%86%D9%85%D8%A7%DB%8C%D9%86%D8%AF%DA%AF%DB%8C-%D8%AA%D8%B9%D9%85%DB%8C%D8%B1%D8%A7%D8%AA-%D9%84%D9%88%D8%A7%D8%B2%D9%85-%D8%AE%D8%A7%D9%86%DA%AF%DB%8C-%D8%A7%D9%84`enter code here`-%D8%AC%DB%8C-%D8%AF%D8%B1-%D9%BE/
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: متین باتوته

79195385

Date: 2024-11-16 14:56:58
Score: 0.5
Natty:
Report link

To dynamically change the color of a button in a Lightning Data Table row, you need to update the data associated with the row and reassign it to the data property of the lightning-datatable. This involves updating the buttonColor field of the clicked row.

Here’s how you can achieve this:

  1. Ensure each row in the data array has a buttonColor field. This field will control the variant of the button.

  2. Update the buttonColor value of the clicked row in the onRowAction handler.

  3. After modifying the data array, reassign it to trigger reactivity.

Code:

JavaScript Controller:

import { LightningElement, track } from 'lwc';

export default class DataTableWithButton extends LightningElement {
@track data = [
    { id: 1, invoiceNumber: 'INV001', buttonColor: 'neutral' },
    { id: 2, invoiceNumber: 'INV002', buttonColor: 'neutral' },
    { id: 3, invoiceNumber: 'INV003', buttonColor: 'neutral' },
];

columns = [
    {
        label: 'Include GST',
        type: 'button',
        fieldName: 'invoiceNumber',
        typeAttributes: {
            title: 'Include GST',
            alternativeText: 'Include GST',
            name: 'Include_GST',
            label: 'Include GST',
            variant: { fieldName: 'buttonColor' },
        },
        cellAttributes: {
            width: '3rem',
        },
    },
];

handleRowAction(event) {
    const actionName = event.detail.action.name;
    const row = event.detail.row;

    if (actionName === 'Include_GST') {
        // Update the button color
        this.data = this.data.map((dataRow) => {
            if (dataRow.id === row.id) {
                return { ...dataRow, buttonColor: 'success' }; // Change to "success" or any variant
            }
            return dataRow;
        });
    }
}
}

HTML Template:

<template>
<lightning-datatable
    key-field="id"
    data={data}
    columns={columns}
    onrowaction={handleRowAction}>
</lightning-datatable>
</template>

In the above code,

  1. The typeAttributes.variant dynamically binds to the buttonColor field of each row.

  2. The @track decorator ensures changes to the data array are reactive and reflected in the UI.

  3. When the button is clicked, the onrowaction event handler identifies the clicked row and updates its buttonColor field.

  4. Common button variants in Salesforce LWC include neutral, brand, destructive, and success. Use these for color changes.

Mark as best answer if this helps.

Below are the screenshots for your reference.

  1. Before clicking on button
  2. After clicking on first button.
  3. After clicking on second button.
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @track
  • Low reputation (1):
Posted by: sumankanth kuruba

79195380

Date: 2024-11-16 14:51:57
Score: 1
Natty:
Report link

I did some further testing of the code that was suggested. On reflection it wasn't complete as per my original question. For that reason, I'm posting here the working code, which has been called a few times to prove it works in all possible modes (with basic arguments only - not a list as has been suggested will not work)

I found it fascinating that the redirect to tee needs a sleep 0 afterwards because the first command to echo will often do that prior to the tee being set up. I don't know how to wait only until that redirect is set before continuing.

The following code echos quite a bit to the various destinations, each echo is done via a method to ensure a unique sequential id. This was needed to confirm they are logged in the correct order.

The initial solution unfortunately has the bug my question has, that is log statements would be out of order. This is less neat because I need to bookend the block I want redirected to script_output.log with two statements rather than just wrap it in {}, but at least it keeps things as you'd expect from execution order.

#!/bin/bash

script_log="script_output.log"
process_log="output.log"

function store_output_redirects() {
    exec 3>&1 4>&2
}

function redirect_all_output_to_file() {
    exec  1>> "${script_log}" 2>&1
}

function clear_output_redirects() {
    exec 1>&3 2>&4
}

#!/bin/bash
my_function() {
    local pid_file=$1; logfile=$2
    local tee_output="none"
    if [ "$3" = "tee" ] || [ "$3" = "tee_console" ] ; then
        tee_output=$3
        shift
    fi
    cmd=("${@:3}")
    log "console: inside function"
    store_output_redirects
    redirect_all_output_to_file
    {
        # this block is redirected to ${script_log}
        log "${script_log}: inside redirected block"
        
        if [[ "$logfile" = "console" ]]; then
            # swap the output to the default (console)
            clear_output_redirects
        elif [ "$tee_output" = "tee" ] ; then
            #clear_output_redirects
            
            exec 1> >(tee "$logfile")
            # insert a tiny time delay for the tee redirect to be set up (otherwise output will go to the previous destination).
            sleep 0
        elif [ "$tee_output" = "tee_console" ] ; then
            clear_output_redirects
            exec 1> >(tee "$logfile")
            # insert a tiny time delay for the tee redirect to be set up (otherwise output will go to the previous destination).
            sleep 0
        else
            exec >>"$logfile"
            # insert a tiny time delay for the tee redirect to be set up (otherwise output will go to the previous destination).
            sleep 0
        fi
        
        echo "$BASHPID" > "$pid_file"
        
        if ! [ "$tee_output" = "none" ] ; then
            log "tee: command to be executed with output to $logfile and console: ${cmd[*]}"
        else
            log "$logfile: command to be executed with output to $logfile: ${cmd[*]}"
        fi
        # this cannot be escaped as per shellcheck.net as error 'command not found' when not using tee.
        ${cmd[@]}

        
        # reset the defaults for this block
        redirect_all_output_to_file
        
        log "${script_log}: end of redirected block"
    }
    clear_output_redirects
    log "console: function ends"
}

function log() {
    (( log_line = log_line + 1 ))
    echo "${log_line} $*"
}

function print_log() {
    local logfile="$1"
    echo
    if ! [ -f "$logfile" ] ; then
        echo "log file $logfile does not exist"
    else
        echo Contents of "$logfile":
        cat "$logfile" | while read -r logline 
        do
            echo "$logline"
        done
    fi
}

function test_redirection() {
    log_line=0
    local cmd_log_file=$1; shift
    local tee=$1; shift
    
    
    [ -f "${process_log}" ] && rm "${process_log}"
    [ -f "${script_log}" ] && rm "${script_log}"
    log "console: Redirecting requested cmd output to $cmd_log_file"
    log console: making copy of the stdout and stderr destinations
    
    log console: calling function
    my_function cmd.pid "$cmd_log_file" "$tee" echo hi
    
    log console: stdout and sterr reset to the defaults for the next test
    
    print_log "$script_log"
    echo
    print_log "$process_log"
}

echo "*****************************"
echo "** Testing output to console"
echo "*****************************"
test_redirection "console" 
echo "*****************************"
echo "** Testing output to logfile"
echo "*****************************"
test_redirection "$process_log" 
echo "*****************************"
echo "** Testing output to logfile and console"
echo "*****************************"
test_redirection "$process_log" "tee_console"
echo "*****************************"
echo "** Testing output to logfile and default"
echo "*****************************"
test_redirection "$process_log" "tee"

Reasons:
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: extorn

79195378

Date: 2024-11-16 14:51:57
Score: 2
Natty:
Report link

Points to consider:

  1. Any metric can be arbitrarily small. It's represented up to a certain decimal place, usually the 4th. That said, being it limited to the 4th decimal place, number smaller than 0.00001 are not visible in the logs. It's worth waiting a little bit while the training runs so the metric can accumulate up to larger, visible values.

  2. If it's a custom metric, thoroughly review your implementation. Specially if the other metrics are logging values that make sense, you must re-asses your custom implementation. From a software engineering perspective, even better if a someone else can help you with it in a peer-review-like drill.

  3. Whenever possible, stick to the "native", embedded metrics available in the package you are using. Once again, from a SE perspective, re-implementing well-known calculations or customizing whatever will inexorably add risk.

  4. You did everything apparently correctly and the values are still non-sense: Be sure that you are using the metric to the purpose it was originally designed. For instance, F1 and Accuracy are typically label classification metrics (e.g: You are checking if the model predicts correctly if a football/baseball game should occur or be suspended/delayed). Scenarios where you want to predict a behavior (e.g: A curve) during a certain period of time is more likely a regression task. For regression tasks you want to know how far away from the ground truth you are, then you are more prone to use MAE and MRE, for example.

  5. Get familiar with the data preprocessing and how exactly you are feeding your model: Do you need the normalization? Do you need clipping (clamping)? Should you convert/map the original input values to boolean (or 1s and 0s) representation?

Finally, good luck!

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Farlon Souto

79195374

Date: 2024-11-16 14:50:54
Score: 11.5 🚩
Natty:
Report link

Could you solve it ? I have the same issue.

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Blacklisted phrase (2): Could you solve
  • RegEx Blacklisted phrase (1.5): solve it ?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user28332025

79195347

Date: 2024-11-16 14:31:50
Score: 3
Natty:
Report link

Try using router.back() instead

import {router} from "expo-router";

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

79195344

Date: 2024-11-16 14:30:49
Score: 3.5
Natty:
Report link

you can't, you can compare if it has Clara, but not the order

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

79195342

Date: 2024-11-16 14:29:49
Score: 0.5
Natty:
Report link

This question was just answered in this post.

Lexilabs has a Kotlin Multiplatform library that enables AdMob @Composables called basic-ads.

The only downside is that it requires Android's Context to initialize and build @Composables, but there's already a tutorial out there for how to do that.

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

79195339

Date: 2024-11-16 14:28:48
Score: 0.5
Natty:
Report link

This question was just answered in this post.

Lexilabs has a Kotlin Multiplatform library that enables AdMob @Composables called basic-ads.

The only downside is that it requires Android's Context to initialize and build @Composables, but there's already a tutorial out there for how to do that.

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

79195331

Date: 2024-11-16 14:25:48
Score: 1
Natty:
Report link

Lexilabs has a Kotlin Multiplatform library that enables AdMob @Composables called basic-ads.

The only downside is that it requires Android's Context to initialize and build @Composables, but there's already a tutorial out there for how to do that.

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

79195330

Date: 2024-11-16 14:24:47
Score: 3.5
Natty:
Report link

for the audio part, type "audio" in that kind-of-search-box and repeat the procedure with the link

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

79195329

Date: 2024-11-16 14:24:47
Score: 0.5
Natty:
Report link

If you are using slackeventsapi python package along with ngrok, then you don't need to add following piece of code-

@app.route('/slack/events', methods=['POST'])
def get_events():
  # print(request)
  return request.json['challenge']

You app should work fine without above piece of code. I have a similar app in python flask used with ngrok.

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

79195325

Date: 2024-11-16 14:22:47
Score: 3.5
Natty:
Report link

Not sure what happened but it seems to be back up now. Maybe some weird timing issue

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

79195316

Date: 2024-11-16 14:19:46
Score: 1
Natty:
Report link

ULID is not sorted correctly on MS SQL SERVER. ULID is supposed to be sorted from left to right (left side is date) If you create a table with uniqueidentifier and DateTime, and then insert data into it in chronological order (ULID and date created at the same time) You will see that the dates are in random order. Also, my tests with the benchmark showed that the insertion time has a large spread from 2 to 22 seconds for inserting 100_000 rows. If you convert your ULID to string => nvarchar(26) then it will be sorted correctly. Or use long as snowflake id.

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

79195312

Date: 2024-11-16 14:18:46
Score: 4.5
Natty:
Report link

strong text**how to solve this problem?

import pandas as pd import matplotlib.pyplot as plt

error:

ImportError Traceback (most recent call last) ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.

ImportError Traceback (most recent call last) ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.

Reasons:
  • Blacklisted phrase (1): how to solve
  • RegEx Blacklisted phrase (1.5): how to solve this problem?
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: My Personal

79195309

Date: 2024-11-16 14:17:46
Score: 3
Natty:
Report link

add this to your pyproject.toml sentry-sdk = "<2.18.0"

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

79195290

Date: 2024-11-16 14:04:43
Score: 4.5
Natty:
Report link
Traceback (most recent call last):

_tkinter.TclError: Can't find a usable init.tcl in the following directories:

This probably means that Tcl wasn't installed properly.

I am facing same error. If any knows, share the solution. I have also used in latest version of python, PyCharm and FreeSimpleGUI 5.1.1 Thank you

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (1): I am facing same error
  • Has code block (-0.5):
  • Me too answer (2.5): I am facing same error
  • Low reputation (1):
Posted by: Pawan Bhatt

79195283

Date: 2024-11-16 14:00:42
Score: 0.5
Natty:
Report link

You are right that both mechanisms handle Dart errors but there is difference is here :

Its used for catch errors occurring within the UI and Flutter's own error boundaries, like it Handles uncaught synchronous errors originating in the Flutter framework, and The FlutterErrorDetails object provides context specific to Flutter (e.g., widget library issues).

Its used catch all unhandled asynchronous errors, even if they are not related to Flutter (like some exceptions from other plugin or dependencies), also any isolate's event loop, not just the UI thread, so It’s like "global safety net" for any uncaught errors across your app, whether it come from UI tasks or background operations.

Non of above method is directly not able to handles errors thrown from native Java or Swift code, to catch those, you'd need to use platform-specific mechanisms (like uncaughtExceptionHandler in Android or NSSetUncaughtExceptionHandler in iOS) or something like that as per your exact requirement and pass them to Dart using platform channels approach will be recomended.

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

79195282

Date: 2024-11-16 14:00:42
Score: 3
Natty:
Report link

I found out that in Xcode 16+ using canCollapseFromWindowResize with canCollapse did the trick and you cannot hide the sidebar anymore by dragging it on macOS.

        NavigationSplitView {
            Text("sidebar")
            .toolbar(removing: .sidebarToggle)
        } detail: {
            Text("detail")
        }
        .introspect(.navigationSplitView, on: .macOS(.v13,.v14,.v15)) { splitview in
            if let delegate = splitview.delegate as? NSSplitViewController {
                delegate.splitViewItems.first?.canCollapse = false
                delegate.splitViewItems.first?.canCollapseFromWindowResize = false
            }
        }

I don't really understant why @yu-zhao got down voted because that solution worked until the newest version of macos and xcode.

Reasons:
  • RegEx Blacklisted phrase (2): down vote
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @yu-zhao
  • Low reputation (1):
Posted by: magic_sk

79195276

Date: 2024-11-16 13:55:41
Score: 2
Natty:
Report link

Your gradle files are corrupted Enter this path to solve this problem user/{user}/.gradle/wrapper/dists And delete your Gerdle folder so that Android Studio downloads the Gerdle files again to solve the problem

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

79195270

Date: 2024-11-16 13:53:40
Score: 3.5
Natty:
Report link

It seems this is fixed starting from Tycho 3.0.x: https://github.com/eclipse-tycho/tycho/pull/2011/commits/fdd9a7f09667106783048d61898d5d0091437975

replaceTypeWithExtension needs to be set to true then.

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

79195269

Date: 2024-11-16 13:53:40
Score: 3
Natty:
Report link

I faced the same issue. And easily could resolve it once i close the VScode and restart it.

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

79195257

Date: 2024-11-16 13:45:38
Score: 1.5
Natty:
Report link

it is solved. you can close.

the isue is about java and defining the way

flutter config --jdk-dir /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/home

and put you definition

Reasons:
  • Whitelisted phrase (-1): it is solved
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Cesar Goulart

79195233

Date: 2024-11-16 13:30:34
Score: 1.5
Natty:
Report link

What seems to have fixed the issue is running pnpm install and then rerunning the command for adding the tailwind pnpm run qwik add tailwind

Weird thing is that when project was initialized, I was told by the CLI that it will install all the dependencies.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): What
  • Low reputation (0.5):
Posted by: Chain Truth

79195230

Date: 2024-11-16 13:27:33
Score: 1.5
Natty:
Report link

Self answer!

The issue was resolved by downgrading Kafka to version 3.8.x. According to the release notes for Kafka 3.9.0, the SystemTime class was changed to a singleton, and instead of creating an instance with new SystemTime();, it was modified to obtain the instance by calling the SystemTime.getSystemTime(); method.

However, the latest version of Kafka Connect JDBC(v10.8.0) initializes the field with time = new SystemTime();, which caused the error.

I have created an issue on the Kafka Connect JDBC GitHub.

Here are the relevant links:

https://issues.apache.org/jira/browse/KAFKA-16879

https://github.com/apache/kafka/pull/16266

https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java

https://github.com/confluentinc/kafka-connect-jdbc/blob/master/src/main/java/io/confluent/connect/jdbc/source/JdbcSourceTask.java

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

79195219

Date: 2024-11-16 13:20:32
Score: 2.5
Natty:
Report link

if you have mainform ,contain same pages ,each page contain subform you need to get path of (text) in the subform to use it in Query,get this

[Forms]![MainForm]![Child].[Form]![Text]

thanks to all

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

79195214

Date: 2024-11-16 13:15:31
Score: 1.5
Natty:
Report link
{
 "compilerOptions": {
"types": [
  // ... your other types
  "node"
],

}, }

This fixed the issue for me

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

79195213

Date: 2024-11-16 13:15:31
Score: 1
Natty:
Report link

I'm going to start with the obvious: Python 2.7 has been dead for 4 years now ([Python]: Sunsetting Python 2). Make sure that you clearly mention the reason for sticking to it, otherwise many users might see it as an XY Problem. I saw in a comment from another question that you are working with [Gwyddion]: Gwyddion which indeed doesn't support Python 3.

Now, since Python 2 is no longer supported, packages, tools, ... don't have to support it (some still might, but most will not - as time goes by).
VirtualEnv that is shipped by PyCharm doesn't. Check [SO]: pycharm does not connect to console with python3.8 (@CristiFati's answer) for a similar situation.

Alternatives:

I. Create the Python 2.7 virtual environment manually and "import" it in PyCharm

I'll be explaining the theoretical process with practical examples. There will be scattered snippets from a Cmd console (starting below):

[cfati@CFATI-5510-0:e:\Work\Dev\StackExchange\StackOverflow\q079004210]> sopr.bat
### Set shorter prompt to better fit when pasted in StackOverflow (or other) pages ###

[prompt]> :: === Start ===
[prompt]> dir /b
code00.py

[prompt]>
  1. Prerequisites:

    There are multiple variants here, so I'll focus on the one I use most. You'll have to have:

    1. A Python 2.7 instance that will be used as a base for creating the VEnv. I'll be referring to it as (like it was a Nix environment variable) ${PY2}

    2. A Python instance with VirtualEnv ([PyPA.VirtualEnv]: Installation - also check [SO]: Python3.7 venv does not Create Virtual Environment Directory (@CristiFati's answer)) installed. This can be the same as the previous one, but I recommend using a n up to date Python 3 version (${PY3}), as there are some prerequisites as well ([PyPI]: pip, and modern Python versions come with it inside). Might be helpful:

  2. Create the VEnv

    Step(s) detailed in [SO]: Create Windows Python virtualenv with a specific version of Python (@CristiFati's answer).
    Typically: "${PY3}" -m virtualenv -p "${PY2}" ${VENV2} where ${VENV2} is the location where you want your VEnv to be created at. Activate it afterwards:

    [prompt]> :: === Create VEnv ===
    [prompt]> "c:\Install\pc064\Python\Python\03.10\python.exe" -m virtualenv -p "c:\Install\pc064\Python\Python\02.07\python.exe" ".\py_0207_pc064_venv"
    created virtual environment CPython2.7.18.final.0-64 in 8051ms
      creator CPython2Windows(dest=E:\Work\Dev\StackExchange\StackOverflow\q079004210\py_0207_pc064_venv, clear=False, no_vcs_ignore=False, global=False)
      seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\cfati\AppData\Local\pypa\virtualenv)
        added seed packages: pip==20.3.4, setuptools==44.1.1, wheel==0.37.1
      activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
    
    [prompt]>
    (py_0207_pc064_venv) [prompt]> dir /b
    code00.py
    py_0207_pc064_venv
    
    [prompt]>
    [prompt]> ".\py_0207_pc064_venv\Scripts\python.exe"
    Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> ^Z
    
    
    [prompt]> :: Activate VEnv
    [prompt]> ".\py_0207_pc064_venv\Scripts\activate.bat"
    
    (py_0207_pc064_venv) [prompt]>
    (py_0207_pc064_venv) [prompt]> :: Check for PIP
    (py_0207_pc064_venv) [prompt]> python.exe -m pip > /nul
    e:\Work\Dev\StackExchange\StackOverflow\q079004210\py_0207_pc064_venv\Scripts\python.exe: No module named pip
    (py_0207_pc064_venv) [prompt]>
    (py_0207_pc064_venv) [prompt]> :: @TODO - cfati: Check previous command (error message if PIP not installed, OK otherwise)
    (py_0207_pc064_venv) [prompt]> (py_0207_pc064_venv) [prompt]> echo %ERRORLEVEL%
    (py_0207_pc064_venv) [prompt]> 1
    
  3. Install PIP in the VEnv

    This is an optional step that has to be executed only if PIP is not already there (check the @TODO at the end of the last snippet). Usually it's not required, but exemplifying it anyway (you need PIP to be able to install packages in your VEnv).
    Check [AskUbuntu]: How can I find an older version of pip that works with Python 2.7?:

    (py_0207_pc064_venv) [prompt]> :: === Get (v2.7 compatible) PIP (if not already there) ===
    (py_0207_pc064_venv) [prompt]> curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output ".\get-pip.py"
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 1863k  100 1863k    0     0  3912k      0 --:--:-- --:--:-- --:--:-- 3956k
    
    (py_0207_pc064_venv) [prompt]>
    (py_0207_pc064_venv) [prompt]> dir /b
    code00.py
    get-pip.py
    py_0207_pc064_venv
    
    (py_0207_pc064_venv) [prompt]>
    (py_0207_pc064_venv) [prompt]> :: Check for PIP
    (py_0207_pc064_venv) [prompt]> python.exe -m pip > /nul
    
    (py_0207_pc064_venv) [prompt]> echo %ERRORLEVEL%
    0
    

    Now, you should have an usable Python 2.7 VEnv.

  4. Import the new VEnv in PyCharm

    Steps (PyCharm related ones) are identical to the ones from [SO]: How to install Python using the "embeddable zip file" (@CristiFati's answer)

    After the above steps and PyCharm finishes indexing the files, your new VEnv is ready to use:

    img00

  5. Test the new VEnv from Pycharm

    code00.py:

    #!/usr/bin/env python
    
    import sys
    
    
    def main(*argv):
        print "Py2.7 specifics:", range(7)
    
    
    if __name__ == "__main__":
        print(
            "Python {:s} {:03d}bit on {:s}\n".format(
                " ".join(elem.strip() for elem in sys.version.split("\n")),
                64 if sys.maxsize > 0x100000000 else 32,
                sys.platform,
            )
        )
        rc = main(*sys.argv[1:])
        print("\nDone.\n")
        sys.exit(rc)
    

    Output (PyCharm console):

    E:\Work\Dev\StackExchange\StackOverflow\q079004210\py_0207_pc064_venv\Scripts\python.exe E:\Work\Dev\StackExchange\StackOverflow\q079004210\code00.py 
    Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] 064bit on win32
    
    Py2.7 specifics: [0, 1, 2, 3, 4, 5, 6]
    
    Done.
    
    
    Process finished with exit code 0
    

    Also attaching a screenshot:

    img01


II. Downgrade your PyCharm installation to a version that is still Python 2.7 compatible

[JetBrains]: Other Versions contains a list of them. For example, v2019.3 should be OK, but you'll have to see it for yourself.
Needless to say that it won't have the features an upper-to-date version has.


III. Modify your PyCharm installation to support Python 2.7

Only mentioning this as a purely theoretical variant, I don't even need to start enumerating the reasons why not to do it. I did it once though: [SO]: Run / Debug a Django application's UnitTests from the mouse right click context menu in PyCharm Community Edition? (@CristiFati's answer).

Reasons:
  • Blacklisted phrase (1): another question
  • Blacklisted phrase (0.5): How can I
  • Blacklisted phrase (1): StackOverflow
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @TODO
  • High reputation (-2):
Posted by: CristiFati

79195204

Date: 2024-11-16 13:11:30
Score: 2.5
Natty:
Report link

In Visual Studio 2022, when you publish a website, .gz files are often created as part of the compression step to optimize content delivery for web servers that support Gzip compression. To prevent the creation of .gz files during publishing, you can modify your project settings.

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

79195202

Date: 2024-11-16 13:10:30
Score: 2
Natty:
Report link

Alright the fault was on my side I forgot and did not notice there was another function app in my azure portal that had the old code and when I looked at its invocations it was mostly the first one to run and then the new one did not because of it.

Moral of this story, please check all of your function apps to make sure that there is not some old dusted version of it that will make you problems like to me.

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

79195191

Date: 2024-11-16 13:05:26
Score: 8.5 🚩
Natty:
Report link

Did you ever solve this? Identical setup with identical problem... and I've tried those links..

Reasons:
  • RegEx Blacklisted phrase (3): Did you ever solve this
  • RegEx Blacklisted phrase (1.5): solve this?
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (1):
Posted by: user28330840

79195190

Date: 2024-11-16 13:05:26
Score: 4.5
Natty:
Report link

im new to HA and struggling to get my head around everything. How to make the bar colors change based on the values? I want the NordPool electricity price data chart to show the high price bars red, middle orange, low green etc, but I want them to be set depending on the max price of the particular day, lets say, the max shown price of the cart today is 50 EUR, so the 80%-100% of the max price will show up red, 60%-80% orange etc. Currently I have them set as 0-10 EUR = blue 10-20 green etc. But that's not convenient if all the hourly prices of the day are, lets say in a range of 0-10 - then all the bars are shown in blue.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • RegEx Blacklisted phrase (1.5): im new
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Kaspars

79195177

Date: 2024-11-16 12:59:24
Score: 3
Natty:
Report link

Hey there!

Your code seems mostly correct, but the issue lies in how PHP PDO works with lastInsertId(). This method only returns the ID of the last inserted record and not after an UPDATE query. Since your logic includes an UPDATE query right after the INSERT, calling $db->lastInsertId() at that point will not reflect the inserted ID anymore.

To fix this, simply move the call to $db->lastInsertId() directly after the INSERT query, and it should work as expected.

Best regards,
t045t

Reasons:
  • Blacklisted phrase (0.5): Best regards
  • Blacklisted phrase (1): regards
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: t045t

79195174

Date: 2024-11-16 12:58:24
Score: 3.5
Natty:
Report link

I had faced this problem, and after removing top(n), the issue was resolved.

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

79195172

Date: 2024-11-16 12:58:24
Score: 0.5
Natty:
Report link

I suggest this should do the trick:

import * as mongoose from "@typegoose/typegoose";
import { getModelForClass } from "@typegoose/typegoose";
...
const typegoose = mongoose.mongoose;
...
describe("MembershipService", () => {
  beforeAll(async () => {
    if (!process.env.MONGODB_URL_TEST) {
      throw new Error("MONGODB_URL_TEST is not set");
    }
    const uniqueUri = `${process.env.MONGODB_URL_TEST}-MembershipService`;

    await typegoose.connect(uniqueUri, {
      useNewUrlParser: true,
      useUnifiedTopology: true,
    });
    console.log("MembershipService start", typegoose.connection.name);
    ...
    MemberModel = getModelForClass(MembershipMember);
  });

  afterAll(async () => {
    console.log("MembershipService end", typegoose.connection.name);
    await typegoose.connection.close();
    await typegoose.disconnect();
  });
});
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Tarasko

79195167

Date: 2024-11-16 12:55:23
Score: 0.5
Natty:
Report link

The partition_depth_histogram in Snowflake's SYSTEM$CLUSTERING_INFORMATION function can be a bit confusing. I tried to break down your questions with examples:

1. Why is it always 17 buckets?

The number of buckets in the partition_depth_histogram is not always 17. It's actually a combination of two factors:

Fixed Buckets (0-16): The first 17 buckets (numbered from "00000" to "00016") represent a fixed range from 0 to 16 overlap depth with increments of 1. This provides detailed information about micro-partitions with very low overlap.

Dynamic Buckets (Larger than 16): For overlap depths exceeding 16, the buckets increase in size based on a doubling scheme. This means the next bucket would be "00032" (twice the size of the previous bucket) and so on. This approach efficiently represents the distribution of overlap depth for a wider range of values.

2. What is the relation between micro-partitions and buckets in the histogram?

The partition_depth_histogram doesn't directly map micro-partitions to specific buckets. Instead, it shows the number of micro-partitions that fall within a certain overlap depth range.

Bucket Value: Each bucket represents a specific overlap depth range. Value in the Bucket: The value associated with a bucket (e.g., 98 in "00032") indicates the number of micro-partitions in that specific overlap depth range.

3.What do the numbers in the histogram mean?

The numbers in the histogram represent the count of micro-partitions within a specific overlap depth range.

In your example:

There are 0 micro-partitions with an overlap depth of 0 ("00000"). There are 3 micro-partitions with an overlap depth between 2 and 3 ("00002"). There are 98 micro-partitions with an overlap depth between 32 and 64 ("00032"). There are 698 micro-partitions with an overlap depth exceeding 128 ("00128").

Please Note:

The provided example also shows a high average_depth (64.07) compared to the total number of micro-partitions (1156). This suggests that a significant portion of the data is accessed by multiple queries, potentially leading to good query performance due to data sharing.

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

79195158

Date: 2024-11-16 12:47:22
Score: 2
Natty:
Report link

have a try to add sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) before client.bind(("", 8000))

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

79195157

Date: 2024-11-16 12:44:21
Score: 1
Natty:
Report link

A previous answer (no longer available apparently due to AI plagiarism) made me realize that I can simply recreate the connection once I've retrieved the token with the unauthorized connection.

That way, the AccessTokenProvider function - that is only executed once starting a connection - is run again for the new one, now with the token.

This is an option that works fine so far for me (since I have no other ongoing calls than getting the token before going authorized). I do not know if this is the intended solution, so if someone knows how to set a token on running connections or there are other ways to accomplish this, please let me know in a better answer.

Reasons:
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Ray

79195148

Date: 2024-11-16 12:38:20
Score: 3.5
Natty:
Report link

I came across the need to use GraphViz in Lambda. Successfully did it: https://schemaviz.surge.sh/ There is a working Lambda layer on github: https://github.com/Nummulith/SchemaViz I'm happy to answer any questions or receive feedback.

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

79195140

Date: 2024-11-16 12:29:19
Score: 1.5
Natty:
Report link

If your configuratoins are in different packages, use @ComponentScan on application like this:

@SpringBootApplication
@ComponentScan(basePackages = {"hu.infokristaly"})
public class ForrasUploadSoapServerApplication {
    private static ApplicationContext applicationContext;

    public static void main(String[] args) {
       SpringApplication.run(ForrasUploadSoapServerApplication.class, args);
    }

}
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @ComponentScan
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Papp Zoltán

79195129

Date: 2024-11-16 12:25:18
Score: 3.5
Natty:
Report link

This is how you get days in milliseconds, simply.

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

79195123

Date: 2024-11-16 12:20:17
Score: 0.5
Natty:
Report link

Overlap Depth in Snowflake refers to the number of times a specific micro-partition is referenced by different queries or jobs. In simpler terms, it measures the degree of data sharing among concurrent queries.

Average Depth is a metric that calculates the average overlap depth across all micro-partitions in a table. It provides a measure of the overall data sharing efficiency within a table.

Why Overlap Depth Matters:

Query Performance: Higher overlap depth can lead to improved query performance, as data is already cached in memory and can be reused by multiple queries.

Resource Utilisation: Efficient data sharing can reduce the need for additional data transfers and processing, optimising resource utilisation.

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

79195097

Date: 2024-11-16 12:01:12
Score: 1.5
Natty:
Report link

I just add geom_subtile() and geom_subrect() function in package ggalign to subdivide rectangles with shared borders into a grid.

library(reshape2)
library(ggplot2)
m <- matrix(
    c("SNV", "SNV", NA, NA, "INDEL", "SNV", "INDEL", "SNV", "SNV/INDEL"),
    3, 3
)

ggplot(
    tidyr::separate_longer_delim(melt(m), value, delim = "/"),
    aes(Var1, Var2, fill = value)
) +
    geom_subtile(color = "yellow", linewidth = 2) +
    xlab("Patient") +
    ylab("Gene")

enter image description here

If you want to draw the oncoplot, ggalign provide more advanced function to do this, it can do everything ComplexHeatmap can, and even more!

The oncoplot vignette is here: https://yunuuuu.github.io/ggalign/dev/articles/oncoplot.html

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

79195093

Date: 2024-11-16 12:00:12
Score: 1
Natty:
Report link

If somebody see access denied about Windows\Fonts Folder these days(Now 2024-11-16), Project -> Add -> manifest add and Set manifest like this

<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
    <requestedExecutionLevel level="highestAvailable" uiAccess="false" />
  </requestedPrivileges>
  
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: LightAndLiberty

79195074

Date: 2024-11-16 11:46:09
Score: 1
Natty:
Report link

Not sure if this is how its supposed to be done but I do this:

var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions() { Title = "test123" });
window.OnPageTitleUpdated += (title) => window.SetTitle("test123");
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jorre Vedder

79195072

Date: 2024-11-16 11:44:08
Score: 2
Natty:
Report link

Upgrade the Operating System

Advocate for upgrading the operating system to Windows 10 or later. Since Windows 8 has reached the end of its lifecycle, it's not only unsupported by modern .NET versions but also poses security risks.

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

79195062

Date: 2024-11-16 11:39:07
Score: 3.5
Natty:
Report link

There's an OpenSource port of WebForms to .NET 8 here: github.com/simonegli8/WebFormsForCore.

With this Library you can run existing WebForms projects directly in .NET 8.

Here's a Video Tutorial on how to convert the sample WebForms site to .NET 8.

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

79195057

Date: 2024-11-16 11:38:07
Score: 1.5
Natty:
Report link

For now, QEMU supports only 3 CPU architectures (AMD, IBM POWER and IBM S390x), as properly hinted in comment So for Intel and other(?) architectures, support doesn't exist yet - one can find it in QEMU documentation about Confidential Guest Support

Hence, in order to "fix" this, someone has to write new code for QEMU, and that also depends whether Intel and others have documentation and allow it to be open source.

For Intel, it is most likely TDX extension technology.

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

79195053

Date: 2024-11-16 11:37:07
Score: 5.5
Natty: 7.5
Report link

Can anybody reproduse this? you just need a /home/sound0.wav file...

https://discuss.ai.google.dev/t/10-memory-error-i-need-your-help/49620

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Starts with a question (0.5): Can anybody
  • Low reputation (1):
Posted by: jon1enforce

79195046

Date: 2024-11-16 11:31:05
Score: 1.5
Natty:
Report link

So, apparently this is a sql problem not django

you can't have an alias in the were statement.

probably the alias won't be evaluated in the where part of the query execution.

So, the db can't use a column it doesn't have and as a result they forbid it

does it mean the alias sql will be evaluated more than once? No, depending on the database optimization engine but most probably no, the only insufficient here is writing the same sql more than once but has no effect on the performance

also, if you don't care about the match value returned

use qs.alias() to prevent it from being written there as well

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: mohamed naser

79195038

Date: 2024-11-16 11:24:03
Score: 1.5
Natty:
Report link

Helllo,

You can achieve this report logic in power BI Report by following these below steps.

Firstly, you need to build calculated columns to get the data based on years and department.

And then add the slicer like gender and ethnicity and try to filter based on slicers like male and Female.

Once data start filtering based on slicers take a line chart or bar chart and add those calculated columns for change variance as per years and departments.

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

79195037

Date: 2024-11-16 11:23:03
Score: 2.5
Natty:
Report link

constructor(props) { super(props);

this.onFileDrop = this.onFileDrop.bind(this);

}

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user28329857

79195036

Date: 2024-11-16 11:23:03
Score: 2.5
Natty:
Report link

I'm sorry to hear that you are facing the issue I was able to resolve it. I made a video with a step-by-step process on how to resolve it. https://www.youtube.com/watch?v=hhmDotJ8WE0&t=16s.

I hope it helps you fix it.

Reasons:
  • Blacklisted phrase (1): youtube.com
  • Whitelisted phrase (-1): hope it helps
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: ifeanyichukwu obeta

79195032

Date: 2024-11-16 11:22:02
Score: 0.5
Natty:
Report link

You are attempting to read an Excel file in the xlsx format. openpyxl is your go-to module, not xlrd and here is why, straight from the xlrd github page:

python-excel.org/ itself starts with openpyxl: The recommended package for reading and writing Excel 2010 files (ie: .xlsx)

Reasons:
  • No code block (0.5):
Posted by: OCa

79195028

Date: 2024-11-16 11:19:02
Score: 2
Natty:
Report link

No.

Searching for Youtube TV channels is not available on YouTube API.

https://issuetracker.google.com/issues/209382351

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

79195018

Date: 2024-11-16 11:12:00
Score: 2.5
Natty:
Report link

(NOBRIDGE) ERROR Error: Exception in HostFunction: Unable to convert string to floating point value: "large"

This error is located at: in RNSScreen (created by Animated(Anonymous)) in Animated(Anonymous) (created by InnerScreen) in Suspender (created by Freeze) in Suspense (created by Freeze) in Freeze (created by DelayedFreeze) in DelayedFreeze (created by InnerScreen) in InnerScreen (created by Screen) in Screen (created by SceneView) in SceneView (created by NativeStackViewInner) in Suspender (created by Freeze) in Suspense (created by Freeze) in Freeze (created by DelayedFreeze) in DelayedFreeze (created by ScreenStack) in RNSScreenStack (created by ScreenStack) in ScreenStack (created by NativeStackViewInner) in NativeStackViewInner (created by NativeStackView) in RCTView (created by View) in View (created by SafeAreaProviderCompat) in SafeAreaProviderCompat (created by NativeStackView) in NativeStackView (created by NativeStackNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by NativeStackNavigator) in NativeStackNavigator in Unknown (created by ThemeProvider) in ThemeProvider (created by PaperProvider) in RCTView (created by View) in View (created by Portal.Host) in Portal.Host (created by PaperProvider) in RCTView (created by View) in View (created by SafeAreaInsetsContext) in SafeAreaProviderCompat (created by PaperProvider) in PaperProvider (created by ThemeProvider) in ThemeProvider (created by RootLayout) in RootLayout in Unknown (created by Route()) in Suspense (created by Route()) in Route (created by Route()) in Route() (created by ContextNavigator) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by wrapper) in wrapper (created by ContextNavigator) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by ContextNavigator) in ContextNavigator (created by ExpoRoot) in ExpoRoot (created by App) in App (created by ErrorOverlay) in ErrorToastContainer (created by ErrorOverlay) in ErrorOverlay (created by withDevTools(ErrorOverlay)) in withDevTools(ErrorOverlay) in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in main(RootComponent)

I am getting this error again and again when trying to run my expo on android device, after updating to expo 52

Reasons:
  • Blacklisted phrase (1): I am getting this error
  • RegEx Blacklisted phrase (1): I am getting this error
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: SPIDER

79195008

Date: 2024-11-16 11:08:59
Score: 0.5
Natty:
Report link

My answer would be logically same as to @Dale's.

you can create a common table which has same logic and then create 3 temporary tables.

Regarding performance, you can create index on CommonData table on customerId and country as they are in filtering condition.

example:

CREATE TABLE #CommonData (
-- Column definitions
);

INSERT INTO #CommonData
SELECT 
    C.*, 
    O.*, 
    OT.*
FROM Customers C
LEFT JOIN Orders O ON C.CustomerID = O.CustomerID
LEFT JOIN OtherTables OT ON C.SomeID = OT.SomeID
WHERE C.Active = 1 AND O.OrderStatus = 'Completed';

SELECT * FROM #CommonData WHERE CustomerID > 80;
SELECT * FROM #CommonData WHERE CustomerID = 1;
SELECT * FROM #CommonData WHERE Country = 'Mexico';
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Dale's
  • Low reputation (0.5):
Posted by: samhita

79195002

Date: 2024-11-16 11:06:58
Score: 0.5
Natty:
Report link

from reportlab.lib.pagesizes import letter from reportlab.pdfgen import canvas from PIL import Image

def create_pdf_with_images(pdf_filename, image_paths): # Create a canvas object to generate the PDF c = canvas.Canvas(pdf_filename, pagesize=letter)

# Add a title to the document
c.setFont("Helvetica-Bold", 16)
c.drawString(100, 750, "Basic Elements of Computing")

# Adding an introduction or explanation
c.setFont("Helvetica", 12)
c.drawString(100, 730, "This document explains the basic elements of computing with illustrations.")

# Define the starting position for images and text
y_position = 700

for image_path in image_paths:
    # Add a brief description
    c.setFont("Helvetica", 10)
    c.drawString(100, y_position - 20, f"Image: {image_path}")
    
    # Add the image (resize it if necessary)
    img = Image.open(image_path)
    img_width, img_height = img.size
    aspect_ratio = img_height / float(img_width)
    img_width = 200  # Width of the image in the PDF
    img_height = img_width * aspect_ratio  # Maintain the aspect ratio
    
    # Draw the image onto the canvas
    c.drawImage(image_path, 100, y_position - 150, width=img_width, height=img_height)
    
    # Update y_position for the next image
    y_position -= img_height + 100

# Save the PDF
c.save()

Example usage

image_paths = ['image1.jpg', 'image2.png', 'image3.jpg'] # Provide the paths of your images create_pdf_with_images("Computing_Elements.pdf", image_paths)

Reasons:
  • Blacklisted phrase (1): This document
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mohamed touil

79194999

Date: 2024-11-16 11:05:58
Score: 0.5
Natty:
Report link

A more structured way (wordpress way) of doing the web hook basing on @oscar's amazing answer, would be to utilize a plug that can help manage web hooks such as Bit Integrations.

First a modification need to be done to the following path as @oscar mentioned.

plugins/elementor-pro/modules/forms/submissions/actions/save-to-database.php

the modification is by simply adding the following line

$record->set('submission_id', $this->submission_id);

exactly after

$this->submission_id = Query::get_instance()->add_submission( [
            'main_meta_id' => 0,
            'post_id' => $post_id,
            'referer' => remove_query_arg(
                [ 'preview_id', 'preview_nonce', 'preview' ],
                $meta['page_url']['value']
            ),
            'referer_title' => $meta['page_title']['value'],
            'element_id' => $element_id,
            'form_name' => $form_name,
            'campaign_id' => 0,
            'user_id' => get_current_user_id(),
            'user_ip' => $meta['remote_ip']['value'],
            'user_agent' => $meta['user_agent']['value'],
            'actions_count' => $actions_count,
            'actions_succeeded_count' => 0,
            'meta' => wp_json_encode( [
                // TODO: Should be removed if there is an ability to edit "global widgets"
                'edit_post_id' => $record->get_form_settings( 'edit_post_id' ),
            ] ),
        ], $record->get_field( null ) );

now instead of calling the hook customly through function.php n the theme which could risk in breaking the theme if was edited incorrectly. We shall use the bit integration plugin. After installing the plugin, we go to the plugin code files to allow it to read the added piece of data which is the submission id.

First we go to this file

plugins/bit-integrations/includes/Triggers/Elementor/t ElementorHelper.php

we modify the following functions :

public static function extractRecordData($record)
    {
        return [
            'id'           => $record->get_form_settings('id'),
            'form_post_id' => $record->get_form_settings('form_post_id'),
            'edit_post_id' => $record->get_form_settings('edit_post_id'),
            'submission_id' => $record->get('submission_id'),
            'fields'       => $record->get('fields'),
            'files'        => $record->get('files'),
        ];
    }

and scroll down a bit to modify the second function that handles the retrieved data and passes it to the UI to be seen by the user while setting up the hook in bit integrations plugin.

public static function setFields($formData)
    {
        $allFields = [
            ['name' => 'id', 'type' => 'text', 'label' => wp_sprintf(__('Form Id (%s)', 'bit-integrations'), $formData['id']), 'value' => $formData['id']],
            ['name' => 'form_post_id', 'type' => 'text', 'label' => wp_sprintf(__('Form Post Id (%s)', 'bit-integrations'), $formData['form_post_id']), 'value' => $formData['form_post_id']],
            ['name' => 'edit_post_id', 'type' => 'text', 'label' => wp_sprintf(__('Edit Post Id (%s)', 'bit-integrations'), $formData['edit_post_id']), 'value' => $formData['edit_post_id']],
            ['name' => 'submission_id', 'type' => 'text', 'label' => wp_sprintf(__('Submission Id (%s)', 'bit-integrations'), $formData['submission_id']), 'value' => $formData['submission_id']],
        ];

//... rest of the code

To understand where those functions are called we can check the controller PHP file as follows:

plugins/bit-integrations/includes/Triggers/Elementor/t ElementorController.php

public static function handle_elementor_submit($record)
    {
        $recordData = ElementorHelper::extractRecordData($record);
        $formData = ElementorHelper::setFields($recordData);
        $reOrganizeId = $recordData['id'] . $recordData['form_post_id'];

        if (get_option('btcbi_elementor_test') !== false) {
            update_option('btcbi_elementor_test', [
                'formData'   => $formData,
                'primaryKey' => [(object) ['key' => 'id', 'value' => $recordData['id']]]
            ]);
        }

        $flows = ElementorHelper::fetchFlows($recordData['id'], $reOrganizeId);
        if (!$flows) {
            return;
        }

        foreach ($flows as $flow) {
            $flowDetails = static::parseFlowDetails($flow->flow_details);

            if (!isset($flowDetails->primaryKey) && ($flow->triggered_entity_id == $recordData['id'] || $flow->triggered_entity_id == $reOrganizeId)) {
                $data = ElementorHelper::prepareDataForFlow($record);
                Flow::execute('Elementor', $flow->triggered_entity_id, $data, [$flow]);

                continue;
            }

            if (\is_array($flowDetails->primaryKey) && ElementorHelper::isPrimaryKeysMatch($recordData, $flowDetails)) {
                $data = array_column($formData, 'value', 'name');
                Flow::execute('Elementor', $flow->triggered_entity_id, $data, [$flow]);
            }
        }

        return ['type' => 'success'];
    }

Example of the hooked data: enter image description here

voilla, works like a charm.

special thanks to @oscar for his insight and ope it saved someone's time.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @oscar's
  • User mentioned (0): @oscar
  • User mentioned (0): @oscar
  • Low reputation (0.5):
Posted by: Osama Hussein

79194991

Date: 2024-11-16 11:00:57
Score: 0.5
Natty:
Report link

I had the same problem, apparently the config didn't recognize the before password so I had to create a new one on the terminal

sudo -u postgres psql

ALTER USER username WITH PASSWORD 'your new password(the quotes remain)';

not only that, because I was using pg Admin and for it to connect I had to close then open so I can input the new password after that everything just started working.

Reasons:
  • Whitelisted phrase (-1): I had the same
  • No code block (0.5):
  • Low reputation (1):
Posted by: Tobias baraka

79194985

Date: 2024-11-16 10:57:56
Score: 0.5
Natty:
Report link

The best option depends on your use case, but generally, the most robust and maintainable solution is relocating resource files (Option 5) if they don’t need to be executable Python code. Here's why:

Why Relocate Resource Files? Prevents Compilation Automatically: Non-.py files won’t be compiled by pip or Python. Clear Separation: Separates resource files (e.g., configuration, templates, data) from your executable code, making your package easier to maintain. Cross-Platform Friendly: Avoids potential issues with different systems interpreting .py files as executable Python code. Simplifies Packaging: Removes the need for extra configuration in MANIFEST.in or setup.py.

Reasons:
  • Whitelisted phrase (-1): solution is
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Vanisha

79194969

Date: 2024-11-16 10:47:54
Score: 0.5
Natty:
Report link

This is a bug in the Linux glibc swprintf implementation which in some cases does not write null terminator into the last position of output buffer.

https://sourceware.org/bugzilla/show_bug.cgi?id=27857

This bug was recently fixed in the new glibc version 2.37. So after upgrading system library to new version, the provided example start working correctly.

As a workaround for older glibc versions (pre-2.37), it is possible to explicitly add null terminator. For example following code adds null terminator conditionally only when compiling for glibc and only when compiling for old version affected by that bug:

#include <iostream> 
#include <string> 
#include <cwchar> 

int main()
{

    wchar_t wide[5];

    std::swprintf(wide, sizeof wide/sizeof *wide, L"%ls", L"111111111");
#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 37))
    wide[(sizeof wide/sizeof *wide)-1] = L'\0';
#endif

    std::wcout << wide;
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Pali

79194967

Date: 2024-11-16 10:46:52
Score: 8.5 🚩
Natty:
Report link

Could you please share if this was achieved ?

Reasons:
  • RegEx Blacklisted phrase (2.5): Could you please share
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: ELK begineer

79194966

Date: 2024-11-16 10:45:51
Score: 0.5
Natty:
Report link

I have the project (lerna + rollup) with yarn. And for imports of icons i use url plugin import url from '@rollup/plugin-url';, e.g. rollup config looks like

import {defineConfig} from 'rollup';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import {terser} from 'rollup-plugin-terser';
import url from '@rollup/plugin-url';

import * as fs from 'fs';
import path from 'path';

const PACKAGE_NAME = process.cwd();
const packageJson = JSON.parse(fs.readFileSync(path.join(PACKAGE_NAME, 'package.json'), 'utf-8'));

const includePaths = ['**/*.woff', '**/*.woff2', '**/*.svg', '**/*.png'];

export default defineConfig({
  input: 'src/index.ts',
  output: [
    {
      file: packageJson.main,
      format: 'cjs',
      sourcemap: false,
      name: packageJson.name,
    },
    {
      file: packageJson.module,
      format: 'es',
      sourcemap: false,
      name: packageJson.name,
    },
  ],
  plugins: [
...
    url({
      fileName: '[name][extname]',
      include: includePaths,
      limit: 0,
    }),
  ],
});

You can see more detailed information my repo

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

79194961

Date: 2024-11-16 10:39:50
Score: 3
Natty:
Report link

You may need to add a Appdelegate.swift file if you want to switch your project from SwiftUI to UIKit. You need to create a new file named AppDelegate.swift which conforms to UIResponder, UIApplicationDelegate. Like: @main class AppDelegate: UIResponder, UIApplicationDelegate{ var window:UIWindow? // your code }

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @main
  • Low reputation (1):
Posted by: Talha Asif

79194959

Date: 2024-11-16 10:38:50
Score: 3
Natty:
Report link

Use like this fabric.Image.fromURL(e.target.result).then( function(img) {

}

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

79194957

Date: 2024-11-16 10:38:50
Score: 0.5
Natty:
Report link

Some slowness can be expected as Xcode attaches extra processes to your app/device for debugging, though here's a couple things to try.

  1. Release/debug build configuration

Try setting your build config from the Product menu > Option+click Run and set the build configuration to Release and see if that helps.

  1. Instruments

Instruments is a developer tool a part of Xcode that lets you test your app for memory leaks etc. You access it from the Xcode menu > Open Developer Tools > Instruments. It's probably beyond the scope of this answer but check out this Hacking With Swift article https://www.hackingwithswift.com/read/30/3/what-can-instruments-tell-us

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

79194956

Date: 2024-11-16 10:38:50
Score: 3
Natty:
Report link

Exact same issue happened to me. Updated expo go on IOS, updated expo sdk to 52, but in my case app crashes immediately after splash screen

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

79194953

Date: 2024-11-16 10:37:49
Score: 2
Natty:
Report link

I'm jumping for joy))) here is a working config that gives what I need!

const initialOptions = {
  "client-id": clientId,
  "disable-funding": "credit,card",
  "enable-funding": "blik,p24",
  intent: "capture",
  currency: "PLN",
  locale: "pl_PL",
};
Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Bogdan Kozhoma

79194939

Date: 2024-11-16 10:30:48
Score: 0.5
Natty:
Report link

I was fiddling around this recently and came up with this piece of solution, although I'm still working on a way to make these persist (maybe with a daemon of sorts?).

Google Chrome and friends and forks have this file called "Local State." I have no idea what exactly that file is responsible for as a whole, knowing there seems to be some sensitive data in there as well, but this block particularly got my interest;

{
  browser: {
    "enabled_labs_experiments": [
      "enable-parallel-downloading@1",
      "ozone-platform-hint@1",
      "wayland-text-input-v3@1"
    ],
    "first_run_finished": true,
    "last_whats_new_version": 131
  }
}

The .browser.enabled_labs_experiments is the path you're looking for here. You can set the flags and their values according to the chrome://flags page.

For example, in the block above, the following flags are set respectively;

Keep in mind that this is an array variable. For example, if you want to replicate the flags I have enabled here on Linux using jq, (assuming your profile is stored in $HOME/.config/google-chrome);

jq '.browser.enabled_labs_experiments = [ "enable-parallel-downloading@1", "ozone-platform-hint@1", "wayland-text-input-v3@1" ]' $HOME/.config/google-chrome/Local\ State > $HOME/.config/google-chrome/localstate.new
mv $HOME/.config/google-chrome/localstate.new $HOME/.config/google-chrome/Local\ State

The new "Local State" file will look drastically different than the original one you had before you launch Chrome. That's normal since it's a JSON file and jq prettifies its output for better human readability. Once you launch Chrome, your new flags will be picked up and the "Local State" file will be modified by Chrome to be in the same format as before.

Other pieces here include;

Side note: I'm not a Google employee but a computer engineering student who fiddles around Linux and similar a lot.

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

79194937

Date: 2024-11-16 10:29:47
Score: 4.5
Natty:
Report link

Has anyone succeeded in obtaining a refresh token using Android .NET (i.e. former Xamarin)?

Asking for offline access and thereby getting into 'HasResolution == true' will inevitable fail.

Passing an IntentSenderRequest to ActivityResultLauncher.Launch() is failing with an error message: 'cannot cast IntentSenderRequest to Intent'

I almost about to give up on this and continue using the deprecated GoogleSignInClient API.

Please help!

Reasons:
  • RegEx Blacklisted phrase (3): Please help
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Thomas

79194931

Date: 2024-11-16 10:24:46
Score: 2
Natty:
Report link

if you are using IJ simple select the maven option on the right bar then use the refresh arrows, this will be solved . it worked perfectly on my side

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

79194920

Date: 2024-11-16 10:17:43
Score: 14 🚩
Natty:
Report link

I have the same issue. Did you fix it?

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • RegEx Blacklisted phrase (3): Did you fix it
  • RegEx Blacklisted phrase (1.5): fix it?
  • Low length (2):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: ahmed_mahmoud_aly

79194918

Date: 2024-11-16 10:16:40
Score: 7 🚩
Natty:
Report link

On which website did you find the animals API? I clicked the link https://freetestapi.com/api/v1/animals? in Chrome browser, and there was an error...

Reasons:
  • RegEx Blacklisted phrase (3): did you find the
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Aman KUmar

79194908

Date: 2024-11-16 10:12:36
Score: 6 🚩
Natty:
Report link

Can we implement the same using expo-web-browser?

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Can we
  • Low reputation (1):
Posted by: Muninder Kaur

79194906

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

I got the same error and noticed that I added __() translate function in a config file called menu.php.

Laravel was not showing this is as issue until I cleared the cache. So, I went to the error line and commented the exception code and it shows the that is trying to some something with translate class.

So, I removed the translate function and it fixed the issue.

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

79194905

Date: 2024-11-16 10:10:35
Score: 0.5
Natty:
Report link

Could be a scope problem here. The 'this' can be bind, but I think when you try it with an arrow function it can resolve the issue.

webservice_returnResult('api/sample/GetById', Id).done((result) => {
    Name = result.Name;
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: arvie

79194904

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

A green screen is a background used in video production that is replaced with other images or videos using chroma keying. The green color is removed, allowing for digital backgrounds to be inserted. It's commonly used in movies, TV, and live streaming. Green is preferred because it doesn’t match human skin tones, making it easier to separate the subject from the background. Read nmore..!

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

79194898

Date: 2024-11-16 10:06:34
Score: 0.5
Natty:
Report link

Sending Email on Form Submit Using MailApp

I tried your code modified and added a solution, I created an Installable Trigger event on which on every form submit it will send the attachment along with the body content.

Code.gs on Spreadsheet

function onFormSubmit(e) {
  var responses = e.values;

  // Email subject file and body
  var email = responses[1]; // Assuming the email is on the first response
  var fileItem = responses[2]; // Assuming the file is the second response
  var subject = "New File Uploaded";
  var body = "A new file has been xuploaded.\n\n";

  if (fileItem) {
    body += responses
    MailApp.sendEmail(email, subject, body);
    Logger.log("File sent successfully!");
  }
}

Sample Output:

Sample Output

Sample Form:

Sample form

How to Install a Trigger Event:

In your form click the View in Sheets.

Sample 3

Click Extension > Apps Script.

Appscript

Click on Triggers.

Sample 5

New Trigger then add the function to change the event type to On form Submit.

Trigger Event

References:

Installable Triggers

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

79194889

Date: 2024-11-16 09:58:32
Score: 1.5
Natty:
Report link

Still 2024 and select multiple is still not working. I am using Blazor and .Net core 8. I had to make one from scratch and I share it for anyone who has the same problem. This is a very basic design, so you can modify to suit your needs.

<div class="dropdown">
    <button class="dropdown-toggle mr-4" data-toggle="dropdown" type="button" @onclick="() => show = !show "
    aria-haspopup="true" aria-expanded="false">
        @Tip
    </button>
    @if (ListLabels != null){
        <div class="dropdown-menu @(show? "show":"")">
            <div class="form-group row">
                @for (int i = 0; i < ListLabels.Length; i++){
                    <div class="@GetCol(NumCols)">
                        <label class="form-check-label">
                            <input class="form-check-input"
                            type="checkbox"
                            checked="@list_values[i]"
                            @bind-value="list_values[i]">
                            @ListLabels[i]
                        </label>
                    </div>
                }
            </div>
        </div>
    }
</div>

@code 
{
    [Parameter]
    public string Tip { get; set; } = string.Empty;

    [Parameter]
    public int NumCols { get; set; } = 1;

    [Parameter]
    public string[] ListLabels { get; set; }

    bool[] list_values = null;
    [Parameter]
    public bool[] ListValues
    {
        get => list_values;
        set
        {
            list_values = value;
        }
    }

    bool show = false;

    string GetCol(int value)
    {
        switch (value){
            case 1: return "col-12";
            case 2: return "col-6";
            case 3: return "col-4";
            case 4: return "col-3";
            case 6: return "col-2";
            case 12: return "col-1";
            default: return "col-12";
        }
    }

    protected override void OnParametersSet()
    {
        if (ListLabels != null){
            if (list_values == null || list_values.Length != ListLabels.Length){
                list_values = new bool[ListLabels.Length];
            }
        }
    }
}

To use it is very simple

<InputMultiSelector ListLabels="list_labels" ListValues="list_checks" Tip="Choose your pizza" NumCols="3"/>
@code 
{
    bool[] list_checks = new bool[6] { false, true, true, false, false, true };
    string[] list_labels = new string[6] { "cheese", "tomatoes", "mozarella", "mushrooms", "pepperoni", "onions" };
}
Reasons:
  • Blacklisted phrase (2): still not working
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mario

79194882

Date: 2024-11-16 09:54:32
Score: 1.5
Natty:
Report link

Try this tool https://anym3u8player.com/yt/

  1. Go to https://anym3u8player.com/yt/. 2 Drop your YouTube livestream URL into the box. 3 Go to “Fetch hlsManifestUrl” button a click. 4 Your M3U8 link appears, ready for action.
Reasons:
  • Whitelisted phrase (-1): Try this
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mark Ikinya

79194877

Date: 2024-11-16 09:49:31
Score: 2
Natty:
Report link

I had the same problem with signing and just didn't realise that you do not only have to deactivate the options for iCloud and Push Notifications under Signing & Capabilities but rather delete them by clicking the trash right next to them. Took me way too long to figure this out.

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Julian

79194873

Date: 2024-11-16 09:47:30
Score: 4
Natty:
Report link

as Simon Mourier Commented the solution was to add <UseWPF>true</UseWPF> to .csproj project file

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
    <UseWPF>true</UseWPF>

Was related to How can I reference WindowsBase in .Net5?

Reasons:
  • Blacklisted phrase (0.5): How can I
  • Probably link only (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Eliy Arlev

79194868

Date: 2024-11-16 09:43:29
Score: 1.5
Natty:
Report link

Had flickering when animating scale in Firefox, do not know how, but adding z: 1 fixed it

animate={{
  z: 1,
  scale: 1.35,
}}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sayid

79194866

Date: 2024-11-16 09:43:29
Score: 3
Natty:
Report link

if you use setting up webpack from scratch - npx storybook@latest add @storybook/addon-webpack5-compiler-babel or npx storybook@latest add @storybook/addon-webpack5-compiler-swc

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

79194853

Date: 2024-11-16 09:35:24
Score: 6 🚩
Natty:
Report link

can you put the anchor through a URL shortener?

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

79194847

Date: 2024-11-16 09:33:24
Score: 2.5
Natty:
Report link

System.setProperty("javax.net.ssl.trustStore", "C:\Program Files\Java\jdk-18.0.2.1\lib\security\cacerts"); System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); i added these lines in my method it is now working fine

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

79194845

Date: 2024-11-16 09:31:23
Score: 2
Natty:
Report link

To replace domain-to-IP mapping without using etc/hosts in Windows, you can:

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: mehmet t. akalin

79194828

Date: 2024-11-16 09:16:18
Score: 10 🚩
Natty:
Report link

Have you found a solution? I have the same problem.

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • RegEx Blacklisted phrase (2.5): Have you found a solution
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Thomas Pienkny

79194816

Date: 2024-11-16 09:07:15
Score: 3
Natty:
Report link

Update your Expo configuration from "output": "static" to "output": "single" in app.json file. Then start the development server again.(npx expo start)

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

79194812

Date: 2024-11-16 09:05:15
Score: 2
Natty:
Report link

Old question, but in case anyone is wondering onAnimationFinish only fires when loop is specifically set to false with loop={false}.

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

79194807

Date: 2024-11-16 09:03:14
Score: 2.5
Natty:
Report link

I suggest closing the pool at the very end of the provided sample. The CloseThreadpoolCleanupGroupMembers function waits for all the cleanup group members to terminate before releasing them. If you close the pool beforehand, as described, the callback function may never be invoked.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Varga Zoltán