79512152

Date: 2025-03-16 05:33:50
Score: 2
Natty:
Report link

#include <studio.h>

Void main()

{

int a,b;

Float c,d,e;

Printf("enter the value of and in integer/n");

Scand("%d%d",&a,&b);

Print f("enter the value c and d in float/n");

Scand("%f%f";&c,&d);

e=(a+b)* c-(c/d)*(a-b);

Print f("result of the expansion is%2f/n"e);

}

gcc program.c -o program

./program

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

79512148

Date: 2025-03-16 05:25:49
Score: 2.5
Natty:
Report link

🚀 Mastering Navigation in Expo Router: Best Practices for Tabs, Stacks & Shared Screens

Struggling with navigation issues in Expo Router? Tabs resetting, incorrect initial screens, or broken back navigation? This detailed guide covers:

✅ Correct folder structure for scalable Expo projects ✅ Setting up Tabs & Stacks the right way ✅ Placing shared screens like Help & Profile without breaking navigation ✅ Fixing back navigation issues with custom solutions

Read the full guide and level up your React Native navigation skills! 🚀🔥

🔗 Check it out here: https://medium.com/@siddhantshelake/best-practices-for-expo-router-tabs-stacks-shared-screens-b3cacc3e8ebb

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Blacklisted phrase (0.5): Check it out
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Siddhant Shelake

79512141

Date: 2025-03-16 05:14:47
Score: 0.5
Natty:
Report link

No, basically there are two major changes. you can follow this guide here

  1. Authentication: for python you can follow this code to get TOKEN

    def get_access_token():
     """Get an access token from the service account."""
     credentials = service_account.Credentials.from_service_account_file(
         FIREBASE_CONFIG,
         scopes=["https://www.googleapis.com/auth/firebase.messaging"]
     )
    
     # Refresh the token
     credentials.refresh(Request())
     return credentials.token
    

    Replace FIREBASE_CONFIG with path to serviceAccountKey.json file

  2. To send FCM messages via post man

    • URL is now changed to https://fcm.googleapis.com/v1/projects/{PROJECT_NAME}/messages:send

    • Set header Authorization: Bearer {TOKEN}

    • Add Payload

      {
          "message": {
              "token": {DEVICE_TOKEN},
              "notification": {
                  "title": "Test Notification",
                  "body": "This is a test notification with an image."
              },
              "apns": {
                  "payload": {
                      "aps": {
                          "mutable-content": 1,
                          "sound": "default"
                      }
                  }
              },
              "data": {
                  "image": "https://www.equitytool.org/wp-content/uploads/2015/06/SmallSample.png"
              }
          }
      }
      

      Replace DEVICE_TOKEN with FCM device token, mutable-content:1 is set to invoke NotificationServiceExtension in iOS.
      To send multiple deviceTokens, you can make use for multicast endpoint

Reasons:
  • Blacklisted phrase (1): this guide
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: efqz11

79512133

Date: 2025-03-16 05:04:45
Score: 3
Natty:
Report link

In order to further debug, we need to know

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

79512125

Date: 2025-03-16 04:48:43
Score: 1
Natty:
Report link

import cv2

import numpy as np

# Load the image using OpenCV

image_cv = cv2.imread(image_path)

# Get the dimensions of the image

height, width, _ = image_cv.shape

# Split the image into two halves (left and right)

