79483852

Date: 2025-03-04 13:39:29
Score: 3.5
Natty:
Report link

https://www.designgurus.io/blog/horizontally-scale-sql-databases ^ This is a good resource to add more food for thought when considering distributed systems and databases.

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

79483844

Date: 2025-03-04 13:37:29
Score: 3.5
Natty:
Report link

A bit stupid of my part, the string was actually filled with \n and double quotes, I needed to replace all these characters for the html string to be normally formatted

Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: user3794667384

79483842

Date: 2025-03-04 13:37:29
Score: 1.5
Natty:
Report link

The reason is because AWS does not currently have enough capacity for that instance type. The think you can do is to try to create the instance in a different AZ or different instance type.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Dragomir Ivanov

79483841

Date: 2025-03-04 13:37:29
Score: 0.5
Natty:
Report link

Another option is to use the "capture" tag, which captures the string inside two tags, and then assigns the result to another (string) variable (see docs on Liquid variables for details). For an input integer variant.id (following @fabio-filippi here) you'll end up with something like this:

{% capture variant_id %}{{ variant.id }}{% endcapture %}

Variable variant_id is now the string representation of variant.id. I personally think this is slightly more elegant than the other proposed solutions I've seen floating around the net. I'm still surprised Liquid doesn't have a built-in, dedicated tag for such a basic operation though.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @fabio-filippi
  • Low reputation (0.5):
Posted by: johan

79483838

Date: 2025-03-04 13:36:28
Score: 1.5
Natty:
Report link

I can confirm that I created multitenant database in silent mode plus using also response file: dbca -silent -createDatabase -responseFile dbca.rsp

As a result, my PDB database has no SYSTEM, SYSAUX, UNDO, TEMP, USERS. Just nothing, though it was created and I can connect to it. I can list these tablespaces in PDB but all of them seem SHARED from CDB, i.e. there is no separate data file on hard drive for PDB.

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

79483836

Date: 2025-03-04 13:35:28
Score: 2
Natty:
Report link

The connection was simply running on a different bus on the 7100. It was running on bus 2.

sudo i2cdetect -y -r 2 showed that there was a device on 0x36

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

79483835

Date: 2025-03-04 13:34:28
Score: 1
Natty:
Report link

You can simply create an own static Logger for your class:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

private static final Logger log = LoggerFactory.getLogger(YourClass.class);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Bylaw

79483834

Date: 2025-03-04 13:33:28
Score: 1.5
Natty:
Report link

See the iruby example here: SciRuby example notebook

What thay propose is:

File.open('IRuby Examples/ruby.png')
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: moskyt

79483833

Date: 2025-03-04 13:33:27
Score: 1
Natty:
Report link

Unfortunately, the right solution is to contact support to request an increased limits. The InstanceLimitExceeded is because you have been reached the EC2 limit for your account.

Reasons:
  • Whitelisted phrase (-1): solution is
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Dragomir Ivanov

79483829

Date: 2025-03-04 13:32:27
Score: 1.5
Natty:
Report link

kaeck2h3:trietdeptrai:_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_115C3DE36C3308CEA78CB1CD06DA4143C52100C1AB88CD5F714964868106E70FBB73E6A31CFC17516E1F2B1FAAB59160F7F85278ACB5C657A4488DB729750B1A66B6F2484CF918E01C4ECED2A5E91D4043E585FDE0745790314A204B844AABA904A83D210F2B5D3ACB3F313EDEF4FE36357118CA978F7844BE7129F44124DDC466005A226A4636D9B4A0C45FFE39FC28D7B04628B2B5FB0F66A7C1A40D34BBEDA371140212240632890F430702FD5E76E90BEAD824AD5FD9B4C69E877E7DCB883A0B4990EB15D0C2904F4849DE6C537A632037E6596F3CC7BE56C0D65B8A970239CE3F334D920C22E4C47ED270CAA055DA6693FB93EF56668562F780194F620F064043BDA900F519CE80A425EC9ECF7138AD45357AF1569B3824ED36B8E4C34E648BD581E240A9DE47B561BE16D3CB302CFE8079736C2F6025F8523270BF989AFCFA63C3D1F24574AFFBA18FE9D4CBAECFFDE3DEE3010ABB26D4914AA385C6964745B8D1DCC5F9D5ADB2E4042EBEBD2B889DDA2593989783CA630A5B70A46796516F0B3C8DEB66241895DC8FC1278DF7BA631DE88C2EFA12901669B00A31C1A2A6576DBF02C89E3871845BF4A219A9D0E9AA9A805BF4E4AE7BC9D7DA1E1D8999FAB0181140CC3670B50C17EB2C259688A18E17A84D8673E594C4EE05A57E1CFF367423B9F9AB7C2D261DB61713CD9DD44AFA1497CC15B5BAC2A25ED0047A2CDE4AD00A6C6C166520EEE46CE27DFA9514A8AF7274E0B6635C61DA54B6328803F339A7CB90005FC5AE8A4C89A6941165EDB3555861820496F92A1C8CC36CAE63527FD641141454D45B05619C4C21D0037D2D5188CFF37AC616465782A519EA055B3BF5B3DE20D6CB5896104DBF416DA328E9D042C136F368F07DCDA7ED946E0BD0D386C38EC86E5DB28360A0767C2728F309E90BF55703506BDFCFE7C90AA8255291D6FCE71B91A5BD5AE8ED9008147AA4A701F6300F5B21C4B296ABBEC04A95AFE23B260EF9B7E8F2BA695527BC7ECEF7BEF899ADC62E1D3864B5147AF6C33FBFFC4B024519801DA36065976BD5CB5786A8A9B301D2F608C288F2B66E2F88124C4CBC251A6EFE08FA9218B669B735F688970B4E85

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Hiền Nguyễn

79483827

Date: 2025-03-04 13:31:27
Score: 2.5
Natty:
Report link

i am experiencing this too. I enabled/disabled the APIs, then I created a new API, which initially gave a different error (possible because it takes up to 5 minutes to load), but after I got the same ApiNotActivatedMapError.

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

79483826

Date: 2025-03-04 13:31:27
Score: 1
Natty:
Report link

Had this same problem in Win10. Turns out that pip was installed, just not in the scripts folder. Executing python -m pip --version works fine. python -m ensurepip --default-pip returns: Looking in links: c:\Users\BERTKO~1\AppData\Local\Temp\tmpzbbk5r9_ Requirement already satisfied: pip in c:\users\bert kortenbach\appdata\local\programs\python\python313\lib\site-packages (25.0.1)

This is my first time using Python. Problems problems. Can't say I like it very much so far.

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

79483825

Date: 2025-03-04 13:31:27
Score: 4
Natty: 4.5
Report link

There are 3rd party options, like:

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

79483824

Date: 2025-03-04 13:31:27
Score: 0.5
Natty:
Report link

Summary of the Issue & Solution

The reason my dropdown still displayed the selected option—even when I didn't store the selected value in the parent—was due to Angular's change detection optimizations. Since the selectedValue in the parent never actually changed, Angular did not trigger a UI update, and the browser's native behavior retained the selected value.

To force Angular to reset the dropdown back to the default option, I had to explicitly introduce a temporary value change before resetting it back to ''.

Working Solution

handleOnChange(event: any) {
  console.log(event.target.value);

  // Temporarily set a different value to force change detection
  this.selectedValue = 'temp-value';

  // Use setTimeout to reset it in the next JavaScript cycle
  setTimeout(() => {
    this.selectedValue = ''; // Revert to default selection
  });
}

Using setTimeout() ensures that Angular detects both changes separately, allowing the dropdown to reset properly.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: David Küng

79483823

Date: 2025-03-04 13:30:26
Score: 0.5
Natty:
Report link

After more debugging and tinkering with the code, eventually it turned out its not a problem with the software but with the serial port on the computer where my code worked. With the help of someone else I was able to use a logic analyzer and saw that on the /dev/ttyS0 port the request goes successfully to the Modbus RTU device but the response did not arrive properly. It seems like the port is being used for something else too even though I used before that linux commands in the terminal to check if the port is being used and I saw nothing then.

After finding this out, I moved the RS-485 cable to the other serial port present on the computer /dev/ttyS1 and then everything worked fine.

Thank you all for the input. Hopefully this is useful for other people in need too.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Angel Hadzhiev

79483820

Date: 2025-03-04 13:30:26
Score: 6.5 🚩
Natty: 4.5
Report link

