79129140

Date: 2024-10-26 17:52:52
Score: 2.5
Natty:
Report link

The way to avoid this problem is to remove the --release from your run configuration (or delete the run configuration with --release if you have separate ones for dev builds and release builds, as I had) and instead use the profile selection dropdown to switch between dev and release.

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

79129118

Date: 2024-10-26 17:42:50
Score: 2.5
Natty:
Report link

Need help to install ODBC driver to access Apache Kylin. Kylin (through Docker) has been deployed and is working. I want to access its 'cubes' from Power BI.

file: Kyligence_ODBC-Driver-for-Apache-Kylin cannot install it as Data Source in Windows 11 Pro. It showed this error message.

'Kylin ODBC says: Username/Password not authorized, or server out of service.'

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • No code block (0.5):
  • Low reputation (1):
Posted by: joey

79129115

Date: 2024-10-26 17:41:49
Score: 2.5
Natty:
Report link

ok oat oat oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat oat oat oat oat oats oat oat oat oat https://r.mtdv.me/reviewjpng

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mr.ur mom

79129100

Date: 2024-10-26 17:33:48
Score: 2
Natty:
Report link

You can use map.Invalidate() to update drawings

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Omid Rezaeinejad

79129098

Date: 2024-10-26 17:31:47
Score: 1
Natty:
Report link

Add double quotes for your value "<%=str%>" in <jsp:param .... value="<%=str%>"/>

<%
  String str = "prerna";
%>

<jsp:include page="index.html">
    <jsp:param name="type1" value="<%=str%>">
    </jsp:param>
</jsp:include>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Priyan E

79129096

Date: 2024-10-26 17:30:47
Score: 1
Natty:
Report link

Here's a set of trivial convenience functions which compile the other answers. Be aware that many older systems, such as Commodore 8-bits and 68K Apple Macintosh, used only Return (ASCII 13) for line endings. Thanks to @frank-shearar for mentioning the unexpected behavior of SBCL.