left_half = image_cv[:, :width//2]

right_half = image_cv[:, width//2:]

# Resize both halves to have the same height

new_width = min(left_half.shape[1], right_half.shape[1])

left_half_resized = cv2.resize(left_half, (new_width, height))

right_half_resized = cv2.resize(right_half, (new_width, height))

# Merge the two images smoothly

merged_image = np.hstack((left_half_resized, right_half_resized))

# Save the merged image

merged_image_path = "/mnt/data/merged_image.jpg"

cv2.imwrite(merged_image_path, merged_image)

# Return the path of the merged image

merged_image_path

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: สาริกา

79512119

Date: 2025-03-16 04:37:41
Score: 0.5
Natty:
Report link

Ok, found a solution. It was to move the logic outside of the bash code.

 parameters:
   - name: strValue

 steps:
 - task: Bash@3
   condition: ${{ eq(parameters.strValue, 'valueX') }}
   displayName: 'Do stuff'
   inputs:
     targetType: inline
     script: |
       ...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: benjamin.keen

79512118

Date: 2025-03-16 04:35:40
Score: 5.5
Natty: 5.5
Report link

Fitsumking7 strong textttyyhhhjjhhhhghbhhjjjjjjjjiiiiiiiiiiiijjjj

Blockquote

Reasons:
  • Contains signature (1):
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Has no white space (0.5):
  • Filler text (0.5): jjjjjjjj
  • Filler text (0): iiiiiiiiiiii
  • Low reputation (1):
Posted by: Fitsumking7

79512111

Date: 2025-03-16 04:20:37
Score: 4.5
Natty:
Report link

Ask ChatGPT, this is a simple answer.

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

79512101

Date: 2025-03-16 04:09:35
Score: 2.5
Natty:
Report link

they changed the lay out but it is there to add yourself. i was having this issue for like 2 hours and came back here and found it. hope this pic helps

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

79512100

Date: 2025-03-16 04:06:34
Score: 2
Natty:
Report link

You can just change xamp to Laravel herd. When you use Laravel Herd, you don't need to run any command, just keep the project in the Herd folder and in your browser hit project__name.test this will work for every project.

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

79512092

Date: 2025-03-16 03:56:33
Score: 0.5
Natty:
Report link

Racket doesn't have them, a simple way to define them is:

;; decrement operator
(define (-1+ x)
  (- x 1))

;; increment operator
(define (1+ x)
  (+ x 1))

The solutions above are correct, but indirect. The question is primarily about -1+ and 1+.

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

79512081

Date: 2025-03-16 03:36:29
Score: 0.5
Natty:
Report link

Good question. In short, if your code only run in modern browser(Support ES6), it's necessary to set prototype manually. Reference from MDN:

In ES2015, constructors which return an object implicitly substitute the value of this for any callers of super(...). It is necessary for generated constructor code to capture any potential return value of super(...) and replace it with this.

As a result, subclassing Error, Array, and others may no longer work as expected. This is due to the fact that constructor functions for Error, Array, and the like use ECMAScript 6's new.target to adjust the prototype chain; however, there is no way to ensure a value for new.target when invoking a constructor in ECMAScript 5. Other downlevel compilers generally have the same limitation by default.

Here are some useful link for detail:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error

https://github.com/microsoft/TypeScript/wiki/FAQ#why-doesnt-extending-built-ins-like-error-array-and-map-work

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target

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

79512069

Date: 2025-03-16 03:11:25
Score: 1
Natty:
Report link

The answer is to use SCSS. I didn't realize the difference in synctax.

<style lang="scss">
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Bill

79512067

Date: 2025-03-16 03:08:25
Score: 1
Natty:
Report link

salut a tous , j'ai un sérieux problème que je n'arrive pas a résoudre.

lorsque je veux générer un fichier Word avec Rmarkdown

Erreur dans loadNamespace(x) : aucun package nommé 'gdalUtils' n'est trouvé
Appels : loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Exécution arrêtée
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Moutouwali Fadoul

79512065

Date: 2025-03-16 03:06:24
Score: 6.5
Natty: 7.5
Report link

Definitely check this article -> https://blog.nashtechglobal.com/how-to-deploy-express-js-to-vercel/

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

79512061

Date: 2025-03-16 03:02:23
Score: 5.5
Natty: 7
Report link

This documentation maybe will help a bit: https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Light-colorTemperature.html

Reasons:
  • Blacklisted phrase (1): This document
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Creative Carve Cite Climb

79512059

Date: 2025-03-16 02:59:22
Score: 3
Natty:
Report link

I think this is a bug in Nestjs, and it does not only applies to the Enums, also similar problems happens to other forms of file importing.

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

79512057

Date: 2025-03-16 02:57:22
Score: 1.5
Natty:
Report link

I finally figured it out, albeit I’m not sure why what I did worked. I ended up solving this by temporarily commenting out retrofit in the main project pubspec.yaml and building the project.

After this build it did not matter whether retrofit was included or commented out anymore in the pubspec.yaml of the main project.

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

79512053

Date: 2025-03-16 02:45:20
Score: 1.5
Natty:
Report link

You can run the generator with this argument:

--type-mappings=string+date-time=Date

or this:

--type-mappings=DateTime=Date
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Luan Gong

79512049

Date: 2025-03-16 02:34:18
Score: 1.5
Natty:
Report link

I found an insightful answer by @AviFS in this answer, which explains this well. Here's a key part of their explanation:

Just replace in your .css:

@tailwind base;
@tailwind components;
@tailwind utilities;

with:

@import "tailwindcss";
@config "../../tailwind.config.js";
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @AviFS
  • Low reputation (0.5):
Posted by: Asiri Piyajanaka

79512032

Date: 2025-03-16 02:09:14
Score: 2.5
Natty:
Report link

One day one of my projects suddenly stopped showing files and it was this issue for me.

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Umair A.

79512029

Date: 2025-03-16 02:05:13
Score: 2.5
Natty:
Report link

Explore the breathtaking beauty of Musandam Oman with hassle-free Musandam tour packages. From its stunning mountain ranges to its crystal-clear waters, this is a must-see destination for any nature lover. Come see why it’s known as the “Norway of Arabia”!

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

79512027

Date: 2025-03-16 02:02:13
Score: 1
Natty:
Report link

There is some history to this problem.

I was able to call dylib with MACOS Catalina using HPC gfortran to compile and link.

Under BIG SUR, I was unable to call dylibs using gfortran to link, but succeeded in calling one of several dylibs linked by clang. The behavior is inconsistent.

Now attempting to compile and link on a MacBookPro M4 using HPC gfortran binary to compile and link with either gfortran or clang but so far have no luck. Using the same location /Library/Application Support/Microsoft/

Using install_name_tool to change dylib id. See below. This used to work well, but no more with Sequoia 15.3.1.

Will continue with this effort.

    install_name_tool -id /Library/ApplicationSupport/Microsoft/libmydylib.dylib libmydylib.dylib
Reasons:
  • Blacklisted phrase (1): no luck
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: JTNelson

79512025

Date: 2025-03-16 01:54:12
Score: 0.5
Natty:
Report link

If you do not enable account selection, the account selection screen will be skipped as long as the bank does not have an OAuth account selection screen. If the bank has its own OAuth account selection screen, the Plaid account selection screen will also be shown, in order to handle the scenario in which the user makes different selections in the bank-owned OAuth account selection flow than they did the first time through. In Sandbox, all OAuth banks show an account selection screen. In Production, most OAuth banks do, but not all of them. See https://plaid.com/docs/api/link/#link-token-create-request-update-account-selection-enabled

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Alex

79512024

Date: 2025-03-16 01:53:11
Score: 2.5
Natty:
Report link

for me it was because my python script had #!/usr/bin/python but that symlink didn't exist on my system on a fresh install, I needed:

sudo ln -n /usr/bin/python3 /usr/bin/python

Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: RAM

79512020

Date: 2025-03-16 01:46:10
Score: 1.5
Natty:
Report link

In order to preserve existing behaviour, you need to set this property

camel.rest.inline-routes = false 

in all versions post 4.7.x.

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

79511998

Date: 2025-03-16 01:13:05
Score: 1
Natty:
Report link

I had the same issue. One of my directories was named C# Practice. It would not recognize any file or directories with it, even if unrelated to .cs files. I believe neovim has some issue with the # character as when I tried to make a file with # in the name it asked me to substitute it. If you have any files or directories with the # or maybe any other special character try removing that character. I simply changed mine to CS Practice and now it works fine.

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

79511987

Date: 2025-03-16 00:58:02
Score: 3
Natty:
Report link

Unfortunately, NO.

Docker daemon is limited in this regard. It uses DNS services and static host files of the host machine.

Docs: https://docs.docker.com/engine/network/#embedded-dns-server

To work around this issue folks recommend running another container with a proper DNS server (such as ) and configure Docker to use it: https://serverfault.com/questions/612075/how-to-configure-custom-dns-server-with-docker

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

79511974

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

I did it this way: https://github.com/generate94/convert_dll_to_lib/blob/main/README.md (includes an executable along w the source code)

basically:

Extract Exports – Run dumpbin /EXPORTS on the DLL to list exports.

Create .def – Write LIBRARY <DLL_NAME> and EXPORTS header.

Generate .lib – Use lib.exe /DEF:<def file> /OUT:<lib file>

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Magic Ind. Dev

79511971

Date: 2025-03-16 00:46:00
Score: 5
Natty:
Report link

What is the current directory? Very likely the path in which the executable resides.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): What is the
  • Low reputation (1):
Posted by: Nobody

79511962

Date: 2025-03-16 00:28:57
Score: 0.5
Natty:
Report link

How to Resize a std::string in C++ Without Changing Its Capacity

When working with std::string in C++, resizing it is straightforward, but ensuring its capacity (the allocated memory size) stays the same can be confusing. Let’s break down how to resize a string while preserving its capacity—no jargon, just clarity.


What Are size() and capacity()?

For example:

cpp

Copy

std::string str = "Hello";  
std::cout << str.size();      // Output: 5  
std::cout << str.capacity();  // Output: 15 (varies by compiler)  

How Resizing Affects Capacity

The resize() method changes the size() of the string. However:

  1. If you increase the size beyond the current capacity(), the string reallocates memory, increasing capacity.

  2. If you decrease the size, the capacity() usually stays the same (no memory is freed by default).

Example:

cpp

Copy

std::string str = "Hello";  
str.reserve(20);  // Force capacity to 20  
str.resize(10);   // Size becomes 10, capacity remains 20  
str.resize(25);   // Size 25, capacity increases (now ≥25)  

How to Resize a String and Keep the Same Capacity

To avoid changing the capacity, ensure the new size() does not exceed the current capacity():

Step 1: Check the current capacity.

cpp

Copy

size_t current_cap = str.capacity();  

Step 2: Resize within the current capacity.

cpp

Copy

str.resize(new_size);  // Only works if new_size ≤ current_cap  

Full Example:

cpp

Copy

#include <iostream>  
#include <string>  

int main() {  
    std::string str = "C++ is fun!";  
    str.reserve(50);  // Set capacity to 50  

    std::cout << "Original capacity: " << str.capacity() << "\n"; // 50  

    // Resize to 20 (within capacity)  
    str.resize(20);  
    std::cout << "New size: " << str.size() << "\n";      // 20  
    std::cout << "Capacity remains: " << str.capacity();  // 50  

    return 0;  
}  

Read More...

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How to
  • Low reputation (1):
Posted by: dooo. xxturtu

79511960

Date: 2025-03-16 00:26:57
Score: 0.5
Natty:
Report link

From what I see, the snapshot from your StreamBuilder is not in use, you might as well remove the StreamBuilder.

Anytime you setState, your StreamBuilder rebuilds which might cause all the functions in there to get called multiple times and cause an infinite loop.

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

79511931

Date: 2025-03-15 23:42:50
Score: 1
Natty:
Report link

If you suck at CLIs just do the following:

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

79511928

Date: 2025-03-15 23:39:49
Score: 3.5
Natty:
Report link

this might help:

foreach ($_SERVER as $parm => $value) echo "<BR>$parm = '$value'<BR>";

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

79511922

Date: 2025-03-15 23:28:45
Score: 7 🚩
Natty: 4
Report link

Any answer? I have the same issue.

BR

Paco

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Francisco

79511921

Date: 2025-03-15 23:27:45
Score: 2
Natty:
Report link

réponse un peu tardive mais j'ai moi même eu du mal à trouver l'info puis en voyant ton post ça ma orienté sur une autre piste.

# files

[System.IO.FileInfo[]]$files = $([System.IO.Directory]::EnumerateFiles($PWD,"*.*",[System.IO.SearchOption]::AllDirectories)) | %{ [System.IO.FileInfo]$_ }

# custom properties

$files | select BaseName,Name,FullName,Length | Export-Csv -Path $PWD\filelist.csv -Delimiter ';' -NoTypeInformation -Encoding UTF8

# files - splat

$files_ps = @{ Property = @( "BaseName","Name","FullName","Length" ) }

$files = $([System.IO.Directory]::EnumerateFiles($PWD,"*.*",[System.IO.SearchOption]::AllDirectories)) | %{ [System.IO.FileInfo]$_ | select @files_ps }

$files | Export-Csv -Path $PWD\filelist.csv -Delimiter ';' -NoTypeInformation -Encoding UTF8

# directory

[System.IO.DirectoryInfo[]]$directory = [System.IO.Directory]::EnumerateDirectories($PWD,"*",[System.IO.SearchOption]::AllDirectories)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @files_ps
  • Low reputation (1):
Posted by: positive Europe

79511917

Date: 2025-03-15 23:17:43
Score: 1.5
Natty:
Report link

Error is of missing namespace in the flutter_secure_storage package. To fix this, you’ll need to update the package to a version where the namespace is added.

Just make sure to replace flutter_secure_storage: ^9.2.4 in your pubspec.yaml file and using latest flutter SDK version. This simple change should resolve your issue.

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

79511916

Date: 2025-03-15 23:16:43
Score: 2
Natty:
Report link

nice, but

➜ ~ sudo apt install linux-firmware
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package linux-firmware

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

79511910

Date: 2025-03-15 23:03:41
Score: 2.5
Natty:
Report link

Upgrade the tflite package compileSdkVersion to 34

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ratul Hasan Ruhan

79511901

Date: 2025-03-15 22:49:38
Score: 2
Natty:
Report link

I ended up to this:

It's probably bad approach (because even if I'm an admin I need to wait for additional request to be finished) but it works. There is a mention about server side rendering in the comments but I didn't have enough time to invest into researching & implementing this even though it's probably the way to go.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jake Mayer