All right folks, firstly, I am very sorry when I do not obey the rules - I do not have the concrete answer to the original question. Instead, I would like to refine the question to shed some light on the difficulty of the post: Most of the replies start with "if"... followed by some conditional statement. This is not the way you would handle the question when it boils down to evaluating the "equals" method for two distinct objects. Thus, re-phrasing the original question: exactly when are two objects "equal" by CONTRACT (considering cross-platform) when they contain intrinsic double or float values? If it was java.lang.Double or java.lang.Float I would rely on their respective equals method. In general, though, I suppose, this must not be dependent on situations such a THRESHOLD, libraries, fuzzies, wavelets, AI or the like... So, who is fond of JAVA, please help: what is the DEFINED answer to this question?

Reasons:
  • Blacklisted phrase (1): answer to this question?
  • RegEx Blacklisted phrase (3): please help
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: BastH

79483814

Date: 2025-03-04 13:25:25
Score: 1.5
Natty:
Report link

You case use this spec:

[
  {
    "operation": "shift",
    "spec": {
      "*": "data.&"
    }
 },
  {
    "operation": "modify-overwrite-beta",
    "spec": {
      "*": "=recursivelySquashNulls"
    }
 },
  {
    "operation": "shift",
    "spec": {
      "data": {
        "*": "&"
      }
    }
 }
]

This spec covers all levels of json

enter image description here

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

79483811

Date: 2025-03-04 13:22:24
Score: 0.5
Natty:
Report link

There are different models of uncertain data in literature, and they are not compatible data types.

UKMeans needs discrete samples from uncertain data, it does not process continuous distributions directly. You need to use a DiscreteUncertainifier to produce such discrete samples from the uncertain data.

See the JavaDoc of the class hierarchies and filters:

https://elki-project.github.io/releases/current/doc/elki/data/uncertain/package-summary.html

https://elki-project.github.io/releases/current/doc/elki/data/uncertain/uncertainifier/package-summary.html

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Erich Schubert

79483808

Date: 2025-03-04 13:21:23
Score: 0.5
Natty:
Report link

UPD: paste into ios 15.5 simulator still does not work in Xcode 15.4

paste into ios 17.2 simulator works fine

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

79483807

Date: 2025-03-04 13:20:23
Score: 0.5
Natty:
Report link

The combination of @andy-jackson's answer, and the comment by @mb21 about data types put me on the right track. It turns out that my problem was caused by the fact that the value of page.comment_id is an integer, whereas it needs to be a string to work in the file reference.

Surprisingly (at least to me), Liquid doesn't appear to have any built-in tags to convert an integer to a string! After some searching I did find this workaround that appends two quotation marks to an integer variable, which then magically returns a string. This works, but it's a bit hacky for my taste though.

Digging into the docs on Liquid variables I did find the "capture" tag, which captures the string inside two tags, and then assigns the result to another (string) variable. I applied this to page.comment_id, and stored the result in a new variable comment_id. I then used that variable in the way suggested by @andy-jackson.

Here's what I ended up with:

{% capture comment_id %}{{ page.comment_id }}{% endcapture %}
{% assign comments = site.data.comments-gh[comment_id] %}

{% for comment in comments %}

    (processing code)

{% endfor %}

With these changes, the data file references work as expected on each page.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @andy-jackson's
  • User mentioned (0): @mb21
  • User mentioned (0): @andy-jackson
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: johan

79483793

Date: 2025-03-04 13:14:22
Score: 2
Natty:
Report link

This seems to be a problem with the session. You can eliminate this by editing the Kate configuration file in ~/.config/katerc and replacing the corresponding lines with this:

Restore Window Configuration=false

and

Startup Session=none

Source:
[1] https://www.reddit.com/r/kde/comments/slxj9k/kate_doesnt_remember_the_last_project_folder_on/
[2] ChatGPT

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Denis da Mata

79483790

Date: 2025-03-04 13:13:21
Score: 6 🚩
Natty:
Report link

By any chance are you using vector_graphics package? it might be a dependancy of many packages, like flutter_svg.

Some time ago there was an update on this package that caused us having same issue with rendering texts. (version 1.1.16) we pinned the version to vector_graphics: 1.1.15 and it worked.

enter image description here

Reasons:
  • Blacklisted phrase (1): update on this
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): having same issue
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Nill

79483777

Date: 2025-03-04 13:07:19
Score: 0.5
Natty:
Report link

You can try to use alias for your module:

resolve: {
    extensions: ['.jsx', '.js'],
    alias: {
        'react/jsx-runtime': path.resolve(__dirname, 'node_modules/react/jsx-runtime.js')
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Alex

79483764

Date: 2025-03-04 13:02:17
Score: 7 🚩
Natty: 5.5
Report link

How to achieve hiding tabs in case of expo-router ?

Reasons:
  • Blacklisted phrase (1): How to achieve
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): How to
  • Low reputation (1):
Posted by: Roohi Mathur

79483762

Date: 2025-03-04 13:01:17
Score: 3
Natty:
Report link

Don't think it is the actual issue, but spotted that in the provided configuration, the port is set first to '6379' then set to '0'.

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

79483758

Date: 2025-03-04 12:59:16
Score: 8.5 🚩
Natty: 4.5
Report link

Question, did u solve that? I am encountering the same issue...

Reasons:
  • RegEx Blacklisted phrase (3): did u solve that
  • RegEx Blacklisted phrase (1.5): solve that?
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: tombiebl

79483754

Date: 2025-03-04 12:57:15
Score: 5
Natty:
Report link

How should I be able to edit wsdl if it is generated by third party sources,

Reasons:
  • Blacklisted phrase (1): How should I
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): How
  • Low reputation (1):
Posted by: user29885133

79483753

Date: 2025-03-04 12:57:15
Score: 2.5
Natty:
Report link

To fix this error, simply delete the entire node_modules folder and the ios/Pods folder, and then replace your entire Podfile with a default one from a brand-new React Native project.

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

79483743

Date: 2025-03-04 12:51:13
Score: 2
Natty:
Report link

I think the only way is using inheritance (if it fits your needs. If not, please provide more details on how you want to use this protocol):

protocol Protocolable {
    var data: Int { get }
    
    func update()
}

class Dummy: BaseProtocolable {
    
    //any specific to Device class code
}

class Device: BaseProtocolable {
    
    //any specific to Device class code
}

class BaseProtocolable: Protocolable {
    private(set) var data: Int = 0
    
    func update() {
        updateData()
    }
    
    private func updateData() {
        data = 100
    }
}
Reasons:
  • RegEx Blacklisted phrase (2.5): please provide
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kiryl Famin

79483738

Date: 2025-03-04 12:49:13
Score: 2.5
Natty:
Report link

I've deployed to production. So far, the issue does not happen anymore. My only guess is something to do with the Google App Store test suite. I will be closing this question due to lack of information.

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

79483733

Date: 2025-03-04 12:46:12
Score: 1
Natty:
Report link

deberas, aplicar:

 <Stack
        screenOptions={{
            contentStyle: {
                backgroundColor: COLORS.background,
            },
        }}>

en cada layout que tengas en app, porque Expo Router utiliza un sistema de layouts anidados.

En Expo Router, cada Stack dentro de una carpeta actúa como un layout independiente, por lo que el Stack dentro de Layout.tsx no hereda automáticamente las opciones de screenOptions del Stack en RootLayout.tsx.

2da Opcion, en el _layout raiz, agregar un View que renderice el stack, (desconozco su rendimiento):

import { Stack } from 'expo-router'

const Layout = () => {
return (
<View style={{ flex: 1, backgroundColor: 'def_color' }}>
    <Stack>
        <Stack.Screen name='' options={{ headerShown: false }} />
    </Stack>
 </View>
)}
export default Layout
Reasons:
  • Blacklisted phrase (1): porque
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Fabricio Hupan

79483728

Date: 2025-03-04 12:44:12
Score: 2
Natty:
Report link

you can just dispatch a keyboard event, mapping key "a" to "<-"