(defvar *crlf*
        (concatenate 'string #(#\Return #\Linefeed))
        "DOS line ending sequence.")

(defun dos-line (string)
  "Append the DOS line ending sequence to STRING."
  (concatenate 'string string *crlf*))

(defun dos-line-p (string)
  "Does STRING have the DOS line ending sequence?"
  (eql (- (length string) (length *crlf*))
       ;; SEARCH works for any sequence, but probably isn't the fastest
       (search *crlf* string :from-end t)))

(defun ensure-dos-line (string)
  "Ensure STRING ends with the DOS line ending sequence."
  (if (dos-line-p string)
      string
      (dos-line string)))

;;; Tests
;;; Just load the file like this:
;;;   sbcl --script dos-lines.lisp | hd
(let* ((s1 "Foo the bar!")
       (s2 (ensure-dos-line s1)))
  (assert (equal (format nil "~A~C~C" s1 (code-char 13) (code-char 10))
                 s2))
  (princ s2))
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @frank-shearar
  • Low reputation (1):
Posted by: ouchmyspleen

79129092

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

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

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

79129088

Date: 2024-10-26 17:25:46
Score: 6.5
Natty: 7
Report link

how can i do these this by seen the character but get the follow source https://www.mycompiler.io/view/CS2cGydmOEN https://www.mycompiler.io/view/CS2cGydmOEN

Reasons:
  • Blacklisted phrase (0.5): how can i
  • Blacklisted phrase (1): can i do
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Starts with a question (0.5): how can i
  • Low reputation (1):
Posted by: kaaluXhatela

79129077

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

Use Flutter Local Notifications library - https://pub.dev/packages/flutter_local_notifications#periodically-show-a-notification-with-a-specified-interval

Periodically show a notification with a specified interval:

const AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
    'repeating channel id', 'repeating channel name',
    channelDescription: 'repeating description');
const NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
await flutterLocalNotificationsPlugin.periodicallyShow(0, 'repeating title',
'repeating body', RepeatInterval.everyMinute, notificationDetails,
androidAllowWhileIdle: true);
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Иван Игонькин

79129073

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

I had a similar problem. I wanted to be able to adjust the host style on certain components in a consistent way, but not all components (I am setting height and overflow). I used @HostBinding('style') and created a global constant. So each class I want to have this common style, I do this:

import { Component, HostBinding} from '@angular/core';
import { MAIN_CONTENT_HOST_STYLE} from '../../app.constants';

//Using HostBinding directly to set the Default style for main screen

@Component({
  selector: 'app-my-component',
  templateUrl: './my.component.html',
  styleUrls: ['./my.component.css']
})
export class MyComponent {
  @HostBinding('style') style = MAIN_CONTENT_HOST_STYLE;
}
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Stephen Patton

79129069

Date: 2024-10-26 17:15:43
Score: 3.5
Natty:
Report link

I need Help.. I am working on such code, and I want to check if I am on the correct path:

Comparing two sets of input images, these inputs are slightly different from each other, let the CNN learn what is the difference and apply these differences to the new inserted unseen images later.

import os
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Reshape # Import Reshape here
from tensorflow.keras.preprocessing.image import ImageDataGenerator
import matplotlib.pyplot as plt


train_datagen = ImageDataGenerator(rescale=1./255)
train_generator = train_datagen.flow_from_directory(
    '/content/drive/MyDrive/Train',
    target_size=(200, 200), 
    batch_size=32,
    color_mode='grayscale',  # Explicitly set color mode to grayscale
    class_mode='input') 

test_datagen = ImageDataGenerator(rescale=1./255)
test_generator = test_datagen.flow_from_directory(
    '/content/drive/MyDrive/Test',
    target_size=(200, 200),
    batch_size=32,
    color_mode='grayscale',  # Explicitly set color mode to grayscale
    class_mode='input')
model = Sequential()
model.add(Conv2D(32, (3, 3), activation='sigmoid', input_shape=(200, 200, 1)))
model.add(MaxPooling2D((2, 2)))
model.add(Conv2D(32, (3, 3), activation='relu'))
model.add(MaxPooling2D((2, 2)))
model.add(Flatten())
model.add(Dense(64, activation='relu'))
# Reshape the output to match the input image shape
model.add(Dense(200 * 200 * 1, activation='sigmoid'))
# Use tf.keras.layers.Reshape instead of just Reshape
model.add(tf.keras.layers.Reshape((200, 200, 1))) # Reshape the output to match the input image shape
model.compile(optimizer='adam', loss='mse', metrics=['mse'])
history = model.fit(
    train_generator,
    epochs=50,  # Adjust number of epochs
    validation_data=test_generator)
# steps_per_epoch and validation_steps are inferred automatically by Keras
# from the length of the generators.
import numpy as np # Import the numpy library
import matplotlib.pyplot as plt
import numpy as np

new_image_path = '/content/drive/MyDrive/Output/output/11.jpg'
# Load the image in grayscale by specifying color_mode='grayscale'
new_image = tf.keras.utils.load_img(new_image_path, target_size=(200, 200), color_mode='grayscale') 
new_image = tf.keras.utils.img_to_array(new_image)
new_image = np.expand_dims(new_image, axis=0)

predicted_image = model.predict(new_image)
# Reshape to (200, 200) by removing the extra dimension
predicted_image = predicted_image.reshape((200, 200))  

# Assuming predicted_image is still grayscale, use cmap='gray'
plt.imshow(predicted_image, cmap='gray')  
plt.show()
Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (2.5): I need Help
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ismaeil Raad Alnaab

79129056

Date: 2024-10-26 17:08:41
Score: 0.5
Natty:
Report link

Easy.

while(<>) {
    $_ =~ s/([^ ])=/$1 =/;
    $_ =~ s/=([^ ])/= $1/;
    print;
}

The [^ ]=, which means "not space followed by equal sign". But since [^ ] will by itself eats a symbol - you will need to "preserve it" by using parenthesis, and reuse that symbol by using $1.

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

79129055

Date: 2024-10-26 17:08:41
Score: 0.5
Natty:
Report link

Use PCA,KPCA on your dataset with variance 40% - binary datasets,60-70% - multiclass datasets. PCA reduces dimensionality and u obtain minimal numbers clusters KPC1 to KPCn that represent your minimal numbers of hidden layers. Fed those KPCn clusters to K-Mean clustering and u obtain corresponding numbers of neurons for each cluster. Then test trial your NN topology with performance and accuracy. U can use other clustering methods for estimating numbers of neurons for each cluster using modern Elbow method and then compare NN topology results in trial manor to see which performs how for given output against known values. To know which NN topology perform better use different values for regularization, best NN topology doesn't change or doesn't change much for different regularization values on accuracy. For known values against the predicted values u can trial check accuracy in excel which ones performs better. Look online for further info on how to do it. This is the by far best NN topology estimating method to start on. Further u can use Grid search or similar methods when pointed to right direction. Hope that helps all the other users who struggle with hyperparameter estimation.

Reasons:
  • Whitelisted phrase (-1): Hope that helps
  • Long answer (-1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Alvin

79129050

Date: 2024-10-26 17:03:40
Score: 2
Natty:
Report link

Hum, nevermind. Cannot find the class I want to hide in ILSpy, yet serialization has started working. I'm using CsvReader which wasn't working but after adding all the skip rules above now it works. Not sure how, but okay.

Anyway, the above obfuscates and my program still runs, so I will leave it here as an example for others. Personally I very much prefer to learn by example.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • No code block (0.5):
  • Self-answer (0.5):
Posted by: Gerry

79129037

Date: 2024-10-26 16:58:39
Score: 0.5
Natty:
Report link

As the @Zymotik's answer states, there are two answers: ESList Output and write your own. Since ESLint Output is unmaintained and no longer works, here's option #2:

import { ESLint } from "eslint";
import * as fs from "node:fs/promises";
import * as path from "node:path";

try {
  const eslint = new ESLint({});

  const results = await eslint.lintFiles(process.cwd());
  await fs.writeFile(path.join(process.cwd(), "eslint-output.json"), JSON.stringify(results));

  const hasProblems = results.some((result) => result.errorCount > 0 || result.warningCount > 0);

  if (hasProblems) {
    const metadata = {
      cwd: process.cwd(),
      rulesMeta: eslint.getRulesMetaForResults(results),
    };
    const formatter = await eslint.loadFormatter("stylish");
    console.log(await formatter.format(results, metadata));
    process.exit(1);
  }
} catch (error) {
  console.error(error);
  process.exit(1);
}

process.exit(0);
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Zymotik's
  • Low reputation (0.5):
Posted by: Adam Fanello

79129024

Date: 2024-10-26 16:53:38
Score: 1
Natty:
Report link

To build on top of the user1693593 answer, I've added a method to add missing steps between generated images for thicker outlines or more pointy base image. It works by adding steps between set checkpoint based on set granularity.

  // Notice that I've used 0.75 instead of 0.5 as it generates less pointy border
  let dArr: number[][] = [
    [-0.75, -0.75], // ↖️
    [ 0   , -1   ], // ⬆️
    [ 0.75, -0.75], // ↗️
    [ 1   ,  0   ], // ➡️
    [ 0.75,  0.75], // ↘️
    [ 0   ,  1   ], // ⬇️
    [-0.75,  0.75], // ↙️
    [-1   ,  0   ], // ⬅️
  ];

  // Our breaking point, below 5 pixels it's not worth runing
  if (thickness <= 5) {
    return dArr;
  }

  // 2.5 is the factor deciding the amount of steps in between checkpoints
  // the lower the number => the more steps will be added
  const granularity = Math.floor(thickness / 2.5);
  let newDArr: number[][] = [];
  for(let i=0; i < dArr.length; i++) {
    newDArr.push(dArr[i]);
    // c* is our current directions and d* is a destination 
    const [cX, cY] = dArr[i],
      [dX, dY] = i + 1 === dArr.length ? dArr[0] : dArr[i + 1]
    ;

    // Here we are defining our trends: up or down.
    // As Y and X can have different trend (X can go down where Y up)
    // we have to treat them independly
    const trendX = cX > dX ? -1 : 1,
      trendY = cY > dY ? -1 : 1,
      bX = (Math.abs(cX - dX)/granularity) * trendX,
      bY = (Math.abs(cY - dY)/granularity) * trendY,
      between: number[][] = []
    ;
    let x = cX,
      y = cY
    ;
    while (
      (
        trendX > 0 && x + bX < dX
        || trendX < 0 && x + bX > dX
      )
      && (
        trendY > 0 && y + bY < dY
        || trendY < 0 && y + bY > dY
      )
    ) {
      x += bX;
      y += bY;
      between.push([x, y]);
    }
    newDArr = newDArr.concat(between);
  }

  return newDArr;

Whole function (with user1693593 answer):

const outlineImage = (
  image: HTMLImageElement,
  fill: string,
  thickness: number,
  asWidth: number,
  asHeight: number,
): void => {
  const canvas = document.createElement('canvas'),
    ctx = canvas.getContext('2d')!
  ;
  let dArr = [
    [-0.75, -0.75], // ↖️
    [ 0   , -1   ], // ⬆️
    [ 0.75, -0.75], // ↗️
    [ 1   ,  0   ], // ➡️
    [ 0.75,  0.75], // ↘️
    [ 0   ,  1   ], // ⬇️
    [-0.75,  0.75], // ↙️
    [-1   ,  0   ], // ⬅️
  ];

  if (thickness > 5) {
    const granularity = Math.floor(thickness / 2.5);
    let newDArr: number[][] = [];
    for(let i=0; i < dArr.length; i++) {
      newDArr.push(dArr[i]);
      const [cX, cY] = dArr[i],
        [dX, dY] = i + 1 === dArr.length ? dArr[0] : dArr[i + 1]
      ;

      const trendX = cX > dX ? -1 : 1,
        trendY = cY > dY ? -1 : 1,
        bX = (Math.abs(cX - dX)/granularity) * trendX,
        bY = (Math.abs(cY - dY)/granularity) * trendY,
        between: number[][] = []
      ;
      let x = cX,
        y = cY
      ;
      while (
        (
          trendX > 0 && x + bX < dX
          || trendX < 0 && x + bX > dX
        )
        && (
          trendY > 0 && y + bY < dY
          || trendY < 0 && y + bY > dY
        )
      ) {
        x += bX;
        y += bY;
        between.push([x, y]);
      }
      newDArr = newDArr.concat(between);
    }

    dArr = newDArr;
  }

  canvas.setAttribute('width', String(asWidth + thickness*2));
  canvas.setAttribute('height', String(asHeight + thickness*2));

  for (let i = 0; i < dArr.length; i++) {
    ctx.drawImage(
      image,
      thickness + dArr[i][0] * thickness,
      thickness + dArr[i][1] * thickness,
      asWidth,
      asHeight,
    );

    if (thickness === 0) {
      break;
    }
  }

  ctx.globalCompositeOperation = 'source-in';
  ctx.fillStyle = fill;
  ctx.fillRect(0, 0, canvas.width, canvas.height);
  ctx.globalCompositeOperation = 'source-over';

  ctx.drawImage(image, thickness, thickness, asWidth, asHeight);
}

Before: Script output before additions After: Script output after additions

Disclaimer:

Based on the amount of additional steps you want to add or thickness of the border, this might become quite slow and loose its edge over the marching ant's solution.

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): user1693593
  • User mentioned (0): user1693593
  • Low reputation (0.5):
Posted by: Mortimer

79129019

Date: 2024-10-26 16:52:38
Score: 2
Natty:
Report link

The simple way that I found is:

  1. Install nodemon globally npm install -g nodemon
  2. Point to nodemon binary in Node interpreter section
  3. Run your app! 😎

Nodemon as Node interpreter

enter image description here

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

79129017

Date: 2024-10-26 16:51:37
Score: 0.5
Natty:
Report link
@media (min-width:768px) {
  .list-group-vertical-md {
    flex-direction: column;
  }
}
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: koque

79129014

Date: 2024-10-26 16:48:37
Score: 1.5
Natty:
Report link

What you want isn't going to be possible on an Android phone. The OS is not a realtime OS, it's not designed to give that kind of time critical performance. If you truly need this, you need to use a different operating system altogether. Or you need to rethink your requirements- why do you need these vibrations to be correct to the second?

Reasons:
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): What you
  • High reputation (-2):
Posted by: Gabe Sechan

79129010

Date: 2024-10-26 16:46:36
Score: 0.5
Natty:
Report link

I realize I'm a 'little' late, but here goes for future generations:

In order to avoid the exponential expension described in the question we have to introduce new variables and make two expressions 1) make expression that encodes a number 2) make an expression that can compare against the encoding