79511893

Date: 2025-03-15 22:46:37
Score: 2
Natty:
Report link

You cannot set the value of a property if it is null or undefined (as indicated by the ?.)

You should check that the property exists first and then set it:

if (statusUpdateRefreshReasonRef.current) {
    statusUpdateRefreshReasonRef.current.value = cloneStatusUpdateClone;
}
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ivo

79511866

Date: 2025-03-15 22:13:32
Score: 1.5
Natty:
Report link

Took a long time to figure out.

  NotificationCenter.default.addObserver(self, selector: #selector(updateGroupxx(notification:)), name: .NSCalendarDayChanged, object: nil)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Misfit

79511863

Date: 2025-03-15 22:12:32
Score: 2
Natty:
Report link
$b = '1';
$a = 'b';
$b = '2';
print "$$a";

Output: 2 (current value of $b).

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

79511840

Date: 2025-03-15 21:46:27
Score: 0.5
Natty:
Report link

The problem is that the executable file suffix is .exe, while running on Linux. A quick and easy fix is to simply change the suffix to .bin, for example:

exe = executable(
  'main.bin', # Do not use .exe here 
  'main.cu',
  link_args: '-fopenmp',
  cuda_args: '-Xcompiler=-fopenmp',
)
test('simple_run', exe)

Should run perfectly well. The decision to try running an .exe file with mono while on Linux, comes from this exact line in meson.

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

79511835

Date: 2025-03-15 21:40:25
Score: 1
Natty:
Report link

you can add multiple --add flags and pass the metadata params like that;

 stripe trigger checkout.session.completed \
    --add checkout_session:metadata.plan="id" \
    --add checkout_session:metadata.user="id"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Devran Şimşek

79511832

Date: 2025-03-15 21:40:25
Score: 1
Natty:
Report link

# Import numpy since it was missing earlier

import numpy as np

# Re-run the log transformation and regression

# Convert 'hourpay' to numeric, forcing errors to NaN

df['hourpay'] = pd.to_numeric(df['hourpay'], errors='coerce')

# Step 1 (revised): Drop missing, zero or negative wages

df = df[df['hourpay'] > 0]

# Create log(wage)

df['log_wage'] = np.log(df['hourpay'])

# Step 2: Motherhood dummy: 1 if has dependent child under 19, 0 otherwise

df['motherhood'] = df['fdpch19'].apply(lambda x: 1 if x > 0 else 0)

# Step 3: Convert categorical variables

df['education'] = df['degcls7'].astype('category')

df['occupation'] = df['occup_group'].astype('category')

df['worktype'] = df['ftpt'].astype('category')

# Step 4: Experience approximation (proxy by age)

df['experience'] = df['age']

# Step 5: Regression formula

formula = 'log_wage ~ motherhood + C(education) + experience + C(occupation) + C(worktype)'

# Step 6: Run OLS regression with robust standard errors

model = smf.ols(formula, data=df).fit(cov_type='HC1')

# Display regression results

model.summary()

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

79511823

Date: 2025-03-15 21:36:25
Score: 0.5
Natty:
Report link

I believe what you're looking for is:

HttpResponseMessage response = await httpClient.GetAsync(uri);
if (response.Headers.Location == new Uri(some_uri_string)) {
  return true;
}

I realize this response is more than a decade late, but I'd thought I'd answer it.

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

79511822

Date: 2025-03-15 21:36:22
Score: 6 🚩
Natty:
Report link

I am not strong in Excel. I have never used script or record. I have a site map with typed numbers in the cells but I want them to have colons because they are MAC address's. I have tried alot of these ideas but it cuts out numbers/letters. If i make a whole copy of just one large set I have got it to work ish. I copy it and erase my old cell info to paste in the new stuff but both disappear when I do it? Any ideas for a learner of this?

Reasons:
  • Blacklisted phrase (1): Any ideas
  • RegEx Blacklisted phrase (1): I want
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ross Lesher

79511811

Date: 2025-03-15 21:30:18
Score: 8.5 🚩
Natty:
Report link

Raka Putra how did you fix the error

Reasons:
  • Blacklisted phrase (1): how did you fix
  • RegEx Blacklisted phrase (3): did you fix the
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): how did you fix the
  • Low reputation (1):