if (e.key === "a") {
document.dispatchEvent(
  new KeyboardEvent("keydown", {
    keyCode: ARROWS.LEFT,
  })
);
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: kre

79483727

Date: 2025-03-04 12:44:12
Score: 1
Natty:
Report link
  // System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");

Should be path to chromedriver exe .. not bin folder

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

79483725

Date: 2025-03-04 12:43:11
Score: 1.5
Natty:
Report link

Thanks to everyone who provided an answer, and special thanks to @HolyBlackCat for pointing out the restriction on the standard library—I wasn't aware of it.

After some thought, I've come up with a solution that meets my needs and would like to share it with you. Please feel free to critique it if I’ve overlooked any potential issues or if it breaks any C++ standard restrictions.

The code below supports basic types like std::pair, std::tuple, and std::array, as well as my custom specializations, to the best of my understanding.

#include <iostream>
#include <algorithm>
#include <string>
#include <array>
#include <tuple>
#include <functional>

// Define a simple struct MyStruct with two different types
struct MyStruct { int i; double d; };

struct MyOtherStruct { int i; double d; std::string s; };

// Specialize std::tuple_size for MyStruct to enable tuple-like behavior
namespace std {
    // Standard allows specialization of std::tuple_size for user-defined types
    template <> struct tuple_size<MyStruct> : std::integral_constant<std::size_t, 2> { };  // MyStruct has 2 members

    template <> struct tuple_size<MyOtherStruct> : std::integral_constant<std::size_t, 3> { };  // MyOtherStruct has 3 members
}

namespace My {
    // Support for all std::tuple-like types using std::apply
    template <std::size_t N, typename StdStruct>  
    constexpr decltype(auto) Get(const StdStruct& a) { 
        return std::get<N>(a); 
    }
    template <std::size_t N, typename StdStruct>  
    constexpr decltype(auto) Get(StdStruct& a) { 
        return std::get<N>(a); 
    }
    template <std::size_t N, typename StdStruct>  
    constexpr decltype(auto) Get(StdStruct&& a) { 
        return std::get<N>(a); 
    }

    // Specialization of Get for MyStruct to access its members
    template <std::size_t N>  
    constexpr decltype(auto) Get(const MyStruct& a) { 
        if constexpr (N == 0) 
            return (a.i); 
        else if constexpr (N == 1) 
            return (a.d); 
    }

    // Specialization of Get for MyOtherStruct to access its members
    template <std::size_t N>  
    constexpr decltype(auto) Get(const MyOtherStruct& a) { 
        if constexpr (N == 0) 
            return (a.i); 
        else if constexpr (N == 1) 
            return (a.d); 
        else if constexpr (N == 2) 
            return (a.s); 
    }

    // Convert a struct to a tuple using index sequence as someone else suggested
    template <typename Tuple, std::size_t... I> 
    constexpr auto ToTupleImpl(Tuple&& t, std::index_sequence<I...>) { 
        return std::make_tuple(Get<I>(t)...); 
    }

    // Public interface to convert a struct to a tuple
    template <typename Tuple> 
    constexpr auto ToTuple(const Tuple& s) { 
        return ToTupleImpl(s, std::make_index_sequence<std::tuple_size<Tuple>::value>()); 
    }

    // Implementation of Apply to invoke a callable with tuple elements
    template <class Callable, class Struct, size_t... Indices>
    constexpr decltype(auto) Apply_impl(Callable&& Obj, Struct&& Strct, std::index_sequence<Indices...>) noexcept(
        noexcept(std::invoke(std::forward<Callable>(Obj), Get<Indices>(std::forward<Struct>(Strct))...))) {
        return std::invoke(std::forward<Callable>(Obj), Get<Indices>(std::forward<Struct>(Strct))...);
    }

    // Public interface to apply a callable to a tuple-like structure
    template <class Callable, class Struct>
    constexpr decltype(auto) Apply(Callable&& Obj, Struct&& Strct) noexcept(
        noexcept(Apply_impl(std::forward<Callable>(Obj), std::forward<Struct>(Strct), std::make_index_sequence<std::tuple_size_v<std::remove_reference_t<Struct>>>{}))) {
        return Apply_impl(std::forward<Callable>(Obj), std::forward<Struct>(Strct),
            std::make_index_sequence<std::tuple_size_v<std::remove_reference_t<Struct>>>{});
    }
}

int main() {
    // Example usage of MyStruct
    constexpr MyStruct ms{42, 3.14};
    const MyOtherStruct mos {42, 3.14, "My other struct"};

    // Apply a lambda to MyStruct converted to a tuple
    My::Apply([](auto&&... args) {((std::cout << args << ' '), ...); std::cout << "\n";}, My::ToTuple(ms));
    
    // Apply a lambda to a std::pair
    My::Apply([](auto&&... args) {((std::cout << args << ' '), ...); std::cout << "\n";}, std::pair {2, 3});
    
    // Apply a lambda to a std::array
    My::Apply([](auto&&... args) {((std::cout << args << ' '), ...); std::cout << "\n";}, std::array {4, 5});
    
    // Apply a lambda directly to MyStruct
    My::Apply([](auto&&... args) {((std::cout << args << ' '), ...); std::cout << "\n";}, ms);
    
    // Apply a lambda directly to MyOtherStruct
    My::Apply([](auto&&... args) {((std::cout << args << ' '), ...); std::cout << "\n";}, mos);

    return 0;
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @HolyBlackCat
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Catriel

79483723

Date: 2025-03-04 12:42:11
Score: 0.5
Natty:
Report link

It looks like your EmptyViewTemplate is not updating properly because CollectionView does not react to changes in IsLoading. The EmptyViewTemplate only appears when News is empty, and it does not update dynamically unless News itself changes. So update the XAML. Instead of EmptyViewTemplate, set the EmptyView dynamically:

<CollectionView ItemsSource="{Binding News}"
                EmptyView="{Binding EmptyViewMessage}">
</CollectionView>

Also modify your view model

private string _emptyViewMessage;
public string EmptyViewMessage
{
    get => _emptyViewMessage;
    set
    {
        _emptyViewMessage = value;
        OnPropertyChanged();
    }
}

private bool _isLoading;
public bool IsLoading
{
    get => _isLoading;
    set
    {
        _isLoading = value;
        OnPropertyChanged();
        UpdateEmptyViewMessage();
    }
}

private void updateemptyview()
{
    if (IsLoading)
        EmptyViewMessage = "Loading...";
    else if (Status == ConstantsFile.STATE_NOT_FOUND)
        EmptyViewMessage = "No se han encontrado coincidencias.";
    else if (Status == ConstantsFile.STATE_SERVER_ERROR)
        EmptyViewMessage = "Ups.. Parece que algo no ha ido como debería.";
    else
        EmptyViewMessage = string.Empty;
}

Hope that helps!

Reasons:
  • Whitelisted phrase (-1): Hope that helps
  • RegEx Blacklisted phrase (2): encontrado
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: CiberBoy

79483717

Date: 2025-03-04 12:36:10
Score: 4.5
Natty:
Report link

This comment was writen to test stackoverflow api. Sorry for inconvenience

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user29884903

79483698

Date: 2025-03-04 12:30:09
Score: 1
Natty:
Report link

Issue resolved by moving jwt and session callbacks inside auth.config.ts file above authorized function in callbacks object. Can someone maybe explain why providers were working but callbacks didn't inside auth.ts? Is it maybe that session callback needs to be provided to middleware? This is my middleware.ts:

import NextAuth from 'next-auth';
import { authConfig } from './auth.config';

export default NextAuth(authConfig).auth;

export const config = {
// https://nextjs.org/docs/app/building-your- 
application/routing/middleware#matcher
matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)'],
};
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Luka Bugarin

79483695

Date: 2025-03-04 12:28:08
Score: 0.5
Natty:
Report link

async client not support poller.status() and poller.done()

you have to use this

from azure.ai.documentintelligence import DocumentIntelligenceClient

not below

from azure.ai.documentintelligence.aio import DocumentIntelligenceClient
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: harufumi.abe

79483687

Date: 2025-03-04 12:24:07
Score: 1
Natty:
Report link

I have used the last program above but whilst if I make a public integer Q and run it in a long for loop in the startloading method it counts up, which is just fine, and can be stopped by the other button. But I wanted to see the count as it runs by putting a textbox with an update() inside startloading, but it says I have a "cross threading exception" if I do this. So I added another public integer CQ (this stands for "cancel Q") and the it is set to zero and also set to zero when the start button is pressed. But when the stop button is pressed CQ is set to one. An if(Q==1){Break;} is inserted inside the for loop inside the startloading method, and this works, it exits the loop when the stop button is pressed and if the loop is not finished shows the count up to the time the button was pressed, a bit like a stopwatch. But as for the remaining problem of actually displaying the count "live" I simply set a timer at a high tick rate and put this in the timer (see below) textBox1.Update; textBox1.Text=Q.toString(); But is their a more conventional way of achieving this? See code below

  using System.ComponentModel;

namespace startstop2 { public partial class Form1 : Form { public int Q = 0; public int CQ = 0;

    private BackgroundWorker bw = new BackgroundWorker();

    public Form1()
    {
        InitializeComponent();

        bw.WorkerSupportsCancellation = true;
        bw.DoWork += new DoWorkEventHandler(bw_DoWork);
        bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);

    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)//start button
    {

        CQ = 0;
        
        if (!bw.IsBusy)
        {
            bw.RunWorkerAsync();
        }
    }

    private void button2_Click(object sender, EventArgs e)//stop button
    {
        CQ = 1;
        
        if (bw.WorkerSupportsCancellation)
        {
            bw.CancelAsync();
        }
    }


    private void bw_DoWork(object sender, DoWorkEventArgs e)
    {



        BackgroundWorker worker = sender as BackgroundWorker;

        if (worker.CancellationPending)
        {
            e.Cancel = true;
            return;
        }

        StartLoading(); //Some Method which performing I want to stop at any time
    }
    private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
        if (e.Cancelled)
        {
            //"Canceled!";
        }

        else if (e.Error != null)
        {
            //"Error: " + e.Error.Message);
        }

        else
        {
            //"Done!";
        }
    }
    private void StartLoading()
    {
       
        for (int i=0;i<1000000000;i++)
        {
            if (CQ == 1) { break; }
            
            Q++;
        }
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        textBox1.Update();
        textBox1.Text = Q.ToString();
    }
}

}

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Trevor Loughlin