I'm using binary encoding here so 3 -> 11 and 9 -> 1001, this should be familiar to programmers

Now let's introduce a full adder (google this). This will add three bits returning two new variables 'sum' and 'carry'

Sum is 1 only if an odd number of bits are 1: (Sum & ((a&-b&-c)|(-a&b&-c)|(-a&-b&c)|(a&b&c))) | (-sum & -((a&-b&-c)|(-a&b&-c)|(-a&-b&c)|(a&b&c)))

Carry is 1 if at least 2 bits are 1: (Carry & ((a&b)|(a&c)|(c&b))|( -Carry & -((a&b)|(a&c)|(c&b)))

This now encodes the sum of two variables. This principle can be chained in order to add any number it variables (Google that too)

For comparison e.g. with 3 where ex is the encoded number: -En&...-E2&E1&E0 (because three is ...000011 in binary)

I hope it helps somebody, cheers!

Reasons:
  • Blacklisted phrase (1): cheers
  • Whitelisted phrase (-1): hope it helps
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: jiquera

79129004

Date: 2024-10-26 16:43:35
Score: 1
Natty:
Report link

Readability wise I wouldn't use "<>" unless you drop a comment somewhere explaining what it is.

I was trying to follow the NQueens Benchmark on the HP Museum site and I had NO idea what that was!

Worse still, they sprinkled that in a different languages where "<>" isn't valid. Search engines don't really work with symbols, so searching it up didn't help.

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

79128987

Date: 2024-10-26 16:32:33
Score: 3.5
Natty:
Report link

Yes using drizzle studio solved the issue but i recommend using it only in dev mode , if you build your app with it the app crashes in production .

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

79128984

Date: 2024-10-26 16:31:32
Score: 0.5
Natty:
Report link

You can search the following to see if they have the data you need:

You should search Pypi for projects similar to your own. I don't use any medical python libraries, but there are perhaps python libraries out there that access similar datasets that you are looking for, like https://pypi.org/project/pyhealth/ (You can go to their project page, they list their datasets)

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

79128981

Date: 2024-10-26 16:30:32
Score: 1
Natty:
Report link

I found something that works and it's better than having to bring up a dev console window.

  1. Create a new profile
  2. Choose Click Once
  3. Select a publish location (this is where your files will appear)
  4. For "How will users install the application" Choose "From a CD..."

Fill out the rest as you like.

Publish will now put the files in the location selected in step 3.

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
Posted by: Gerry

79128972

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

I have manually put in some data and the code works. First picture in editor Second picture after starting the simulation

Check if you have the button in canvas. Buttons as children of canvas

Check, if you have the TMP package installed. Packages

If you did all these things and created the buttons through UI -> Button - Text Mesh Pro; The code will work, otherwise there is a problem with your database, but if you said that the debugs show the right asignment of values, then the problem has to be in creation of the Button gameObject.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;         // ui components
using TMPro;                  // Add the TextMeshPro namespace

public class questionLoader : MonoBehaviour
{
    public TextMeshProUGUI questionText;

    public Button choiceAButton;
    public Button choiceBButton;
    public Button choiceCButton;
    public Button choiceDButton;

    private string[] dbReference;

    void Start()
    {
        // Initialize Firebase database reference
        dbReference = new string[4];
        dbReference[0] = "A";
        dbReference[1] = "B";
        dbReference[2] = "C";
        dbReference[3] = "D";

        // Load the first question to test
        LoadQuestion("01");
    }

    void LoadQuestion(string questionID)
    {
        Debug.Log($"Loading question with ID: {questionID}");


                    // Set question text
                    string question = "????????";
                    Debug.Log($"Question: {question}");


                    // Check if choice nodes exist
                    bool choiceAExists = dbReference[0] != null;
                    bool choiceBExists = dbReference[1] != null;
                    bool choiceCExists = dbReference[2] != null;
                    bool choiceDExists = dbReference[3] != null;

                    Debug.Log($"Choice A Exists: {choiceAExists}");
                    Debug.Log($"Choice B Exists: {choiceBExists}");
                    Debug.Log($"Choice C Exists: {choiceCExists}");
                    Debug.Log($"Choice D Exists: {choiceDExists}");

                    // see the data stored
                    Debug.Log($"Choice A: {dbReference[0]}");
                    Debug.Log($"Choice B: {dbReference[1]}");
                    Debug.Log($"Choice C: {dbReference[2]}");
                    Debug.Log($"Choice D: {dbReference[3]}");

                    // Update question text using TextMeshProUGUI
                    choiceAButton.GetComponentInChildren<TextMeshProUGUI>().text = dbReference[0];
                    choiceBButton.GetComponentInChildren<TextMeshProUGUI>().text = dbReference[1];
                    choiceCButton.GetComponentInChildren<TextMeshProUGUI>().text = dbReference[2];
                    choiceDButton.GetComponentInChildren<TextMeshProUGUI>().text = dbReference[3];


                    Debug.Log("Question and choices updated");
                
    }

}
Reasons:
  • Blacklisted phrase (1): ???
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Epidermis

79128965

Date: 2024-10-26 16:24:31
Score: 2
Natty:
Report link

I had the same issue where Storage::url() was returning a broken link. I managed to fix it by running rmdir public\storage and then php artisan storage:link

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

79128964

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

I realized that because the gradient of this function (with respect to w) being 2*x*cos(w*x)*sin(w*x), it depends linearly on x. And since I am using lots of large input combined with small input, the gradient is essentially random.

I was able to successfully train the 'network' using just 6 sample points (0 - 5).

To use all the data, I guess, I will have to come up with a well behaved gradient function which does not depend too much on the variable x.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Damn it My Foot

79128960

Date: 2024-10-26 16:22:30
Score: 3
Natty:
Report link

try this https://github.com/Pavel852/latex

transform latex to html, in php

Reasons:
  • Whitelisted phrase (-1): try this
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Pavel Bartoš

79128958

Date: 2024-10-26 16:22:30
Score: 1
Natty:
Report link

Simple solution your call:

$pdf->Cell(65 ,3, "Helene",1, 1, 'R');
```

Change the 'R' to 'C'  for centered
or
Change the 'R' to  'L' for left.
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Debbie Kurth

79128952

Date: 2024-10-26 16:18:29
Score: 5.5
Natty: 7
Report link

best way follow this tutorial for middleware pipeline https://www.bacancytechnology.com/blog/implement-middleware-pipeline-in-vuejs

Reasons:
  • Blacklisted phrase (1): this tutorial
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: odion_cloud

79128948

Date: 2024-10-26 16:12:25
Score: 11.5 🚩
Natty: 5.5
Report link

Did you find a fix for this?

Having the same issue.

Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (3): Did you find a fix
  • RegEx Blacklisted phrase (1.5): fix for this?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): Having the same issue
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did you find a fix for this
  • Low reputation (1):
Posted by: 0bjekt

79128946

Date: 2024-10-26 16:12:25
Score: 2
Natty:
Report link

I understand that it is ok using repository and dao together. Consider the scenario: the app deals with data come from network and from local database. It makes sense to use repository and dao together. The app does not need to know wherenthe data come from. The repository tries to access the online data. On success, it stores these data locally as a cache. If the network is unavailable, the repository can recover the data from lical database. Theregore, it can use DAO to access the DB.

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

79128943

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

I've found more recent information on this. You can now use the following syntax according to the AWS Redshift documentation:

CREATE TABLE bar AS SELECT json_parse('{"scalar_array": [1, 2.3, 45000000]}') AS data;
SELECT index, element FROM bar AS b, b.data.scalar_array AS element AT index;

https://docs.aws.amazon.com/redshift/latest/dg/query-super.html

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: its.just.me

79128931

Date: 2024-10-26 16:08:24
Score: 1
Natty:
Report link

I see this post is old but it looks like it still gets a lot of views,...

You can also open a new window for VS Code, start a new or open a throw away project,.. this will allow you to create any language file you may need and drag and drop it on the tab bar of your original project. you will need to build it properly for intellisense to work or just duplicate your original project (rename to avoid confusion later). I think there are some good changelog extensions that can do the same, I'm already too heavy with the extensions so I just do this for quick stuff.

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

79128923

Date: 2024-10-26 16:04:23
Score: 1
Natty:
Report link

I found my error: the 2nd call to tcsetattr (to restore the previous settings) was not always called. A silly copy-and-paste error.

For anyone interested, I have to pieces of code handling the actual input, divided via #ifdef and #elif. One is for Windows and one is for Linux. In the Windows code, I immediately return, while in the Linux code, I set a variable that I return later. But on Ctrl+[letter] combinations, I copied the return and didn't notice it was wrong 😅

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

79128917

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

It seems like expo sorts your route names alphabetically first, and then display the first item(screen) as your initial route. Workaround, export the following from your _layout.tsx

export const unstable_settings = {
  initialRouteName: 'your-route-name',
};

https://docs.expo.dev/router/advanced/router-settings/

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

79128915

Date: 2024-10-26 16:02:22
Score: 3
Natty:
Report link

Encrypted Seed:55899a74690d0d20bb2d5826c625f9932e13542b7d4334b1605df310a449070e Encrypted Result:5c274005d10e2aa0912b2ec28b9eaf6d61d0e87b59c3bd98f6fab6247d332beb

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: Shahbaz Ansari

79128900

Date: 2024-10-26 15:52:20
Score: 4
Natty:
Report link

This relay is not working in windows 11 (if anyone encountered this problem)

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

79128893

Date: 2024-10-26 15:49:20
Score: 1.5
Natty:
Report link

I was facing a similar issue while updating the partition using Spark. For me, It was fixed by setting the correct hive.metastore.uris in spark configs.

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

79128892

Date: 2024-10-26 15:49:20
Score: 2.5
Natty:
Report link

Yes, I had the same problem.

Just turn off the Airplay Receiver in Airplay and Handoff and it should stop. It is also running on localhost:7000.

I have tried everything in the Terminal but nothing works. The PID just keeps changing. It is officially called "ControlCe".

Just use localhost:5001 for now or turn off Airplay receiver. There is no other way I am afraid.

Reasons:
  • Blacklisted phrase (1): ve tried everything
  • Blacklisted phrase (1): but nothing work
  • Whitelisted phrase (-1): I had the same
  • No code block (0.5):
  • Low reputation (1):
Posted by: user24350118

79128888

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

I figured it out! There was no problem with my code. The problem was with stockfish. I found out on the perftree github page that its last commit was 3 years ago. So I downloaded stockfish 13, which came out before the last commit, and it works!

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

79128885

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

i have a qeustion? what are the numbers on track 2 that fall after the service code? what do they represent and why are they different for each card?

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

79128881

Date: 2024-10-26 15:44:18
Score: 3.5
Natty:
Report link

I have this error Anyone to help?

SyntaxError: Unexpected end of input at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:152:18) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:298:14) at async link (node:internal/modules/esm/module_job:67:21)

Reasons:
  • RegEx Blacklisted phrase (1): I have this error
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: leandro kappeel

79128867

Date: 2024-10-26 15:36:16
Score: 0.5
Natty:
Report link

Maybe this will help where cell A1 is housing the URL;

=REGEXEXTRACT(A1,"_campaign=(.+)&utm_content")
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Haluk

79128858

Date: 2024-10-26 15:31:15
Score: 0.5
Natty:
Report link

sequence.NEXTVAL in INSERT ALL is evaluated only once. Either you change to multi INSERT, either you wrap the sequence.NEXTVAL in a function.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: p3consulting

79128855

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

The manpage says it is "MT-Safe locale", which means it is "safe to call in the presence of other threads", except it reads from the locale object without any form of synchronization, and thus is not safe to call concurrently with any locale change.

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

79128853

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

I found it in:

Window > Preferences > C/C++ > Code Style > Formatter > "active profile" > Edit > Off/On Tags

set checkbox "Enable Off/On tags"
Off tag: @formatter:off
On tag: @formatter:on

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

79128844

Date: 2024-10-26 15:27:12
Score: 8 🚩
Natty: 5
Report link

could someone help me? when running my script gives this error in the terminal: SyntaxError: Unexpected end of input at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:152:18) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:298:14) at async link (node:internal/modules/esm/module_job:67:21)

Anyone who can help me find the error in the script will be very grateful

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): could someone help me
  • RegEx Blacklisted phrase (2): will be very grateful
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: leandro kappeel

79128835

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

The easiest way is to use "marker" in plot:

from matplotlib import pyplot
import numpy as np

t = np.linspace(-2, 2, 100)
plt.plot(t, np.sin(t), marker='<')
plt.show()
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Haitao Tian

79128830

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

Apparently something was wrong with the link in the settings in the Discord module on Make.com. Re-inserting the link the Discord client gave me when I set up the bot there into the Make.com module fixed the issue and also made some of the other settings I had tried out obsolete (none other the ones mentioned in the Make.com docs were needed).

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

79128817

Date: 2024-10-26 15:14:09
Score: 1
Natty:
Report link

For me it works with:

 <attribute name="accel">&lt;Control&gt;a</attribute>

However, the menu must be opened.

so "Enter + Ctrl + A"

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

79128816

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

You already know the reason: Thread.join() blocks the event loop. So I will go straight to the solution.

  1. If you really need asynchronous Thread.join(), you're out of luck. Because in this case you need to start a separate thread to wait:

    await asyncio.to_thread(t.join)
    

    or

    await asyncio.get_running_loop().run_in_executor(executor, t.join)
    

    So due to the way threads are implemented in the threading module. And of course it has disadvantages: you can't cancel a started thread. You will have to forget about asyncio timeouts, because every second attempt to do Thread.join() will start another thread. You will actually get a thread leak!

    Both alternative and combined solutions will be to poll that the thread is alive. This way you will be wasting CPU resources. If you start an extra thread to wait, so the return will be fast. But if it's not, the return will be as long as the timeout you set.

  2. If you have to wait for an event from another thread, you're in luck. This question has already been asked on StackOverflow. Just use any solution from there and call the set() method in your thread.

  3. If you want to wait for something to be processed by multiple threads, you need a proper notification mechanism. I suggest not reinventing the wheel, as there is already aiologic.CountdownEvent (I'm the creator of aiologic).

    import time
    import asyncio
    
    from threading import Thread
    
    from aiologic import CountdownEvent
    
    
    def work(event):
        try:
            time.sleep(1)
        finally:
            event.down()  # -1 thread to wait
    
    
    async def main():
        event = CountdownEvent()
    
        for _ in range(4):
            event.up()  # +1 thread to wait
    
            Thread(target=work, args=[event]).start()
    
        print("before")
    
        await event  # wait for all threads
    
        print("after")
    
    
    asyncio.run(main())
    

    This is a universal synchronization primitive with which you can wait for what you want. The up() and down() methods respectively increase and decrease the countdown event value. When it's zero, all waiting tasks are woken up.

  4. If you try to do what existing synchronization primitives usually do, don't do it. Use the synchronization primitives from aiologic, such as aiologic.Lock, aiologic.Semaphore, or aiologic.Condition. They just work.

Reasons:
  • Blacklisted phrase (1.5): any solution
  • Blacklisted phrase (1): StackOverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ilya Egorov

79128809

Date: 2024-10-26 15:09:08
Score: 3
Natty:
Report link

endIndex and count are only the same if startIndex is 0. Note that startIndex need not be zero.

let someSlice = someArray[100...200] // someSlice.startIndex is 100.

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

79128808

Date: 2024-10-26 15:09:08
Score: 2.5
Natty:
Report link

My flow is identical, and for me the path of least resistance was to simply cancel the original (incomplete) subscription and create a new one if the user enters a coupon code. Creating a subscription with the coupon code or promotion code at the outset works as intended.

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

79128801

Date: 2024-10-26 15:03:07
Score: 1.5
Natty:
Report link

Great answer from @Tony McCreath.

Hey Danny Wave, there are two separate aspects of your question.

Let's discuss both:

Q 1. What is the Correct Format for Schema Property Types i.e. full URL or just Value wording?

Answer: For Property Types, it's always just value, as you asked, Brand without website url; https://schema.org/. No need to be confused for this as it's crystal clear.

Q 2. What is the Correct Format for Schema Property Values where Schema.org website recommends full URL as Value, like the folllwing:

Answer: Google clearly recommends that you can just write NewCondition, InStock also. According to Google guidelines, either you write full URL like this https://schema.org/NewCondition, or you write InStock only, both are acceptable.


Check the below screenshot: ItemAvailability Value Recommendation from Google

Read Google's Recommendation here: https://developers.google.com/search/docs/appearance/structured-data/merchant-listing#availability

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Tony
  • Low reputation (1):
Posted by: Behzad Hussain

79128793

Date: 2024-10-26 14:57:06
Score: 2
Natty:
Report link

Posting because someone else will likely end up here looking for help trying to create a SymbolicLink with PowerShell in combination with CimFS volumes or similar with funky 🕺 characters

The PowerShell command New-Item -Type SymbolicLink can not handle a path with a "?". You need to escape the "?" for the command to work correctly.

Example, note the backtick before the "?", apparently called a grave 🪦 as well - learnt something new.

New-Item -Type SymbolicLink -Path "C:\temp\ThisIsTheSymbolicLink" -Target '\\`?\Volume{5dc22e05-95f4-4993-9591-c0e187b0356d}\'
Reasons:
  • Blacklisted phrase (1): looking for help
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: rileyz

79128791

Date: 2024-10-26 14:57:05
Score: 4.5
Natty:
Report link

Sign up with SOHOTOGEL

now and seize your opportunity to hit the jackpot! Experience top-tier service and enjoy the most generous bonus offers in Indonesia!

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

79128789

Date: 2024-10-26 14:56:03
Score: 10.5 🚩
Natty: 5.5
Report link

Actually, they have asked to create calculated column only. Even if you create it as measure, it is still not showing the chart as expected after plotting them. If anyone has completed this, please help me out. I am stuck here.

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): please help me
  • RegEx Blacklisted phrase (1.5): I am stuck
  • RegEx Blacklisted phrase (2): help me out
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ayesha Fatima