Posted by: Obiajulu

79511795

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

I made progress:

import torch
import onnxruntime_extensions
import onnx
import onnxruntime as ort
import numpy as np
from transformers import GPT2Tokenizer, GPT2LMHeadModel
import subprocess

model_name = "spital/gpt2-small-czech-cs"

model = GPT2LMHeadModel.from_pretrained(model_name)
tokenizer = GPT2Tokenizer.from_pretrained(model_name)

input_text = "Téma: Umělá inteligence v moderní společnosti."

# Export the tokenizers to ONNX using gen_processing_models
onnx_tokenizer_coder_path = "results/v5/model/tokenizer_coder.onnx"
onnx_tokenizer_decoder_path = "results/v5/model/tokenizer_decoder.onnx"

# Generate the tokenizers ONNX model
gen_tokenizer_coder_onnx_model = onnxruntime_extensions.gen_processing_models(tokenizer, pre_kwargs={})[0]
gen_tokenizer_decoder_onnx_model = onnxruntime_extensions.gen_processing_models(tokenizer, post_kwargs={})[1]

# Save the tokenizers ONNX model
with open(onnx_tokenizer_coder_path, "wb") as f:
    f.write(gen_tokenizer_coder_onnx_model.SerializeToString())
with open(onnx_tokenizer_decoder_path, "wb") as f:
    f.write(gen_tokenizer_decoder_onnx_model.SerializeToString())

# Export the Huggingface model to ONNX
onnx_model_path = "results/v5/model/"

# Export the model to ONNX
command = [
    "optimum-cli", "export", "onnx",
    "-m", model_name,
    "--opset", "18",
    "--monolith",
    "--task", "text-generation",
    onnx_model_path
]
subprocess.run(command, check=True)

# Adding position_ids for tokenizer coder for model
add_tokenizer_coder_onnx_model = onnx.load(onnx_tokenizer_coder_path)

shape_node = onnx.helper.make_node(
    "Shape",
    inputs=["input_ids"],
    outputs=["input_shape"]
)

gather_node = onnx.helper.make_node(
    "Gather",
    inputs=["input_shape", "one"],
    outputs=["sequence_length"],
    axis=0
)

cast_node = onnx.helper.make_node(
    "Cast",
    inputs=["sequence_length"],
    outputs=["sequence_length_int"],
    to=onnx.TensorProto.INT64
)

# Creating position_ids node for tokenizer coder for model
position_ids_node = onnx.helper.make_node(
    "Range",
    inputs=["zero", "sequence_length_int", "one"],
    outputs=["shorter_position_ids"]
)

zero_const = onnx.helper.make_tensor("zero", onnx.TensorProto.INT64, [1], [0])
one_const = onnx.helper.make_tensor("one", onnx.TensorProto.INT64, [1], [1])

position_ids_output = onnx.helper.make_tensor_value_info(
    "position_ids",
    onnx.TensorProto.INT64,
    ["sequence_length"]
)

unsqueeze_axes = onnx.helper.make_tensor(
    "unsqueeze_axes",
    onnx.TensorProto.INT64,
    dims=[1],
    vals=[0]
)

expand_node = onnx.helper.make_node(
    "Unsqueeze",
    inputs=["shorter_position_ids", "unsqueeze_axes"],
    outputs=["position_ids"]
)

expanded_position_ids_output = onnx.helper.make_tensor_value_info(
    "position_ids",
    onnx.TensorProto.INT64,
    ["batch_size", "sequence_length"]
)

# Adding position_ids to outputs of tokenizer coder for model
add_tokenizer_coder_onnx_model.graph.node.extend([shape_node, gather_node, cast_node, position_ids_node, expand_node])
add_tokenizer_coder_onnx_model.graph.output.append(expanded_position_ids_output)
add_tokenizer_coder_onnx_model.graph.initializer.extend([zero_const, one_const, unsqueeze_axes])

# Export tokenizer coder with position_ids for model
onnx.save(add_tokenizer_coder_onnx_model, onnx_tokenizer_coder_path)

# Adding operation ArgMax node to transfer logits -> ids
onnx_argmax_model_path = "results/v5/model/argmax.onnx"

ArgMax_node = onnx.helper.make_node(
    "ArgMax",
    inputs=["logits"],
    outputs=["ids"],
    axis=-1,
    keepdims=0
)

# Creating ArgMax graph
ArgMax_graph = onnx.helper.make_graph(
    [ArgMax_node],
    "ArgMaxGraph",
    [onnx.helper.make_tensor_value_info("logits", onnx.TensorProto.FLOAT, ["batch_size", "sequence_length", "vocab_size"])],
    [onnx.helper.make_tensor_value_info("ids", onnx.TensorProto.INT64, ["batch_size", "sequence_length"])]
)