79483685

Date: 2025-03-04 12:23:07
Score: 2.5
Natty:
Report link

Use:

#!bin/bash
.venv/bin/python main.py
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: Bogdan

79483683

Date: 2025-03-04 12:22:07
Score: 0.5
Natty:
Report link

This happened to me and I tried everything above without luck.. hours later I tried turning off "Rocket Loader" in Cloudflare, and it worked! Hope this helps someone.

Reasons:
  • Whitelisted phrase (-1): Hope this helps
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: SteffySimons

79483682

Date: 2025-03-04 12:22:07
Score: 0.5
Natty:
Report link

Define a formatter that takes a list and prints it the way you want it. Then apply it to the dataframe:

formatter = lambda l: ', '.join('{:0.2f}'.format(i) for i in l)
df.style.format(formatter)

Should print out what you want:

    Values
0   0.12, 0.00, 0.00
1   0.00, 0.00, 0.00
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jalopezp

79483678

Date: 2025-03-04 12:21:07
Score: 2
Natty:
Report link

dat <- data.frame(

names <- unique(c(dat$source, dat$target))

dat$source <- factor(dat$source, levels = names) dat$target <- factor(dat$target, levels = names)

mat <- xtabs(count ~ source + target, data = dat) mat[lower.tri(mat)] <- t(mat)[lower.tri(mat)] mat target source A B C D A 0 4 5 6 B 4 0 3 3 C 5 3 0 5 D 6 3 5 0

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

79483674

Date: 2025-03-04 12:20:06
Score: 4
Natty: 5.5
Report link

Can be a memory issue? Got the same error and fixed only by increasing memory

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Can
  • Low reputation (0.5):
Posted by: Leo Badellino

79483668

Date: 2025-03-04 12:18:06
Score: 2
Natty:
Report link

I had to deactivate the following, then it worked again.

Settings > Profiles > Text > Ambiguous characters are double-width

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Wodsen

79483667

Date: 2025-03-04 12:17:05
Score: 1
Natty:
Report link

I will try to help you with your task. To extract the table using DOCX, I suggest following a few steps:

  1. Get all the content.
  2. Determine the number of tables and their contents.
  3. Perform the necessary actions with the table. For example: save it to a separate file or output it in a console application.

I hope this advice will help you!

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

79483653

Date: 2025-03-04 12:13:04
Score: 1
Natty:
Report link

There are multiple ways to achieve this:

My preference is to have more granular events for more control and I will probably not fire the general "AddPersonUpdatedDomainEvent" event, but as I say that may vary from application to application.

In summary I think there is strict rules how to do this, but it may depend of application needs.

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

79483651

Date: 2025-03-04 12:13:04
Score: 7.5 🚩
Natty: 4.5
Report link

did you find a bug? I can't configure ssl either, looking for solutions

Reasons:
  • RegEx Blacklisted phrase (3): did you find a
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): did you find a
  • Low reputation (1):
Posted by: Medina

79483640

Date: 2025-03-04 12:10:03
Score: 0.5
Natty:
Report link

You use a lot of push_back or emplace_back, but I don't see any calls to reserve. Threads all need to get memory from the same place, so any re-allocation would cause them to go through that bottleneck.

Your best bet for multithreading is to pre-allocate the buffers as if they would be serviced by a single thread. Once you do that, the worker threads should each change values in different portions of that buffer (by reference). Threads are for computing so try to eliminate anywhere that they need to perform memory allocation.

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

79483635

Date: 2025-03-04 12:07:02
Score: 2
Natty:
Report link