79128781

Date: 2024-10-26 14:53:02
Score: 2
Natty:
Report link

For me I just had to relaunch to update Chrome. Click on the 3 dots on the top right of your browser and you'll see a button for this action. It this doesn't work try to manully update to the latest stable version.

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

79128764

Date: 2024-10-26 14:45:00
Score: 1.5
Natty:
Report link

you just need to wrap it around this it Ensure WooCommerce is Fully Loaded:

add_action('init', 'your_form_submission_handler'); // or 'woocommerce_init'

function your_form_submission_handler() {
    // Place your form submission code here
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jude Leovert Gimeno

79128758

Date: 2024-10-26 14:42:58
Score: 6.5 🚩
Natty: 5.5
Report link

May I ask how you get the kurtosis of PCA and ICA?

Reasons:
  • Blacklisted phrase (1): May I ask
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Zhaocheng Yang

79128752

Date: 2024-10-26 14:38:57
Score: 2
Natty:
Report link

The errors you get may depend on openSCAD version.

On Debian, using version 2021.01 I only get warnings, due to modules that are not present in your code snippet, but the model gets rendered correctly with the given code.

Image of the rendered model

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

79128751

Date: 2024-10-26 14:38:57
Score: 0.5
Natty:
Report link

@TargetApi = Thank you Lint, I will take care of it when calling it.
But, in reality if I forget to do the API level check on the calling side, Lint does not bothers. (Lint satisfied) enter image description here

@RequiresApi = Thank you Lint, I will add an API level check on the CALLING side, and If I don't, show a red line beneath. (better, but still superficial runtime safety, as we still need to put the API level check!) enter image description here

Note: In general, it's best to avoid using these annotations on lifecycle methods like onCreate (as we don't, but the framework calls them, and it can lead to unexpected crashes) Instead, use runtime checks to manage API-level-specific code.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @TargetApi
  • User mentioned (0): @RequiresApi
  • High reputation (-1):