# Creating ArgMax ONNX model
gen_ArgMax_onnx_model = onnx.helper.make_model(ArgMax_graph)

# Exporting ArgMax ONNX model
onnx.save(gen_ArgMax_onnx_model, onnx_argmax_model_path)

# Adding shape for Tokenizer decoder outputs (Assuming shape with batch_size and sequence_length)
add_tokenizer_decoder_onnx_model = onnx.load(onnx_tokenizer_decoder_path)

expanded_shape = onnx.helper.make_tensor_value_info(
    "str",
    onnx.TensorProto.STRING,
    ["batch_size", "sequence_length"]
)

# Adding shape to Tokenizer decoder outputs
output_tensor = add_tokenizer_decoder_onnx_model.graph.output[0]
output_tensor.type.tensor_type.shape.dim.clear()
output_tensor.type.tensor_type.shape.dim.extend(expanded_shape.type.tensor_type.shape.dim)

# Exporting Tokenizer decoder with shape ONNX model
onnx.save(add_tokenizer_decoder_onnx_model, onnx_tokenizer_decoder_path)

# Test Tokenizer coder, Model, ArgMax, Tokenizer decoder using an Inference session with ONNX Runtime Extensions before merging
# Test the tokenizers ONNX model 
# Initialize ONNX Runtime SessionOptions and load custom ops library
sess_options = ort.SessionOptions()
sess_options.register_custom_ops_library(onnxruntime_extensions.get_library_path())

# Initialize ONNX Runtime Inference session with Extensions
coder = ort.InferenceSession(onnx_tokenizer_coder_path, sess_options=sess_options, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
model = ort.InferenceSession(onnx_model_path + "model.onnx", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
ArgMax = ort.InferenceSession(onnx_argmax_model_path, sess_options=sess_options, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
decoder = ort.InferenceSession(onnx_tokenizer_decoder_path, sess_options=sess_options, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])

# Prepare dummy input text
input_feed = {"input_text": np.asarray([input_text])}  # Assuming "input_text" is the input expected by the tokenizers

# Run the tokenizer coder
tokenized = coder.run(None, input_feed)
print("Tokenized:", tokenized)

# Run the model
model_output = model.run(None, {"input_ids": tokenized[0], "attention_mask": tokenized[1], "position_ids": tokenized[2]})
print("Model output (logits):", model_output[0])

# Run the ArgMax
argmax_output = ArgMax.run(None, {"logits": model_output[0]})
print("ArgMax output (token ids):", argmax_output[0])

# Run the tokenizer decoder
detokenized = decoder.run(None, input_feed={"ids": argmax_output[0]})
print("Detokenized:", detokenized)

# Merge the tokenizer and model ONNX files into one
onnx_combined_model_path = "results/v5/model/combined_model_tokenizer.onnx"

# Load the tokenizers and model ONNX files
tokenizer_coder_onnx_model = onnx.load(onnx_tokenizer_coder_path)
model_onnx_model = onnx.load(onnx_model_path + "model.onnx")
ArgMax_onnx_model = onnx.load(onnx_argmax_model_path)
tokenizer_decoder_onnx_model = onnx.load(onnx_tokenizer_decoder_path)

# Inspect the ONNX models to find the correct input/output names
print("\nTokenizer coder Model Inputs:", [node.name for node in tokenizer_coder_onnx_model.graph.input])
print("Tokenizer coder Model Outputs:", [node.name for node in tokenizer_coder_onnx_model.graph.output])
print("Tokenizer coder Model Shape:", [node.type.tensor_type.shape for node in tokenizer_coder_onnx_model.graph.output])
print("Tokenizer coder Model Type:", [node.type.tensor_type.elem_type for node in tokenizer_coder_onnx_model.graph.output])
print("\nModel Inputs:", [node.name for node in model_onnx_model.graph.input])
print("Model Outputs:", [node.name for node in model_onnx_model.graph.output])
print("Model Shape:", [node.type.tensor_type.shape for node in model_onnx_model.graph.output])
print("Model Type:", [node.type.tensor_type.elem_type for node in model_onnx_model.graph.output])
print("\nArgMax Inputs:", [node.name for node in ArgMax_onnx_model.graph.input])
print("ArgMax Outputs:", [node.name for node in ArgMax_onnx_model.graph.output])
print("ArgMax Shape:", [node.type.tensor_type.shape for node in ArgMax_onnx_model.graph.output])
print("ArgMax Type:", [node.type.tensor_type.elem_type for node in ArgMax_onnx_model.graph.output])
print("\nTokenizer decoder Model Inputs:", [node.name for node in tokenizer_decoder_onnx_model.graph.input])
print("Tokenizer decoder Model Outputs:", [node.name for node in tokenizer_decoder_onnx_model.graph.output])
print("Tokenizer decoder Model Shape:", [node.type.tensor_type.shape for node in tokenizer_decoder_onnx_model.graph.output])
print("Tokenizer decoder Model Type:", [node.type.tensor_type.elem_type for node in tokenizer_decoder_onnx_model.graph.output])

# Merge the tokenizer coder and model ONNX files
combined_model = onnx.compose.merge_models(
    tokenizer_coder_onnx_model,
    model_onnx_model,
    io_map=[('input_ids', 'input_ids'), ('attention_mask', 'attention_mask'), ('position_ids', 'position_ids')]
)

# Merge the model and ArgMax ONNX files
combined_model = onnx.compose.merge_models(
    combined_model,
    ArgMax_onnx_model,
    io_map=[('logits', 'logits')]
)

# Merge the ArgMax and tokenizer decoder ONNX files
combined_model = onnx.compose.merge_models(
    combined_model,
    tokenizer_decoder_onnx_model,
    io_map=[('ids', 'ids')]
)

# Check combined ONNX model
inferred_model = onnx.shape_inference.infer_shapes(combined_model)
onnx.checker.check_model(inferred_model)

# Save the combined model
onnx.save(combined_model, onnx_combined_model_path)

# Test the combined ONNX model using an Inference session with ONNX Runtime Extensions
# Initialize ONNX Runtime SessionOptions and load custom ops library
sess_options = ort.SessionOptions()
sess_options.register_custom_ops_library(onnxruntime_extensions.get_library_path())

# Initialize ONNX Runtime Inference session with Extensions
session = ort.InferenceSession(onnx_combined_model_path, sess_options=sess_options, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])

# Prepare dummy input text
input_feed = {"input_text": np.asarray([input_text])}  # Assuming "input_text" is the input expected by the tokenizer

# Run the model
outputs = session.run(None, input_feed)

# Print the outputs
print("logits:", outputs)

This is example of all in one GPT2 ONNX model with tests.

Now I am trying to make it generate more than one token of text that doesn't make sense I checked onnx_gpt_loop but I don't know how to implement it. I also know that onnx.helper could have tool for this problem as well.

Reasons:
  • Blacklisted phrase (1): I am trying to
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Matej Hudec

79511788

Date: 2025-03-15 21:17:15
Score: 1
Natty:
Report link

It's possibly an issue because of the mismatch with the underlying node version. I ran into this and I was able to upgrade my node version that resolved the issue.

Run:

  1. sudo npm install n -g
  2. n stable

I do not see the issue in the stable version as of today: v22.14.0

Reference: Upgrading Node.js to the latest version

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

79511787

Date: 2025-03-15 21:17:15
Score: 0.5
Natty:
Report link

The problem is in the way you instantiate person, you can do it in the following way:

person = random.sample( people, 1)[ 0 ].

This way, person will only contain the appropriate text.

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

79511782

Date: 2025-03-15 21:11:14
Score: 3
Natty:
Report link

The issue is that your version of Java Spark supports Java 17 and later, but it seems that your Java version is higher than 17.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: daniel josue pena tsopte

79511775

Date: 2025-03-15 21:05:13
Score: 0.5
Natty:
Report link

Here is my solution that I think it better optimize

School.objects.annotate(
    number_of_class=Subquery(
        Class.objects.filter(
            school_id=OuterRef("pk"),
            is_deleted=False,
            # Add additional filters here
        ).values("school_id").annotate(count=Func(F("id"), function="COUNT")).values("count")
    )
)
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Chanchhunneng chrea

79511769

Date: 2025-03-15 20:58:11
Score: 1.5
Natty:
Report link
from ..folder1.file import *

Try this

Reasons:
  • Whitelisted phrase (-1): Try this
  • Low length (2):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ArtikLamartik

79511759

Date: 2025-03-15 20:55:10
Score: 2
Natty:
Report link

Found the answer, courtesy of GitHub Copilot:

To execute custom logic before navigation, you can wrap the next/link component with a custom component and handle the logic within that component.

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

79511755

Date: 2025-03-15 20:52:10
Score: 1.5
Natty:
Report link

Once you use MediaQuery.of(context).devicePixelRatio or View.of(context).devicePixelRatio,

the size will change as the device size or pixelRatio changes.

Use a constant value like just 160 to have a size of 160 across all screen sizes

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

79511754

Date: 2025-03-15 20:51:07
Score: 7 🚩
Natty: 5.5
Report link

I'm not giving an answer, but rather trying to get this to work for me. I put in the Service, Cluster, and DesiredCount, but nothing happens that I can see. I don't know where to go to see any kind of log to tell me whether or not it ran and/or what the error might be.

Any help would be appreciated.

Thanks.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): appreciated
  • Blacklisted phrase (1): Any help
  • RegEx Blacklisted phrase (3): Any help would be appreciated
  • No code block (0.5):
  • Low reputation (1):