Since the data node can be anything ,can it be checked for the identifier of data and its before or after characters ,so if you put that json in and as a string you can just check for the data keyword and create a string pattern according to what node it is like data :{ or data:[{ ,this might take more computational time because inside the subfields can be those arraynode or object nodes too

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

79483626

Date: 2025-03-04 12:04:02
Score: 1.5
Natty:
Report link

Try to remove the proxyConfig and try to change the url you want to visit also if you are using an OS with a visual GUI try to inspect using your eyes the behavior and the breaking points. Because the provided information are not enough for debugging

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

79483625

Date: 2025-03-04 12:04:02
Score: 0.5
Natty:
Report link

Brackets do multiple things in JavaScript.

What you want to do is add elements to indexes in the Array object called fileData. Brackets can be used to add elements to indexes.

Because in JavaScript an Array is a descendant of an object, you can actually add properties to it as well. If

data["uniquePropertyName"]

were equal to something like 3, bracket notation would allow you to make an assignment to fileData[3].

If however, data["uniquePropertyName"] makes reference to something like a string, you will create a property on fileData.

let array = [];

console.log(typeof array);
//OUTPUT: object

let data = { my_object_key: "my object value", value: "my 2nd object value" };

array[data["value"]] = "something that I am trying to insert into array";

console.log(array);
//OUTPUT: [ 'my 2nd object value': 'something that I am trying to insert into array' ]

console.log(array['my 2nd object value']);
//OUTPUT: something that I am trying to insert into array

array[0] = "Another array insertion";
array[1] = "2nd array insertion";
array[2] = "Third array insertion";

console.log(array);
//OUTPUT:
// [
//   'Another array insertion',
//   '2nd array insertion',
//   'Third array insertion',
//   'my 2nd object value': 'something that I am trying to insert into array'
// ]

But if data["uniquePropertyName"] makes reference to an object:

let evil_deed = { do_not: { try_this: "at home" } };

array[evil_deed["do_not"]] = "Why, you ask?";

console.log(array)
//OUPUT:
// [
//   'Another array insertion',
//   '2nd array insertion',
//   'Third array insertion',
//   'my 2nd object value': 'something that I am trying to insert into array',
//   '[object Object]': 'Why, you ask?'
// ]

That's all fun and games, until you are trying to access that property:

console.log(array[evil_deed["do_not"]])
//OUPUT: Why, you ask?

In the second example

You are creating an object with a single property name, and then pushing that object into an Array. That will place the elements into indexes.

Reasons:
  • Blacklisted phrase (1): I am trying to
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jay Harrison Crawford

79483624

Date: 2025-03-04 12:04:02
Score: 1.5
Natty:
Report link

Without using @namespace in any .razor files, I got past this by modifying my MainPage.xaml code (in project with name "test_only") to include an extra namespace declaration "componentsNamespace".

It would appear that the x:Type Markup Extension syntax

<object property="{x:Type prefix:typeNameValue}" .../>

(as per this) doesn't like dot notation in the "typeNameValue". Also successfully tested with a project that has a dot-delimited longer name.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:local="clr-namespace:test_only"
         xmlns:componentsNamespace="clr-namespace:test_only.Components"
         x:Class="test_only.MainPage">

<BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html">
    <BlazorWebView.RootComponents>
        <RootComponent Selector="#app" ComponentType="{x:Type componentsNamespace:Routes}" />
    </BlazorWebView.RootComponents>
</BlazorWebView>
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • User mentioned (1): @namespace
  • Low reputation (1):
Posted by: f_r

79483623

Date: 2025-03-04 12:03:01
Score: 1
Natty:
Report link

When I was trying to save jupyter notebook as PDF Below commands works for me:

pip install nbconvert

then:

sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic

Taken reference from:

https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.

Reasons:
  • Whitelisted phrase (-1): works for me
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When I
  • Low reputation (0.5):
Posted by: amrita yadav

79483614

Date: 2025-03-04 12:00:01
Score: 1.5
Natty:
Report link

I had the same error and spent a few hours solving it. I created a demo repository with the solution steps: https://github.com/gindemit/TerraformGCPAuth

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

79483596

Date: 2025-03-04 11:54:59
Score: 5.5
Natty:
Report link

enter image description hereThere will be a missing field, just fill this field.

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: sadiq husaini

79483584

Date: 2025-03-04 11:50:58
Score: 0.5
Natty:
Report link
Based on furas answer,I discovered that not only body must be included, but also the parameters. So the create_withdrawal must be implemented like this:

def create_withdrawal(self, ccy, amount):
  clientId = self.create_client_id()
  endpoint = f'/api/v5/fiat/create-withdrawal?paymentAcctId=my-account?ccy={ccy}?amt={amount}?paymentMethod=PIX?clientId={clientId}'
  body = {
      "paymentAcctId": "my-account",
      "ccy": ccy,
      "amt": amount,
      "paymentMethod": "PIX",
      "clientId": clientId,
  }
  url = self.baseURL + endpoint
  request = 'POST'
  header = self.get_header(request, endpoint, body = json.dumps(body))
  response = requests.post(url, headers = header, data = json.dumps(body))
  return response.json()
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nilson Cesar

79483580

Date: 2025-03-04 11:49:58
Score: 3
Natty:
Report link

use

import fs from "fs/promises"; import path from "path";

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

79483573

Date: 2025-03-04 11:47:57
Score: 6 🚩
Natty:
Report link

enter image description here

enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: peachnice

79483567

Date: 2025-03-04 11:43:56
Score: 0.5
Natty:
Report link

The PathRegexp function is supported as of Traefik v3.1.0 (commit).

So if you got an unsupported function: PathRegexp error, chances are you are using Traefik v2.

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

79483560

Date: 2025-03-04 11:41:55
Score: 1.5
Natty:
Report link

Answer from spring-data github issues:

The referenced fragment points to the commons part of the documentation with limited applicability. Is-New detection for all modules but JPA works that way, assuming that the initial value of a primitive version is zero and zero indicates a state before it has been inserted into the database. Once inserted in the database, the value is one.

However, with JPA, we're building on top of Hibernate and we have to align with Hibernates mechanism that considers zero as first version number and so we cannot use primitive version columns to detect the is-new state.

The Spring Data JPA Entity-State detection uses a slightly different wording at https://docs.spring.io/spring-data/jpa/reference/jpa/entity-persistence.html#jpa.entity-persistence.saving-entities.strategies, however, it doesn't point out that primitive version properties are not considered so I'm going to update the docs.

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

79483555

Date: 2025-03-04 11:40:55
Score: 2
Natty:
Report link

I solved this problem re-installing all dependencies again –

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

79483549

Date: 2025-03-04 11:39:55
Score: 1.5
Natty:
Report link

use this method

  signal_handle  = getattr(dut, "slaves[0]", None)
   signal_data   = signal_handle.internal_data.value
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: mahmed ahmed El adawy

79483536

Date: 2025-03-04 11:35:54
Score: 3
Natty:
Report link

Many developers and programmers experience sciatica pain due to prolonged sitting and poor posture. Sitting for long hours can put pressure on the lower spine, leading to nerve compression and pain that radiates down the leg. One effective way to relieve sciatica pain is through targeted exercises and stretches that help improve posture and spinal alignment.

I found this helpful resource on chiropractic care and pain relief: https://meadechiropractic.com/

If you’re dealing with sciatica pain, consider using an ergonomic chair, standing desk, and taking frequent breaks to stretch. Has anyone else here struggled with this issue while coding for long hours? What solutions have worked for you?

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

79483526

Date: 2025-03-04 11:30:53
Score: 1
Natty:
Report link
//add this inside application tag in manifest

  <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Dhruv Sakariya

79483521

Date: 2025-03-04 11:29:52
Score: 5
Natty:
Report link

Ok solved @Superbuilder is unusefull...

Reasons:
  • Low length (2):
  • No code block (0.5):
  • User mentioned (1): @Superbuilder
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: SkyBlackHawk

79483519

Date: 2025-03-04 11:29:52
Score: 3
Natty:
Report link

Solved. It really was an old and forgotten Gitlab plugin. I disabled the plugin and the icon disappeared afterwards.

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

79483507

Date: 2025-03-04 11:23:51
Score: 1
Natty:
Report link

Simply useing direct cell reference:

SELECT [Value]
FROM [Sheet1$]
WHERE [ClientID] = T1

or

SELECT [Value]
FROM [Sheet1$]
WHERE [ClientID] = [T1]
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Qian

79483503

Date: 2025-03-04 11:21:51
Score: 1.5
Natty:
Report link

It's because that app might have splitTypes parameter. If the app has splitTypes parameter there will be more than one apks built and required and you can't just simply share the app to telegram from your phone and decompile it. It won't be full, when you share apk from your phone it extracts base.apk and sends it anywhere you want. In order to get libflutter.so you would need arm64_v8a.apk and you will need all split apks to decompile normally and make it work after recompiling.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Wodota ML

79483458

Date: 2025-03-04 11:03:47
Score: 0.5
Natty:
Report link

What solved it for me was using Dio with native IO plugin.

Example

import 'package:native_dio_adapter/native_dio_adapter.dart';
import 'package:dio/dio.dart';

Dio client = Dio();
client.httpClientAdapter = NativeAdapter(
      createCupertinoConfiguration: () => URLSessionConfiguration.ephemeralSessionConfiguration()
        ..allowsCellularAccess = true
        ..allowsConstrainedNetworkAccess = true
        ..allowsExpensiveNetworkAccess = true,
    );

var request = await client.post<Map<String, dynamic>>(Uri.parse(baseUrl + path).toString(),
 data: convert.jsonEncode(body),
 options: Options(
 headers: {"Content-Type": "application/json"},
));

It works because on Appclip, dart IO is blocked from accessing internet, don't know why, but if requests go though native platform it works fine.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): What solve
  • Low reputation (0.5):
Posted by: Tonis

79483456

Date: 2025-03-04 11:03:47
Score: 3
Natty:
Report link
this is how my code looks like ->

package org.socgen.ibi.effectCalc.jdbcConn

import com.typesafe.config.Config
import org.apache.spark.sql.types._
import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.functions._
import java.sql.{Connection, DriverManager, Statement}
import org.socgen.ibi.effectCalc.logger.EffectCalcLogger
import org.socgen.ibi.effectCalc.common.MsSqlJdbcConnectionInfo

class EffectCalcJdbcConnection(config: Config) {

  private val microsoftSqlserverJDBCSpark = "com.microsoft.sqlserver.jdbc.spark"
  val url: String = config.getString("ibi.db.jdbcURL")
  val user: String = config.getString("ibi.db.user")
  private val pwd: String = config.getString("ibi.db.password")
  private val driverClassName: String = config.getString("ibi.db.driverClass")
  private val databaseName: String = config.getString("ibi.db.stage_ec_sql")
  private val dburl = s"${url};databasename=${databaseName}"

  private val dfMsqlWriteOptions = new MsSqlJdbcConnectionInfo(dburl, user, pwd)

  private val connectionProperties = new java.util.Properties()
  connectionProperties.setProperty("Driver", s"${driverClassName}")
  connectionProperties.setProperty("AutoCommit", "true")
  connectionProperties.put("user", s"${user}")
  connectionProperties.put("password", s"${pwd}")
  Class.forName(s"${driverClassName}")
  private val conn: Connection = DriverManager.getConnection(dburl, user, pwd)
  private var stmt: Statement = null

  private def truncateTable(table: String): String = { "TRUNCATE TABLE " + table + ";" }

  private def getTableColumns( table: String, connection: Connection ): List[String] = {
    val columnStartingIndex = 1
    val statement = s"SELECT TOP 0 * FROM $table"
    val resultSetMetaData = connection.createStatement().executeQuery(statement).getMetaData
    println("Metadata" + resultSetMetaData)
    val columnToFilter = List("loaddatetime")
    (columnStartingIndex to resultSetMetaData.getColumnCount).toList.map(resultSetMetaData.getColumnName).filterNot(columnToFilter.contains(_))
  }

  def pushToResultsSQL(ResultsDf: DataFrame): Unit = {
    val resultsTable = config.getString("ibi.db.stage_ec_sql_results_table")

    try {
      stmt = conn.createStatement()
      stmt.executeUpdate(truncateTable(resultsTable))
      EffectCalcLogger.info( s" TABLE $resultsTable TRUNCATE  ****", this.getClass.getName )

      val numExecutors = ResultsDf.sparkSession.conf.get("spark.executor.instances").toInt
      val numExecutorsCores = ResultsDf.sparkSession.conf.get("spark.executor.cores").toInt
      val numPartitions = numExecutors * numExecutorsCores
      EffectCalcLogger.info( s"coalesce($numPartitions)  <---> (numExecutors = $numExecutors) * (numExecutorsCores = $numExecutorsCores)", this.getClass.getName )

      val String_format_list = List( "accounttype", "baseliiaggregategrosscarryoffbalance", "baseliiaggregategrosscarryonbalance", "baseliiaggregateprovoffbalance", "baseliiaggregateprovonbalance", "closingbatchid", "closingclosingdate", "closingifrs9eligibilityflaggrosscarrying", "closingifrs9eligibilityflagprovision", "closingifrs9provisioningstage", "contractid", "contractprimarycurrency", "effectivedate", "exposurenature", "fxsituation", "groupproduct", "indtypprod", "issuingapplicationcode", "openingbatchid", "openingclosingdate", "openingifrs9eligibilityflaggrosscarrying", "openingifrs9eligibilityflagprovision", "openingifrs9provisioningstage", "reportingentitymagnitudecode", "transfert", "closingdate", "frequency", "batchid")

      val Decimal_format_list = List( "alloctakeovereffect", "closinggrosscarryingamounteur", "closingprovisionamounteur", "exchangeeureffect", "expireddealseffect", "expireddealseffect2", "newproductioneffect", "openinggrosscarryingamounteur", "openingprovisionamounteur", "overallstageeffect", "stages1s2effect", "stages1s3effect", "stages2s1effect", "stages2s3effect", "stages3s1effect", "stages3s2effect")

      val selectWithCast = ResultsDf.columns.map(column => {
        if (String_format_list.contains(column.toLowerCase))
          col(column).cast(StringType)
        else if (Decimal_format_list.contains(column.toLowerCase))
          col(column).cast(DoubleType).cast(DecimalType(30, 2))
        else col(column)
      })

      val orderOfColumnsInSQL = getTableColumns(resultsTable, conn)

      EffectCalcLogger.info( s" Starting writing to $resultsTable table ", this.getClass.getName )

      ResultsDf.select(selectWithCast: _*).select(orderOfColumnsInSQL.map(col): _*).coalesce(numPartitions).write.mode(org.apache.spark.sql.SaveMode.Append).format("jdbc").options(dfMsqlWriteOptions.configMap ++ Map("dbTable" -> resultsTable, "batchsize" -> "10000")).save()

      EffectCalcLogger.info( s"Writing to $resultsTable table completed ", this.getClass.getName)
      conn.close()
    } catch {
      case e: Exception =>
        EffectCalcLogger.error(s"Exception has been raised while pushing to $resultsTable:" + e.printStackTrace(),this.getClass.getName)
        throw e
    }
  }

  def pushToStockSQL(StockDf: DataFrame): Unit = {
    val stockTable = config.getString("ibi.db.stage_ec_sql_stocks_table")

    try {
      stmt = conn.createStatement()
      stmt.executeUpdate(truncateTable(stockTable))

      EffectCalcLogger.info(s" TABLE $stockTable TRUNCATE  ****", this.getClass.getName)

      val numExecutors = StockDf.sparkSession.conf.get("spark.executor.instances").toInt
      val numExecutorsCores = StockDf.sparkSession.conf.get("spark.executor.cores").toInt
      val numPartitions = numExecutors * numExecutorsCores
      EffectCalcLogger.info( s"coalesce($numPartitions)  <---> (numExecutors = $numExecutors) * (numExecutorsCores = $numExecutorsCores)", this.getClass.getName)

      val Integer_format_list = List( "forbearancetype", "ifrs9eligibilityflaggrosscarrying", "ifrs9eligibilityflagprovision", "intercompanygroupid", "closingdate" )

      val String_format_list = List( "accountaggregategrosscarryoffbalance", "accountaggregategrosscarryonbalance", "accountaggregateprovoffbalance", "accountaggregateprovonbalance", "accounttype", "assetlocationcountryiso2code", "baseliiaggregategrosscarryoffbalance", "baseliiaggregategrosscarryoffbalancefinrep", "baseliiaggregategrosscarryoffbalancenote38", "baseliiaggregategrosscarryonbalance", "baseliiaggregategrosscarryonbalancefinrep", "baseliiaggregategrosscarryonbalancenote38", "baseliiaggregateprovoffbalance", "baseliiaggregateprovoffbalancefinrep", "baseliiaggregateprovoffbalancenote38", "baseliiaggregateprovonbalance", "baseliiaggregateprovonbalancefinrep", "baseliiaggregateprovonbalancenote38", "baselptfcode", "baselptfcodelabel", "businessunit", "businessunitlabel", "capitalisticgsname", "companyname", "contractid", "contractlineid", "contractprimarycurrency", "counterpartinternalratinglegalentity", "counterpartsectorfinrep", "countryinitialriskiso2code", "economicamountcurrencyprovision", "effectivedate", "essacc", "exposurenature", "forbonecontractindication", "groupproduct", "groupproductlabel", "groupthirdpartyid", "ifrs9implementationmethod", "ifrs9provisioningstage", "investmentcategorygrouping", "issuingapplicationcode", "libcountryriskgroup", "localthirdpartyid", "lreentitycountryiso2code", "lreid", "lreusualname", "monitoringstructuressbu", "monitoringstructuressbulabel", "nacecode", "natureoftherealeconomicactivitynaer", "originindication", "pole", "polelabel", "portfoliocode", "portfoliolabel", "reportingentitymagnitudecode", "situationtechnicalid", "stage", "subbusinessunit", "subbusinessunitlabel", "subpole", "subpolelabel", "subportfoliocode", "subportfoliolabel", "watchlist", "closingdate", "frequency", "batchid", "exchangerate", "ifrseligibilityflag" )

      val Decimal_format_list = List( "grosscarryingamounteur", "provisionamounteur")

      val selectWithCast = StockDf.columns.map(column => {
        if (String_format_list.contains(column.toLowerCase))
          col(column).cast(StringType)
        else if (Integer_format_list.contains(column.toLowerCase))
          col(column).cast(IntegerType)
        else if (Decimal_format_list.contains(column.toLowerCase))
          col(column).cast(DecimalType(30, 2))
        else col(column)
      })

      val StockDfWithLoadDateTime =
        StockDf.withColumn("loaddatetime", current_timestamp())

      val orderOfColumnsInSQL = getTableColumns(stockTable, conn)

      EffectCalcLogger.info( s" Starting writing to $stockTable table ", this.getClass.getName )

      StockDfWithLoadDateTime.select(selectWithCast: _*).select(orderOfColumnsInSQL.map(col): _*).coalesce(numPartitions).write.mode(org.apache.spark.sql.SaveMode.Append).format("jdbc").options(dfMsqlWriteOptions.configMap ++ Map("dbTable" -> stockTable, "batchsize" -> "10000")).save()

      EffectCalcLogger.info( s"Writing to $stockTable table completed ", this.getClass.getName )
      conn.close()
    } catch {
      case e: Exception =>
        EffectCalcLogger.error( s"Exception has been raised while pushing to $stockTable:" + e.printStackTrace(),this.getClass.getName )
        throw e
    }
  }
}

######

now what the above code is basically trying to do is read the data from two different hive external tables (results and stock) and overwrite this data to their corresponding tables in mysql. now what I want you to do is restructure the code a bit because I see pushToResultsSQL and pushToStockSQL have lot of common code (try to create a function which makes there's a common peice of code and these two functions use this new function ), make sure the functionality doesn't change but the functions are efficient enough and follow all of the latest scala coding standards. overall, you need to make this code a standard code.

please give me the complete updated code (you can only if needed skip the column names in the vals, this is to ensure that I get everything from the updated code.)
Reasons:
  • RegEx Blacklisted phrase (2.5): please give me
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Arun Rathod

79483430

Date: 2025-03-04 10:53:45
Score: 3
Natty:
Report link

J'ai bien coché la case et le problème est résolu. Je recommande de suivre la démarche de rex wang.

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

79483427

Date: 2025-03-04 10:52:44
Score: 0.5
Natty:
Report link

I was unable to recreate this same exact issue for another website; for other websites when you screenshot using driver.execute_cdp_cmd("Page.printToPDF", params) the screenshot stores the entire webpage with no need to scroll - so not sure why it didn't work for Coursera.

So to resolve, I changed the params being passed into this call and the zoom:

driver.execute_script("document.body.style.zoom='90%'")
params = {'landscape': False, 'paperWidth': 12, 'paperHeight': 25}
data = driver.execute_cdp_cmd("Page.printToPDF", params)

This seemed to do the trick.

Code: https://github.com/psymbio/math_ml/blob/main/coursera_pdf_maker.ipynb

PDF: https://github.com/psymbio/math_ml/blob/main/course_1/week_1/practical_quiz_1.pdf

It's sad this doesn't render on GitHub.

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

79483425

Date: 2025-03-04 10:51:44
Score: 4.5
Natty:
Report link

After allowing the performance counter, ncu correctly profiles my program.

If you have same problem, follow this page

  1. Open the NVIDIA Control Panel in your window 11
  2. Check "Enable Developer Settings"
  3. Under 'Developer' > 'Manage GPU Performance Counters', select 'Allow access to the GPU performance counter to all users'

Why do I have to set these settings in "Window", even if I profile CUDA programs in Ubuntu-18.04, WSL2?

Following this page, this page says:

Once a Windows NVIDIA GPU driver is installed on the system, CUDA becomes available within WSL 2. The CUDA driver installed on Windows host will be stubbed inside the WSL 2 as libcuda.so, therefore users must not install any NVIDIA GPU Linux driver within WSL 2.

I think this is the reason why I need to check the driver in Window. The point is I was not in the native linux, I was in the linux with the WSL

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): have same problem
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: kdh

79483421

Date: 2025-03-04 10:50:44
Score: 1
Natty:
Report link

I think you can also do MyMap::iterator::reference it .

auto f = [](MyMap::iterator::reference it) {std::cout << it.first + it.second << std::endl; };
std::for_each(mymap.begin(), mymap.end(), f);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Anand Rathi

79483408

Date: 2025-03-04 10:47:43
Score: 3
Natty:
Report link

The error Cannot read property 'back' of undefined probably means the camera facing attribute is not declared. First Check the states

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

79483407

Date: 2025-03-04 10:47:43
Score: 0.5
Natty:
Report link

The packagist requirements for laravel/homestead do state that this is not supported. There is some mention that this version of the package will not be updated, notably in this reddit thread.

There is, however, a fork of the package from the original creator - svpernova09/homestead - that does indeed support php 8.4. Relevant packagist specification.

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

79483394

Date: 2025-03-04 10:43:40
Score: 6 🚩
Natty:
Report link

Have you been able to resolve your issue ? I am having same problem I tried with javascript incetion but it did not work.

 ModelViewer(
              src: 'assets/model.glb', // Your model path
              id: 'myModelViewer',
              ar: true,
              cameraControls: true,
              onModelViewerCreated: (controller) {
                controller.runJavaScript("""
                  let points = [];
                  const modelViewer = document.querySelector("#myModelViewer");

                  modelViewer.addEventListener('scene-graph-ready', () => {
                    modelViewer.addEventListener("click", async (event) => {
                      const hit = await modelViewer.positionAndNormalFromPoint(event.clientX, event.clientY);
                      if (hit) {
                        points.push(hit.position);
                        if (points.length === 2) {
                          let dx = points[0].x - points[1].x;
                          let dy = points[0].y - points[1].y;
                          let dz = points[0].z - points[1].z;
                          let distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
                          // Send the calculated distance to Flutter
                          window.flutter_inappwebview.callHandler('distanceCalculated', distance);
                          points = [];  // Reset after measuring
                        }
                      }
                    });
                  });
                """);
              },
            ),

Since onModelViewerCreated is not invoking

Reasons:
  • Blacklisted phrase (1.5): Have you been able to
  • Blacklisted phrase (1): did not work
  • RegEx Blacklisted phrase (1.5): resolve your issue ?
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I am having same problem
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Przemo

79483383

Date: 2025-03-04 10:37:39
Score: 0.5
Natty:
Report link

If running composer global require laravel/installer isn't updating the installer for you, you can be explicit about the major version by, for example, running :

composer global require "laravel/installer:^5.x" -W

to force composer to bump up to the latest version.

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

79483382

Date: 2025-03-04 10:36:38
Score: 0.5
Natty:
Report link

Resolved it myself

OnInitializedAsync() was trying to call an API that wasn't async. This resulted in the JSON object I returned was empty when it mattered.

Before:

app.MapGet("/api/blob", (IBlobService blobService) => blobService.GetStrings());
app.MapGet("/api/sql", (ISqlService repo) =>
{
    var sqlDiners =  repo.GetLastestDiners();
    return sqlDiners is not null
        ? Results.Ok(sqlDiners)
        : Results.NotFound("No customers found.");
});

After:

app.MapGet("/api/blob", async (IBlobService blobService) => await blobService.GetStrings());
app.MapGet("/api/sql", async (ISqlService repo) =>
{
    var sqlDiners =  await repo.GetLastestDiners();
    return sqlDiners is not null
        ? Results.Ok(sqlDiners)
        : Results.NotFound("No customers found.");
});
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Mikkel Rohde Glerup

79483381

Date: 2025-03-04 10:36:38
Score: 2.5
Natty:
Report link

you may use variables --width33: round(33vw, 1px); width: calc((var(--width33) - 10px)/2); ...or whatever you want

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Андрей Павлов

79483374

Date: 2025-03-04 10:34:37
Score: 4
Natty:
Report link

Your questions are scattered among multiple topics, so I will be focusing on the one in the title; for other questions please research them first ("what is parallel computing vs. parallel processing?").

I'm focusing on the questions: "Is there any parallel computing involved in scipy.linalg.solve?" and "Does it necessarily need all the matrice elements at once?".

Question 1: "Is there any parallel computing involved in scipy.linalg.solve?"

SciPy's linalg.solve itself does not directly handle parallelization, but it relies on optimized libraries for linear algebra operations like LAPACK (Linear Algebra PACKage), which can make use of parallelization internally (i.e. when running on multi-core processors). Whenever the installed libraries are compiled with parallelism or not depends on your system, of course, so the answer would depend on your installation.

For example, PLASMA is optimized for multi-core processors, since it is it's key feature.

Question 2: "Does it necessarily need all the matrice elements at once?".

When you use scipy.linalg.solve, you are solving the system Ax=b for x, and this function requires the matrix A and vector b as inputs. You need the entire matrix, yes.

If you have a sparse matrix, you should use scipy.sparse.linalg.spsolve instead, but if you need to solve for x or calculate the full inverse, SciPy expects access to all the elements of the matrix A at the start.

Reasons:
  • Blacklisted phrase (1): Is there any
  • RegEx Blacklisted phrase (1.5): solve?
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Sobek Sage

79483360

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

Resilience4j v2.3.0 contains some fixes to address virtual-thread-pinning issue: https://github.com/resilience4j/resilience4j/commit/ab0b708cd29d3828fbc645a0242ef048cc20978d

I would definitely consider options to reconfigure Resilience4j internal thread pool to a pseudo-thread-pool that uses virtual threads.

Please note that as of now even latest Spring Cloud (2024.0.0) still references resilience4j-bom 2.2.0, so one needs to manually define dependency on version 2.3.0.

Reasons:
  • No code block (0.5):
Posted by: Krzysztof Tomaszewski

79483343

Date: 2025-03-04 10:23:35
Score: 5.5
Natty: 6.5
Report link

can shap values be generated using model built on pyspark or do we necessarily need to convert to pandas?

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

79483341

Date: 2025-03-04 10:22:34
Score: 1
Natty:
Report link

def do_GET(self):

with open('index.html', 'rb') as file:
    html = file.read()
self.do_HEAD()
self.wfile.write(html)

I now need to adapt the HTML-Python communication so that my HTML actually interacts with the GPIO. My main issues are:

I suck at Python (big time) My buttons are SVGs that were previously used to trigger JS functions using the onmousedown and onmouseup events (but JS doesn't work so...) I need to GPIO to be equal to 1 when the button is pressed and 0 when released Have I mentioned that I suck at Python? Jokes aside, here's a sample of my HTML:

`
  1. Heading

=======

`

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Idris idris abdullahi

79483340

Date: 2025-03-04 10:22:34
Score: 0.5
Natty:
Report link

The issue with your grid toggle button not working properly is primarily caused by theblit parameter.

The Fix:

ani = FuncAnimation(fig, animate, frames=100, interval=50, blit=False)

And make sure your toggle function forces a complete redraw:

def grid_lines(event):
    global grid_visible
    grid_visible = not grid_visible
    
    if grid_visible:
        ax.grid(True, color='white')
    else:
        ax.grid(False)
    
    # Force immediate redraw
    fig.canvas.draw()

Why This Works:

  1. The main issue is that with blit=True, Matplotlib only redraws the what are returned from the animation function for optimization. Grid lines aren't included in these, so they don't update.

  2. Setting blit=False forces a complete redraw of the figure with each animation frame.

  3. Using fig.canvas.draw() instead of fig.canvas.draw_idle() forces a redraw when the button is clicked. enter image description here

enter image description here

Reasons:
  • Blacklisted phrase (0.5): not working properly
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: EuanG

79483339

Date: 2025-03-04 10:22:34
Score: 1.5
Natty:
Report link
<TextInput 
  multiline={true} 
  keyboardType="default" 
  textContentType="none"
/>`

Check multiline and textContentType

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

79483338

Date: 2025-03-04 10:22:34
Score: 1
Natty:
Report link

Similar to prabhakaran's answer, in my case the problem was that I had created a form which had a LOT of logic in it (probably a symptom of bad design but there you go). To tame that complexity i had moved related sections of the code out into their own partial class files e.g. I had:

etc

Somehow Visual Studio generated .resx files for each of the partial class files as well as the primary file e.g. I had

etc

All of these partial class files all related to the same class 'MyForm', so all these .resx files all related to that same class, hence the message "The item was specified more than once in the "Resources" parameter."

All i had to do was delete all the extra .resx files leaving just 'MyForm.resx' and the problem was resolved.

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

79483333

Date: 2025-03-04 10:20:34
Score: 3.5
Natty:
Report link

OK got it! Console in AppService told me the truth. The NuGet package Serilog.Sinks.AzureApp was missing. Works like a charm now with appsettings. Thanks for your support!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Uwe Becker

79483293

Date: 2025-03-04 10:08:31
Score: 3.5
Natty:
Report link

Good work brotha Nevermind bad work brotha

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

79483288

Date: 2025-03-04 10:04:30
Score: 0.5
Natty:
Report link

For Angular material >18, the below code works fine.

:host ::ng-deep .mat-mdc-form-field .mdc-line-ripple {
    display: none !important;
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Arash

79483287

Date: 2025-03-04 10:03:30
Score: 1
Natty:
Report link

for anyone using appRouter (next.js 13+), use window.history.replaceState instead.

from the docs:

Next.js allows you to use the native window.history.pushState and window.history.replaceState methods to update the browser's history stack without reloading the page.

window.history.replaceState({}, '', `/products?sort=xxx`)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: gigigimay

79483286

Date: 2025-03-04 10:03:30
Score: 0.5
Natty:
Report link
/**
 * 
 * @param {Element} utubeAnchorElt -utube imposing as DOM elt;
 * @param {string} scriptUtubeId - your script id
 * @param {string} videoHeight -desired height of utube;
 * @param {string} videoWidth -desired width of utube;
 * @param {string} videoId - output <video id="videoId">
 */
async function youTubeIframeManagaer(
    utubeAnchorElt,
    scriptUtubeId,
    videoHeight,
    videoWidth,
    videoId
) {
    var utubeScriptTag = document.getElementById(`${scriptUtubeId}`);
    utubeScriptTag.src = "https://www.youtube.com/iframe_api";
    utubeScriptTag.defer = true;
    utubeAnchorElt.appendChild(utubeScriptTag);

    var player;

    function onYouTubeIframeAPIReady() {
        player = new YT.Player(`${utubeAnchorElt.id}`, {
            height: `${videoHeight}`,
            width: `${videoWidth}`,
            videoId: `${videoId}`,
            playerVars: {
                'playsinline': 1
            },
            events: {
                'onReady': onPlayerReady,
                'onStateChange': onPlayerStateChange
            }
        });
    }
    // 4. The API will call this function when the video player is ready.
    function onPlayerReady(event) {
        event.target.playVideo();
    }
    var done = false;
    function onPlayerStateChange(event) {
        if (event.data == YT.PlayerState.PLAYING && !done) {
            setTimeout(stopVideo, 6000);
            done = true;
        }
    }
    function stopVideo() {
        player.stopVideo();
    }
}
Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: KolivaDev

79483277

Date: 2025-03-04 09:58:29
Score: 0.5
Natty:
Report link

As mentioned by @cardamom, linux command lscpu returns a lot of interesting information. Note that their is an option (-J, --json) to get the output in the JSON format. This make it much easier to parse in python.

import json
import subprocess

cpu_info = json.loads(subprocess.check_output("lscpu -J", shell=True))
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Remi Cuingnet

79483272

Date: 2025-03-04 09:55:28
Score: 3.5
Natty:
Report link

The Template Literal Editor extension works for both VSCode and Open-VSX at the moment.

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

79483270

Date: 2025-03-04 09:53:28
Score: 0.5
Natty:
Report link

I have taken some times to understand that, but :

simply rename config.sample.inc.php to config.inc.php.

If needed, ensure that the configuration inside the new config.inc.php is equivalent to the configuration of the former config.inc.php in the previous version.

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

79483268

Date: 2025-03-04 09:52:27
Score: 3
Natty:
Report link

You probably already found the problem here, but the column "Latitude" should be named "x" and the column "Longitude" "y".

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

79483263

Date: 2025-03-04 09:50:27
Score: 0.5
Natty:
Report link

I looked at the correct answer and it explains the case very well.

For those who are looking for short answers, simply use the following:

// Not the best performance but it kills the reference
$new = unserialize(serialize($original));

Instead of using $new = clone $original; in the question code.

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

79483261

Date: 2025-03-04 09:50:27
Score: 0.5
Natty:
Report link

Got the same issue.

Did you try to tweak the preferences?

Preferences → Editors → SQL Editor → Code Completion → "Insert table name (or alias) with column names" = Disabled (N/A)

As per my own feedback, I didn't see any change after disabling it. It looks like the v.24.3.5 has a different behaviour.

Reasons:
  • Whitelisted phrase (-2): Did you try
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ch0

79483254

Date: 2025-03-04 09:47:26
Score: 0.5
Natty:
Report link
<script>
  // 2. This code loads the IFrame Player API code asynchronously.
  var tag = document.createElement('script');

  tag.src = "https://www.youtube.com/iframe_api";
  var firstScriptTag = document.getElementsByTagName('script')[0];
  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

  // 3. This function creates an <iframe> (and YouTube player)
  //    after the API code downloads.
  var player;
  function onYouTubeIframeAPIReady() {
    player = new YT.Player('player', {
      height: '390',
      width: '640',
      videoId: 'M7lc1UVf-VE',
      playerVars: {
        'playsinline': 1
      },
      events: {
        'onReady': onPlayerReady,
        'onStateChange': onPlayerStateChange
      }
    });
  }

  // 4. The API will call this function when the video player is ready.
  function onPlayerReady(event) {
    event.target.playVideo();
  }

  // 5. The API calls this function when the player's state changes.
  //    The function indicates that when playing a video (state=1),
  //    the player should play for six seconds and then stop.
  var done = false;
  function onPlayerStateChange(event) {
    if (event.data == YT.PlayerState.PLAYING && !done) {
      setTimeout(stopVideo, 6000);
      done = true;
    }
  }
  function stopVideo() {
    player.stopVideo();
  }
</script>
Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: KolivaDev