Posted by: Himanshu Likhyani

79128740

Date: 2024-10-26 14:32:55
Score: 4
Natty: 4
Report link

I found very helpful article about to access Microsoft Outlook emails using Microsoft graph API in Java.

https://medium.com/@nareshdevassist/setup-required-for-office-365-email-integration-and-reading-emails-using-microsoft-graph-api-in-3741e2a5ef80

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

79128731

Date: 2024-10-26 14:25:52
Score: 7 🚩
Natty:
Report link

I'm getting the same error right now; I think it might be a GCP issue.

Reasons:
  • RegEx Blacklisted phrase (1): I'm getting the same error
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm getting the same error
  • Single line (0.5):
  • Low reputation (1):
Posted by: Javier Cabrera

79128728

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

As it turns out, iOS 18.1 fixed this issue.

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

79128723

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

Using OpenAI's sdk:

const file = new File([blob], 'myFile.mp3', { type: 'audio/mp3' });

const transcription = await openai.audio.transcriptions.create({
  file: file,
  model: 'whisper-1',
});
console.log('transcription?', transcription);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Sahil Rajput

79128722

Date: 2024-10-26 14:23:51
Score: 3.5
Natty:
Report link

The solution I see here is to make the function receive the argument as a string.

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

79128716

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

Your example code is setting the scroll position by using .scrollPosition on the ScrollView, together with .scrollTargetLayout on the LazyVStack. The trouble is, .scrollPosition can only have one anchor. If the anchor is .top then it is difficult to set the position to the last entry at the bottom and the same goes for the first entry at the top when the anchor is .bottom. So:

Other notes:

Here is the updated example:

struct GoodChatView: View {
    @State private var messages: [Message] = []
    @State private var isLoading = true

    var body: some View {
        ScrollViewReader { scrollView in
            ScrollView {
                LazyVStack {
                    ForEach(messages.reversed(), id: \.id) { message in
                        ChatMessage(text: "\(message.text)")
                            .background {
                                GeometryReader { proxy in
                                    let minY = proxy.frame(in: .scrollView).minY
                                    let isReadyForLoad = abs(minY) <= 0.01 && message == messages.last
                                    Color.clear
                                        .onChange(of: isReadyForLoad) { oldVal, newVal in
                                            if newVal && !isLoading {
                                                isLoading = true
                                                Task { @MainActor in
                                                    await loadMoreData()
                                                    await Task.yield()
                                                    scrollView.scrollTo(message.id, anchor: .top)
                                                    await resetLoadingState()
                                                }
                                            }
                                        }
                                }
                            }
                            .onAppear {
                                if !isLoading && message == messages.first {
                                    isLoading = true
                                    Task {
                                        await loadNewData()

                                        // When new data is appended, the scroll position is
                                        // retained - no need to set it again

                                        await resetLoadingState()
                                    }
                                }
                            }
                    }
                }
            }
            .task { @MainActor in
                await loadNewData()
                if let firstMessageId = messages.first?.id {
                    try? await Task.sleep(for: .milliseconds(10))
                    scrollView.scrollTo(firstMessageId, anchor: .bottom)
                }
                await resetLoadingState()
            }
        }
    }

    @MainActor
    func loadMoreData() async {
        let lastId = messages.last?.id ?? 0
        print("old data > \(lastId)")
        var oldMessages: [Message] = []
        for i in lastId+1...lastId+20 {
            let message = Message(id: i, text: "\(i)")
            oldMessages.append(message)
        }
        messages += oldMessages
    }

    @MainActor
    func loadNewData() async {
        let firstId = messages.first?.id ?? 21
        print("new data < \(firstId)")
        var newMessages: [Message] = []
        for i in firstId-20...firstId-1 {
            let message = Message(id: i, text: "\(i)")
            newMessages.append(message)
        }
        messages.insert(contentsOf: newMessages, at: 0)
    }

    @MainActor
    private func resetLoadingState() async {
        try? await Task.sleep(for: .milliseconds(500))
        isLoading = false
    }
}

Animation

Reasons:
  • RegEx Blacklisted phrase (2): any suggestions
  • RegEx Blacklisted phrase (2): I'm a beginner
  • Long answer (-1):
  • Has code block (-0.5):
  • High reputation (-2):
Posted by: Benzy Neez

79128714

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

Found the problem.

It was outdated python-optree package. Seems that 0.13.0 version doesn't have the issue.

The issue was:

>>> from optree import *
>>> tree_map(lambda x: x, ())
/usr/include/c++/14.1.1/bits/stl_vector.h:1130: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = pybind11::object; _Alloc = std::allocator<pybind11::object>; reference = pybind11::object&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
fish: Job 1, 'python' terminated by signal SIGABRT (Abort)

Empty tuples or arrays raised the issue.

In version 0.13.0:

>>> from optree import *
>>> tree_map(lambda x: x, ())
()

It's not trowing and everything works.

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

79128704

Date: 2024-10-26 14:17:49
Score: 2
Natty:
Report link

In the future, please provide a link, not a screenshot, to the documentation.

https://timeapi.io/swagger/index.html

The example is written in Python.

Specify the request method (in this case post) and pass the request body in data or json.

I usually prefer json if possible.

import requests

response = requests.post(
    url='https://timeapi.io/api/calculation/custom/increment',
    json={
        "timeZone": "Europe/Amsterdam",
        "dateTime": "2024-11-27 05:45:00",
        "timeSpan": "16:03:45:17",
        "dstAmbiguity": ""
    }
)

print(response.status_code)
print(response.json())

If you use the past tense from the example in dateTime you will get an error.

requests.exceptions.SSLError: HTTPSConnectionPool(host='timeapi.io', port=443): Max retries exceeded with url: /api/calculation/custom/increment (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1002)')))

Reasons:
  • RegEx Blacklisted phrase (2.5): please provide
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ykoavlil

79128702

Date: 2024-10-26 14:16:49
Score: 5.5
Natty: 7
Report link

does anyone know how to get the optimal parameters in frangi filters for blood vessel enhancement? Thanks for the insightful discussion in this thread.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (2): does anyone know
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Hafsa Moontari Ali

79128700

Date: 2024-10-26 14:15:48
Score: 0.5
Natty:
Report link

For me, the issue is resolved after adding the below dependency in pom.xml.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
    <version>1.3.5.RELEASE</version>
</dependency>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ankur Pandey

79128695

Date: 2024-10-26 14:13:47
Score: 1
Natty:
Report link

Make sure minLine is 1 then set maxLine to desired max

CustomInputField(
        controller: editingController,
        autofocus: true,
        maxLength: widget.editableCharSize,
        minLines: 1,
        maxLines: 3,
        onChanged: (value) {
          
        },
      ),
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chiemela Uzoma Melasin

79128687

Date: 2024-10-26 14:08:46
Score: 4
Natty:
Report link

Iansipave Www.vimeo.com/461963019

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: Ianis Pavel

79128685

Date: 2024-10-26 14:07:45
Score: 2
Natty:
Report link
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
    return 'Valid Format';
}
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Webs Hero

79128673

Date: 2024-10-26 14:02:44
Score: 0.5
Natty:
Report link

**You have to use { cache: 'no-store' } **

it is not working because you are caching for default meaning it is statically rendered,,, indeed it is going to work even if the server is off,, just because it became a static page,, so if you want suspense to work you have to disable that like link bellow const res = await fetch('http://127.0.0.1:8000/api/products/get-featured-products',{ cache: 'no-store' }) const products: ProductParams[] = await res.json()

you see at the end the { cache: 'no-store' } so now it is going to fetch every time,, but remember it is better to have it as a static page so it is faster and better seo,,,,,

not sure but maybe you will nee to go the .next folder and then to fetch-cache and delete it, so it is going to fetch and you will see your suspense.

again if you dont use {cache:'no-store} you will see the loading of your suspense just one time,, after that the page will be static meaning even without backend it is going to show up,,,, but if you use {cache:'no-store} you will fetch every time you visit the page and you will see your suspense loading,

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

79128665

Date: 2024-10-26 13:52:41
Score: 6 🚩
Natty: 4
Report link

I'm facing the same problem

In iOS 16 and iOS 17 I had a .onTapGesture on the parents view, and in the child view one list with items.

That items have a few swipe actions on it.

Now with iOS 18 suddenly stops working.

I already test the solutions provided and anything worked for me

Sometimes, when you swipe a few times on a items the swipe action start to work but this is not the correct way to use it.

Someone with problems in the swipe actions too?

Reasons:
  • Blacklisted phrase (1): m facing the same problem
  • Whitelisted phrase (-1): worked for me
  • No code block (0.5):
  • Me too answer (2.5): I'm facing the same problem
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Jose Antonio Navarro Cantero

79128658

Date: 2024-10-26 13:47:39
Score: 0.5
Natty:
Report link

OK I fixed it : The "Calling functions from your application" I used the 1st generation, I just changed to 2nd generation and it works perfectly now. No idea why they still propose the 1st.

https://firebase.google.com/docs/functions/callable?gen=2nd&hl=fr#node.js_2

Reasons:
  • Whitelisted phrase (-2): I fixed
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Martin Guillon

79128643

Date: 2024-10-26 13:38:37
Score: 3.5
Natty:
Report link

I was recently facing a similar issue where I needed to extract an exact HEX color value. While a masked gradient worked somewhat fine as well, it had some implications on rendering quality and performance.

Here's the helper function I've written to get the color value by percentage from the defined gradient (supports multiple color stops):

function getGradientColor(colors, percentage) {
  percentage = Math.max(0, Math.min(100, percentage));
  
  if (colors.length === 1) return colors[0];
  
  const index = (colors.length - 1) * percentage / 100;
  const i = Math.floor(index);
  const t = index - i;
  
  const color1 = colors[i];
  const color2 = colors[Math.min(i + 1, colors.length - 1)];
  
  const rgb = [0, 1, 2].map(j => {
    const c1 = parseInt(color1.slice(1 + j * 2, 3 + j * 2), 16);
    const c2 = parseInt(color2.slice(1 + j * 2, 3 + j * 2), 16);
    return Math.round(c1 * (1 - t) + c2 * t);
  });
  
  return '#' + rgb.map(c => c.toString(16).padStart(2, '0')).join('');
}

I've described the thought process a bit futher in this article: https://ivomynttinen.com/blog/get-a-color-value-by-percentage-from-gradient/

Reasons:
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing a similar issue
  • Low reputation (1):
Posted by: Ivo Mynttinen

79128640

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