Posted by: David

79511746

Date: 2025-03-15 20:45:06
Score: 1.5
Natty:
Report link

I found that explanation really helpful and solved a similar issue for me

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

79511743

Date: 2025-03-15 20:42:03
Score: 7.5 🚩
Natty: 4.5
Report link

Anyone found a workaround in this except using list for recursive property?

Reasons:
  • Blacklisted phrase (2): Anyone found
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: st.nasos

79511742

Date: 2025-03-15 20:39:03
Score: 0.5
Natty:
Report link

There are a few reasons why these differences might occur:

To ensure consistency across browsers, using a CSS reset like Normalize.css can help override these default behaviors and create a more uniform appearance.

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

79511740

Date: 2025-03-15 20:37:02
Score: 1
Natty:
Report link

Late to the party, but one obvious case is selections -- dragging from one place to another in a displayed document is a range. That is, unless you place both end just exactly right to get a whole element. So every browser and word processor has had to implement ranges pretty much from the beginning. They just called it a "selection" instead. We all use them countless times every day.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
Posted by: TextGeek

79511736

Date: 2025-03-15 20:35:02
Score: 2.5
Natty:
Report link

Downgrading the node version from 22 to 14 worked for me

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sunny Choudhary

79511719

Date: 2025-03-15 20:22:59
Score: 3.5
Natty:
Report link

You'd need to redo the compile shader step in the tutorial: https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Shader_modules

run the compile.bat file in your Vulkan/shaders directory.

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

79511717

Date: 2025-03-15 20:21:59
Score: 1
Natty:
Report link

15 Years later....

Using solutions mentioned by other here (Thanks!) , I ended up using the following code.
I need events to fire only when a tab is clicked.

I have DataGrids in Tabs and selecting any Row would fire the TabControl.SelectionChanged event.

Using this in the TabControl_SelectionChanged event solved my problem.

I added the option to switch by TabItem.Name instead of its SelectedIndex in case I move tabs around in development later.

if (e.OriginalSource is TabControl)
 {
     var tabControl = e.OriginalSource as TabControl;

     if (tabControl.Name == "<YourTabControlName>")
     {
         switch ((tabControl.SelectedItem as TabItem).Name)
         {
             case "First_Tab": //First Tabs Name
                     //DOWORK
                 break;
             case "Second_Tab": //Second Tabs Name
                 //DOWORK
                 break;    
             default:
                 break;
         }
     }
 }
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: SiRaDuDe

79511716

Date: 2025-03-15 20:18:58
Score: 2.5
Natty:
Report link

Run flutter clean and then flutter get.

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

79511712

Date: 2025-03-15 20:15:58
Score: 1
Natty:
Report link

By extent, should I check if the pointer to the device tree provided to the kernel is NULL?

I don't think the RISC-V specification per se specifies which addresses might be valid to access when the kernel boots. This information must be hardcoded into the kernel, or detected by probing the hardware or BIOS somehow, or provided by the device tree itself. In that last case it is impossible to sanitize the device tree address, so don't. In the other cases I don't think it's worth the effort; I would simply allow whatever happens when you access invalid memory to happen.

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

79511709

Date: 2025-03-15 20:14:58
Score: 1
Natty:
Report link

To avoid errors, you can use the flutter fire to setup firebase for project. The instructions on how to use flutterfire is given here

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

79511707

Date: 2025-03-15 20:11:57
Score: 5.5
Natty:
Report link

https://www.checkout-ds24.com/redir/599344/Cashif0123/

kindly convert it into iframe

[email protected]

whtsapp +923350217783

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

79511692

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

This was really troubled thing to find, but a simple C++ extension re-install would resolve.

I tried the following ways :

Still getting the same error, so - uninstall all C++ related extensions from Microsoft, and install them again or only the C++ Extension from Microsoft.

enter image description here

There should be some extension problem in my case

Reasons:
  • No code block (0.5):
  • Me too answer (2.5): getting the same error
Posted by: Susobhan Das

79511688

Date: 2025-03-15 19:51:53
Score: 0.5
Natty:
Report link

I just investigated some more myself and found this solution making use of the walrus operator:

import numpy as np

a = np.arange(10)

dim_a, dim_total = 2, 4

(shape := [1] * dim_total)[dim_a] = -1
np.reshape(a, shape)

I like that it's very compact, but the := is still not very commonly used.

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

79511687

Date: 2025-03-15 19:50:52
Score: 2
Natty:
Report link
% echo "your string literal here" | wc -c
      25
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Larry Breyer

79511666

Date: 2025-03-15 19:29:49
Score: 3.5
Natty:
Report link

nice answer and for more information of NEET to visit shrinfda.in

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

79511657

Date: 2025-03-15 19:25:48
Score: 2
Natty:
Report link

I found that i needed to mention the font style that i have added previously on this

doc.addFileToVFS("Amiri-Regular.ttf", arabicFont);
doc.addFont("Amiri-Regular.ttf", "Amiri", "normal");
doc.setFont("Amiri");

so my headstyles should look like this

headStyles: { font: "Amiri", fontStyle: "normal" }
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: Ak98

79511650

Date: 2025-03-15 19:22:47
Score: 2
Natty:
Report link

This is a window pc and the file structure in the search bar is forward slash but in the Index of section in there is Backward slash.
enter image description here

Windows actually supports both types of slashes in many contexts, though backslashes are the standard convention. This mixed use of slashes can sometimes be confusing, but the system generally understands both formats depending on the context.

  1. The search bar might be showing a web URL format (which uses forward slashes)

  2. The "Index of" section is showing the actual Windows file path format (which uses backslashes)

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: HJoshi280102

79511643

Date: 2025-03-15 19:16:46
Score: 1.5
Natty:
Report link

Use [ngClass] instead of *ngClass.

<ol>
  <li [ngClass]="{'active': step === 'step1'}" (click)="step='step1'">Step1</li>
</ol>
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Andrew Chaika

79511637

Date: 2025-03-15 19:09:45
Score: 0.5
Natty:
Report link

I've come back to this thread a lot and used adaptations of @Adib's code several times, but I recently got a version that extends functionality to be more complete, as I believe ColumnTransformer and/or Pipeline will throw an error if you try to use get_feature_names_out().

from sklearn.base import BaseEstimator, TransformerMixin
import numpy as np
import pandas as pd
from scipy import sparse

class MultiHotEncoder(BaseEstimator, TransformerMixin):
    """
    A custom transformer that encodes columns containing lists of categorical values
    into a multi-hot encoded format, compatible with ColumnTransformer.
    
    Parameters:
    -----------
    classes : list or None, default=None
        List of all possible classes. If None, classes will be determined from the data.
    sparse_output : bool, default=False
        If True, return a sparse matrix, otherwise return a dense array.
    """
    def __init__(self, classes=None, sparse_output=False):
        self.classes = classes
        self.sparse_output = sparse_output
        
    def fit(self, X, y=None):
        """
        Fit the transformer by determining all possible classes.
        
        Parameters:
        -----------
        X : array-like of shape (n_samples, n_features)
            Columns containing lists of values.
        
        Returns:
        --------
        self : object
            Returns self.
        """
        # Handle DataFrame input properly
        if isinstance(X, pd.DataFrame):
            X_processed = X.values
        else:
            X_processed = np.asarray(X)
            
        # Collect all unique classes
        if self.classes is None:
            unique_classes = set()
            for col in X_processed.T:
                for row in col:
                    if row is not None and hasattr(row, '__iter__') and not isinstance(row, (str, bytes)):
                        unique_classes.update(row)
            self.classes_ = sorted(list(unique_classes))
        else:
            self.classes_ = sorted(list(self.classes))
            
        # Create a dictionary for fast lookup
        self.class_dict_ = {cls: i for i, cls in enumerate(self.classes_)}
        return self
    
    def transform(self, X):
        """
        Transform lists to multi-hot encoding.
        
        Parameters:
        -----------
        X : array-like of shape (n_samples, n_features)
            Columns containing lists of values.
        
        Returns:
        --------
        X_transformed : array of shape (n_samples, n_features * n_classes)
            Transformed array with multi-hot encoding.
        """
        # Handle DataFrame input properly
        if isinstance(X, pd.DataFrame):
            X_processed = X.values
        else:
            X_processed = np.asarray(X)
            
        n_samples, n_features = X_processed.shape
        n_classes = len(self.classes_)
        
        # Initialize the output array
        if self.sparse_output:
            rows = []
            cols = []
            for j, col in enumerate(X_processed.T):
                for i, row in enumerate(col):
                    if row is None:
                        continue
                    if not hasattr(row, '__iter__') or isinstance(row, (str, bytes)):
                        continue
                    for item in row:
                        if item in self.class_dict_:
                            rows.append(i)
                            cols.append(j * n_classes + self.class_dict_[item])
            data = np.ones(len(rows), dtype=int)
            result = sparse.csr_matrix((data, (rows, cols)), shape=(n_samples, n_features * n_classes))
        else:
            result = np.zeros((n_samples, n_features * n_classes), dtype=int)
            for j, col in enumerate(X_processed.T):
                for i, row in enumerate(col):
                    if row is None:
                        continue
                    if not hasattr(row, '__iter__') or isinstance(row, (str, bytes)):
                        continue
                    for item in row:
                        if item in self.class_dict_:
                            result[i, j * n_classes + self.class_dict_[item]] = 1
        
        return result
    
    def fit_transform(self, X, y=None):
        return self.fit(X).transform(X)
    
    def get_feature_names_out(self, input_features=None):
        """
        Get output feature names for transformation.
        
        Parameters:
        -----------
        input_features : array-like of str or None, default=None
            Input features. Used as a prefix for output feature names.
        
        Returns:
        --------
        feature_names_out : ndarray of str objects
            Array of output feature names.
        """
        if input_features is None:
            input_features = [""]
        
        feature_names_out = []
        for feature in input_features:
            feature_names_out.extend([f"{feature}_{cls}" for cls in self.classes_])
        
        return np.array(feature_names_out)
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Adib's
  • Low reputation (1):
Posted by: CarlosCoggtana

79511633

Date: 2025-03-15 19:06:44
Score: 3
Natty:
Report link
header 1 header 2
cell 1 cell 2
cell 3 cell 4
Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: user29978939

79511630

Date: 2025-03-15 19:05:43
Score: 5.5
Natty:
Report link

олоecwwecwecwecwewec weccewcwecwecwecwec

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low entropy (1):
  • Low reputation (1):