So, I had the same problem ..... and it was because when us set the personal token in GitHub to set up you Xcode, u also set an expiration date for it and for me the expiration date was over for that particular token..... To solve the problem

  1. Create a new personal access token on Github (https://github.com/settings/tokens), make sure to copy it on clipboard
  2. Go to settings in Xcode then to account, and when u press GitHub on the right side it would ask for your personal token..... paste it
Reasons:
  • Whitelisted phrase (-1): I had the same
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mayank Jangid

79128635

Date: 2024-10-26 13:28:36
Score: 3
Natty:
Report link

download:

https://download.visualstudio.microsoft.com/download/pr/03097ab1-852b-45d3-abbb-c0bcf640cd6f/4a22b5f5449d1e1182e17c0348b159ad/netfx45_dtp.cab

https://download.visualstudio.microsoft.com/download/pr/aa968ee4-54e7-4773-a9a5-bd09d7ca9924/ccc6eff9c0f4488e8f3bf5d1237684cbb67ff381b9784f9f7f653504a5d74ee2/netfx45_dtp.msi

Install: netfx45_dtp.msi EXTUI=1

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

79128622

Date: 2024-10-26 13:18:34
Score: 3.5
Natty:
Report link
Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: JeewanaSL

79128607

Date: 2024-10-26 13:12:32
Score: 2
Natty:
Report link

This text includes multiple variations of messages where the sender https://goo.by/EUvdly**strong text**persistently encourages the recipient to join a personal profile or site for a virtual meet-up. The sender emphasizes that signing up is free and doesn’t require any payment or credit card information, claiming to be genuinely interested and authentic. Phrases like "babe" and "promise" are used https://goo.by/EUvdly frequently to build

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

79128597

Date: 2024-10-26 13:09:31
Score: 1
Natty:
Report link

I think you can't do it with this library. Laravel Excel uses PhpSpreadsheet, and this is a very "gluttonous" library. So I advise you to choose another library, for example avadim/fast-excel-reader, with its help you can read data into an array, process it and then write it to the database

$excel = Excel::open($file);
$sheet = $excel->sheet();
foreach ($sheet->nextRow() as $rowNum => $rowData) {
    // $rowData is array ['A' => ..., 'B' => ...]
    // handling of $rowData here
    // ...
}
Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: aVadim

79128596

Date: 2024-10-26 13:09:31
Score: 1.5
Natty:
Report link

I think if you see a use client then it is client which run on the client side otherwise if there's use server or nothing at all will run in the server which is default.

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

79128587

Date: 2024-10-26 13:05:31
Score: 0.5
Natty:
Report link

You can select the element by Specific Tag Value:

const item = document.querySelector('[translate="my_team_tab"]');
item.innerText = 'Hello World!';
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: ManuelMB

79128566

Date: 2024-10-26 12:53:28
Score: 0.5
Natty:
Report link

after checking your website you have a problem with javascript code

Uncaught TypeError: $(...).datetimepicker is not a function


Uncaught TypeError: $(...).magnificPopup is not a function

try to turn of these journal theme performance features: 1- JS Combine & Minify 2- JS Defer

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

79128565

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

You may try:

=sum(choosecols(sortn(sort(A13:D,4,),9^9,2,1,),4))

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • High reputation (-2):
Posted by: rockinfreakshow

79128557

Date: 2024-10-26 12:50:27
Score: 2
Natty:
Report link

So, while you are editing, I tried:

SUM(MAXIFS(E3:E9,B3:B9,{"Cereals","Meats","Fruits"}))

enter image description here

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

79128550

Date: 2024-10-26 12:45:25
Score: 5
Natty:
Report link

One day when I'm dead or compensated for this outrageouse hosting of my internet by 1000's of people I don't know working so hard to make me not get what I want and am entitled to is my privacy!!! I have been stalked for 15 years by these freaks and claimed I'm mentally unwell when these fuckwits know exactly what their doing and knowone cares because they created a reason for people to not care I'm so beside myself but I will win this if it kills me!!

Reasons:
  • Blacklisted phrase (2): fuck
  • RegEx Blacklisted phrase (1): I want
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Thomas David. Sellars

79128542

Date: 2024-10-26 12:42:24
Score: 2
Natty:
Report link

For SQL Server 2017

SELECT FORMAT(9876543,'N')
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ashish Ingle

79128532

Date: 2024-10-26 12:34:23
Score: 2
Natty:
Report link
ghcup nuke

This will completely remove everything installed with ghcup

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jonny O'Gorman

79128530

Date: 2024-10-26 12:34:23
Score: 1
Natty:
Report link

The problem is solved! I think there is some difference between environment variables Windows 7 and Windows 10. I got the idea from this this post and the problem is solved!

driver = new ChromeDriver(@"c:\chromedriver.exe");

I copied the chromedriver.exe to some specific place and called it directly. I replaced the code I mentioned in the question with above code and chrome driver is working fine.

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

79128515

Date: 2024-10-26 12:25:20
Score: 3
Natty:
Report link

in android/gradle.properties add this org.gradle.java.home=C:/Program Files/Java/jdk-17

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

79128506

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

Also, this exception occurs when your val is not an integer, in the question case this is not an issue, but just answering for other people's help.

String val = "100"; String.format("%3d", val);

To resolve make sure you parse String to int.

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

79128501

Date: 2024-10-26 12:16:18
Score: 1
Natty:
Report link

Your locator is incorrect. In the HTML it shows the attribute link-id not the id. So By.ID will not work here.

Go with CSS or xpath selector

(By.XPATH,//*[@link-id = 'lnkSearchPeople'])
(By.CSS,[link-id = 'lnkSearchPeople'])
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: NayeemJohn

79128489

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

At the top of your CSS file, you need to import Tailwind's directives.

/* login.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* The rest of your CSS code */

Tailwind Docs (Step 4) says:

Add the Tailwind directives to your CSS

Add the @tailwind directives for each of Tailwind’s layers to your main CSS file.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @tailwind
Posted by: JayDev95

79128486

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

Tweaked @Andriy M's solution which helped me.

Our table column names had got alphanumeric characters that started with numeric value and so the query failed for certain tables. So added square brackets around the column names to @Andriy M's solution.

The modified query goes as below,

DECLARE @table varchar(100), @sql varchar(max);
SET @table = 'some table name';

SELECT
  @sql = COALESCE(@sql + ', ', '') + ColumnExpression
FROM (
  SELECT
    ColumnExpression =
      'CASE COUNT(DISTINCT [' + COLUMN_NAME + ']) ' +
      'WHEN COUNT(1) THEN ''UNIQUE'' ' +
      'WHEN COUNT(1) - 1 THEN ' +
        'CASE COUNT(DISTINCT [' + COLUMN_NAME + ']) ' +
        'WHEN COUNT([' + COLUMN_NAME + ']) THEN ''UNIQUE WITH SINGLE NULL'' ' +
        'ELSE '''' ' +
        'END ' +
      'WHEN COUNT([' + COLUMN_NAME + ']) THEN ''UNIQUE with NULLs'' ' +
      'ELSE '''' ' +
      'END AS [' + COLUMN_NAME +']'
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE TABLE_NAME = @table
) s

SET @sql = 'SELECT ' + @sql + ' FROM ' + @table;
PRINT @sql;  /* in case you still want to have a look at the resulting query */
EXEC(@sql);
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Andriy
  • User mentioned (0): @Andriy
  • Low reputation (1):
Posted by: Meera K

79128484

Date: 2024-10-26 12:09:17
Score: 3
Natty:
Report link

You need to set the exports in your package.json.

This would look like this:

package.json

exports: {
    "./random": "./dist/random/index.js"
}

For more information, see here: https://stackoverflow.com/a/74551879/27893855

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Tim Hansen