Posted by: Иван

79511628

Date: 2025-03-15 19:04:43
Score: 3.5
Natty:
Report link

You should give uv a chance: https://docs.astral.sh/uv/guides/integration/docker/. It’s very actively developed and has very good documentation

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

79511610

Date: 2025-03-15 18:51:40
Score: 3.5
Natty:
Report link

Peek into the source here; I think you'll find what you're looking for:

https://github.com/ProfJski/ArtColors

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

79511603

Date: 2025-03-15 18:42:39
Score: 2.5
Natty:
Report link

I have the same problem.

try this:

npm update eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser

and then

npm cache clean --force && rm -rf node_modules/ && npm i
Reasons:
  • Blacklisted phrase (1): I have the same problem
  • Whitelisted phrase (-2): try this:
  • Low length (1):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same problem
  • Low reputation (0.5):
Posted by: Nikolay Gromov

79511596

Date: 2025-03-15 18:33:37
Score: 0.5
Natty:
Report link

The problem with this code was that in the screen composable I create the viewModel with the class constructor, like so:

@Composable
fun CameraScreen(
    modifier: Modifier = Modifier,
    lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current,
    cameraViewModel: CameraViewModel = CameraViewModel(),
)

Which doesn't make it part of the composition, nor does it save its state. To solve this I just changed the assignment of the default value as follows:

@Composable
fun CameraScreen(
    modifier: Modifier = Modifier,
    lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current,
    cameraViewModel: CameraViewModel = viewModel()
)

And now everything works correctly!

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

79511590

Date: 2025-03-15 18:28:34
Score: 7 🚩
Natty: 6
Report link

in python 3.9.2 same error, why?

Reasons:
  • Blacklisted phrase (0.5): why?
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Gerfried

79511583

Date: 2025-03-15 18:22:32
Score: 1
Natty:
Report link

In my case working add to dependencies:

dependencies:
  flutter_plugin_android_lifecycle: ^2.0.27
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Николай Невзоров

79511575

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

With Propshaft, this is handled by the resolver.

Rails.application.assets.resolver.resolve(logical_path).present?

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Timothy Alexis Vass

79511572

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

I examined the target website you're scraping, and since the data isn't loaded via a visible API, your current method is necessary. However, to improve efficiency and speed, consider using an asynchronous approach. Here’s how:

  1. Use Scrapy – It's optimized for fast and scalable scraping.
  2. Process in Batches – Instead of scraping pages one by one, fetch 100 at a time to reduce overhead.
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Adel Alaa

79511569

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

In Python, the convention is to place version bookkeeping (such as __version__ and __author__) before imports. This is a widely followed practice, though it's not strictly required by the language itself.

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

79511567

Date: 2025-03-15 18:08:29
Score: 1.5
Natty:
Report link

from ibapi.utils import floatMaxString,decimalMaxString,intMaxString
If you can't import it, please reinstall IBAPI right

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

79511565

Date: 2025-03-15 18:04:29
Score: 1
Natty:
Report link

A bit more messy, but with less boilerplate is just to unpack the Literal. e.g.:

MyType = Literal["a", "b", "c"]
A, B, C = get_args(MyType)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Dylan Madisetti

79511564

Date: 2025-03-15 18:03:28
Score: 1.5
Natty:
Report link

Below is what I did, thanks to @classikh! It fixed my issue:

    // Define your form.
  const form = useForm<z.infer<typeof formSchema>>({
    resolver: zodResolver(formSchema), 
    defaultValues: {
      email: '', 
    },
    values: {
      email: user?.email ?? '', 
    }
  })

In above code 'user' is coming from my hook which gets populated when user is fetched.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Has code block (-0.5):
  • User mentioned (1): @classikh
  • Low reputation (0.5):
Posted by: Frontend Backend Bookend

79511559

Date: 2025-03-15 18:00:27
Score: 1
Natty:
Report link

After using wwwizer.com I was able to redirect the domain properly. I removed the GoDaddy forward configuration, and opted to use a new A record into the DNS to redirect:

Type Name Data
A @ 174.129.25.170

Take a lot at wwwizer for more information.

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

79511554

Date: 2025-03-15 17:57:27
Score: 3.5
Natty:
Report link

enter image description here

On project tree (to the right) one needs to expand Android64 target, and there are several folders inside. Configuration, Application Store means aab, Development means apk

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

79511547

Date: 2025-03-15 17:53:24
Score: 7.5 🚩
Natty: 5
Report link

Me pasaba lo mismo y probe todo. Al final lo conseguí dandole una patada a la cpu y desactivando el plugin de wordpress gosmtp y go smtp pro en ese orden y volviendo a activarlos en igual orden. luego he dejado clickado las dos opciones de force from email y force from name y ya todo ok. gracias a todos.

Reasons:
  • Blacklisted phrase (2): gracias
  • RegEx Blacklisted phrase (2.5): mismo
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user29978864

79511534

Date: 2025-03-15 17:48:22
Score: 2
Natty:
Report link

For me, it was called on the wrong thread. This will help:

            await InvokeAsync(() => NavigationManager.NavigateTo("/chat"));
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Mathias

79511532

Date: 2025-03-15 17:46:22
Score: 6.5
Natty: 7.5
Report link

What is the integral of the function f(x) = sin 2x?

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): What is the in
  • Low reputation (1):
Posted by: Christ Jesus

79511531

Date: 2025-03-15 17:45:21
Score: 2
Natty:
Report link

Sorry about the broken link, and I appreciate you pointing it out. Thanks for sharing your project structure—that definitely helps in troubleshooting.

Since you already tried 'ENGINE': 'custom_backend.base' and got an error, here are a few things to double-check:

If you are still stuck, let me know what error you are seeing now—I will be happy to help!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (2): Thanks for sharing
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jack D

79511523

Date: 2025-03-15 17:42:21
Score: 1
Natty:
Report link
n=5 
for i in range(n,0,-1):
    for j in range(n-i):
        print(" ",end="")
    for j in range(2*i-1):
        if j == 0 or i == n or j == 2*i-2:
            print("*",end="")
        else:
            print(" ",end="")
    print()
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Krishna Vamshi Pasupula

79511497

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

The programming needs to be inside the PDF (Has always been that way for almost 3 decades)

Then the button sends the data as designed by you, to your server.

So here I am E.T. and phoning home.

This was done in seconds by adding a GUI button as text.

For a simple method see my previous answer https://stackoverflow.com/a/78212967/10802527

enter image description here

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • High reputation (-2):
Posted by: K J

79511488

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

There's an issue with building locally with expo.

I used npx expo prebuild to generate the ios folder and then followed the instructions here:
https://reactnative.dev/docs/publishing-to-app-store

This work well!

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