79302079

Date: 2024-12-23 03:44:18
Score: 2
Natty:
Report link

Related to SEC#16299

In fact, this is caused by Spring. I have reported this issue

Reasons:
  • Low length (1.5):
  • No code block (0.5):
Posted by: DingHao

79302068

Date: 2024-12-23 03:35:15
Score: 6.5 🚩
Natty: 5.5
Report link

Did you know what the reason is now?

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

79302065

Date: 2024-12-23 03:33:14
Score: 0.5
Natty:
Report link

I guess you’re talking about handling concurrency in Riverpod. Unlike Flutter BLoC, which is event-based and processes events one at a time, Riverpod doesn’t handle concurrency for you.

If you call two async notifier methods at the same time, there’s a chance they could overwrite each other’s changes, which is something to watch out for.

To deal with this in Riverpod, you’d need to handle it manually using something like a Mutex or a custom queue to ensure updates happen one at a time.

There was actually an issue raised in the Riverpod GitHub where it was clarified that concurrency needs to be managed manually,

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

79302055

Date: 2024-12-23 03:27:13
Score: 2
Natty:
Report link

please see: https://pytorch.org/tutorials/prototype/skip_param_init.html

It is now possible to skip parameter initialization during module construction, avoiding wasted computation. This is easily accomplished using the torch.nn.utils.skip_init() function.

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

79302051

Date: 2024-12-23 03:24:09
Score: 6.5 🚩
Natty:
Report link

after try every thing I can say solve this problem.please check this article https://medium.com/@abbas.ha.1378/the-biggest-problem-with-jetpack-compose-performance-1f9209f8ee85

Reasons:
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): medium.com
  • Blacklisted phrase (1): please check this
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Abbasha77

79302046

Date: 2024-12-23 03:20:08
Score: 3
Natty:
Report link

switching from amazon coretto 17 jdk to eclipse adoptium jdk fixed it for me.

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

79302042

Date: 2024-12-23 03:15:07
Score: 3
Natty:
Report link

when I followed the advice to uninstall board and install adafruit-blinka.Another problem comes up as it shows:

ModuleNotFoundError: No module named 'board'

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Starts with a question (0.5): when I
  • Low reputation (1):
Posted by: Ricky W.

79302040

Date: 2024-12-23 03:12:06
Score: 3
Natty:
Report link

I have made sveltelab for above solution Try it out : Visit

Reasons:
  • Blacklisted phrase (1): i am trying to
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: SIKANDAR BHIDE

79302030

Date: 2024-12-23 03:00:04
Score: 2
Natty:
Report link

Background

Solution

trainer = L.Trainer(
    ... # whatever arguments you've set up
    strategy="ddp_find_unused_parameters_true",
)
triner.fit(model={your_model}, dm={your_datamodule}) # note you need to modify here
Reasons:
  • RegEx Blacklisted phrase (2.5): please provide me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: djmoon13

79302025

Date: 2024-12-23 02:56:03
Score: 0.5
Natty:
Report link

We get this error when someone has entered emojis in the content to be generated from. Check your content for emojis, and if there are any, delete them. It appears ABCPDF can't handle emojis.

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

79302010

Date: 2024-12-23 02:34:59
Score: 3
Natty:
Report link

Bienvenue dans le presse-papiers Gboard. Le texte que vous copiez est enregistré ici.Appuyez sur un élément pour le coller dans le champ de texte.

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

79302008

Date: 2024-12-23 02:30:58
Score: 6.5 🚩
Natty: 6.5
Report link

after try every thing I can say solve this problem.please check this article https://medium.com/@abbas.ha.1378/the-biggest-problem-with-jetpack-compose-performance-1f9209f8ee85

Reasons:
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): medium.com
  • Blacklisted phrase (1): please check this
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Abbasha77

79302002

Date: 2024-12-23 02:25:56
Score: 2
Natty:
Report link

It seems the 'leak' was actually caused by my misunderstanding of the C free() function.

I thought freed memory was made available to the OS, and other processes, but it seems that it stays locked into the process who first allocated it (at least, on my computer, the system prefers crashing than retaking freed memory).

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

79302000

Date: 2024-12-23 02:19:56
Score: 2
Natty:
Report link

Background

Solution

trainer = L.Trainer(
    ... # whatever arguments you've set up
    strategy="ddp_find_unused_parameters_true",
)
triner.fit(model={your_model}, dm={your_datamodule}) # note you need to modify here
Reasons:
  • RegEx Blacklisted phrase (2.5): please provide me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: djmoon13

79301996

Date: 2024-12-23 02:12:54
Score: 8.5 🚩
Natty:
Report link

i ran into the same problem today, did you find the solution ?

Reasons:
  • RegEx Blacklisted phrase (3): did you find the solution
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Abhishekh Maharjan

79301995

Date: 2024-12-23 02:12:54
Score: 3
Natty:
Report link

"I published an article on Medium explaining why and how AWS Security Groups are stateful.".I hope it will be helpful.

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

79301982

Date: 2024-12-23 01:53:51
Score: 1
Natty:
Report link

You will have a very deep backStack with your current setup. Imagine what the navigation graph would look like if you have 10, 15 sections. I suggest you use nested graphs or have a parent NavHost that hosts all sections, and pass the navigation logic to the first and last screens of every section.

Regarding retaining UI state, if you want to preserve UI state "permanently" (i.e. user come back to Screen1 from, for example, Screen7 and still have the same state), you can implement a small database or DataStore for simple values and simply have your ViewModel fetch the state from it. If you only want to retain simple state across back-to-back screen then you can implement SavedStateHandle for your ViewModel

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

79301977

Date: 2024-12-23 01:47:49
Score: 3
Natty:
Report link

Bit late, but am I misunderstanding something here. Both RabbitMQ and Kafka aim to provide a pipeline for data between multiple distributed systems.

If you want asynchronous communication between nodes in a cluster (distributed applications) why not use technology specifically for that? Direct TCP, Akka, Vertx event bus, hazelcast.

If all you want is (async) communication between multiple deployed instances of your app, why are you adding extra complexity of rabbitMQ/kafka? It seems overkill for your use case. In theory you could even use async HTTP. Achieved same thing, way less complexity?

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

79301971

Date: 2024-12-23 01:41:48
Score: 1.5
Natty:
Report link

Oops, I figured it out. If you want to query and set, you need both permissions:

reg.KEY_QUERY_VALUE | reg.KEY_SET_VALUE

Thanks to @RbMm for the advice

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-2): I figured it out
  • Low length (1):
  • Has code block (-0.5):
  • User mentioned (1): @RbMm
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: justin

79301969

Date: 2024-12-23 01:40:47
Score: 2.5
Natty:
Report link

I think you are confused about the 32 part. For Conv2D(32, (3, 3)), the 32 is the number of filters, not the size of the image in pixels. The 3, 3 part is the size of each filter (or kernel) as seen in the answer above.

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

79301965

Date: 2024-12-23 01:31:45
Score: 7.5 🚩
Natty:
Report link

How can I fix this?

I use my robinhood credentials, the code sends sms to phone number, but I don't get chance to enter the code after I get this error. I don't have much knowledge with this error, I may need some guides to resolve it.

Reasons:
  • Blacklisted phrase (0.5): How can I
  • Blacklisted phrase (1): How can I fix this
  • RegEx Blacklisted phrase (1.5): How can I fix this?
  • RegEx Blacklisted phrase (1): I get this error
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): How can I fix this
  • Low reputation (1):
Posted by: Royal Gurbanov

79301960

Date: 2024-12-23 01:29:45
Score: 0.5
Natty:
Report link

ChatGPT said: ChatGPT For your SVM classifier, it's generally recommended to perform cross-validation on the training set, not on the entire dataset. This approach aligns with the principle of keeping your test data entirely unseen during both the training and the validation processes to avoid data leakage and ensure that your model generalizes well to new, unseen data.

Here’s a step-by-step explanation:

  1. Split the data into training and test sets: This separation ensures that the test set acts as new, unseen data for evaluating the final model.

  2. Perform cross-validation on the training set: Here, you apply cross-validation techniques such as K-Fold on the training data (X_train and y_train). This process helps in assessing how well your model, with a given set of hyperparameters, is expected to perform on unseen data. It allows you to tune the model without touching the test set.

  3. Final evaluation on the test set: After choosing the best model and parameters using cross-validation on the training set, use the test set to assess the performance of the model. This step confirms the ability of your model to generalize to new data.

Thus, your second approach using X_train and y_train for cross-validation is correct.

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

79301957

Date: 2024-12-23 01:26:44
Score: 0.5
Natty:
Report link

The problem turned out to be the usage of the line connection: ansible.netcommon.network_cli in the playbook. It seems that by having that line, Ansible requires you to specify the ansible_network_os variable.

I've removed the line, set hosts: to all and cleared the /etc/ansible/hosts file and was able to run the playbook remotely as follows ansible-playbook -i 192.168.1.184, setup-raspberrypi.yml --ask-pass.

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

79301950

Date: 2024-12-23 01:13:41
Score: 1.5
Natty:
Report link

the batch file in rob's answer is no longer there so i made my own.

https://github.com/mgoldste1/DeleteAllHardLinkFiles/tree/main

Drop a link to the exe into shell:sendto and it's integrated into windows explorer. i've only played with it on hard links and regular files. unclear what else it would do with other types of objects.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: A person

79301943

Date: 2024-12-23 00:59:39
Score: 2
Natty:
Report link

would something along that shown below be suitable?

$ cat ipv4settings.txt
ipv4.gateway:                           192.168.2.1
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                        0 (unspec)

$ cat fixme.awk
{printf("%s=\"%s\"\n",$1,gensub(/ {2,}/,"","g",$2))}

$ awk -F: -f fixme.awk ipv4settings.txt
ipv4.gateway="192.168.2.1"
ipv4.routes="--"
ipv4.route-metric="-1"
ipv4.route-table="0 (unspec)"
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: ticktalk

79301940

Date: 2024-12-23 00:55:39
Score: 1
Natty:
Report link

For me types.FrameType wasn't enough. I had to add | None to make Pylance happy:

def handler(signum: int, frame: types.FrameType | None):
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: calamari

79301939

Date: 2024-12-23 00:51:38
Score: 3
Natty:
Report link

in the main funtion just write - from student import Student. It is - from 'Filename' import 'Classname'

So

def main(): print("is workign") from student import Student temp = Student("50") ## I want to create the object of class Student and send an attribute

if name == 'main': main()

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

79301932

Date: 2024-12-23 00:34:34
Score: 2
Natty:
Report link

Just an idea: Put your questions on a list. The top of the list is Question #1. Reshuffle the list to randomize the questions before every round. This should give you what you want, and is easier to implement.

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

79301927

Date: 2024-12-23 00:23:33
Score: 2
Natty:
Report link

If you don't want to call barplot() twice (per @MichaelChirico's comment), you can first call a new graphics frame with the appropriate dimensions instead of plotting a "blank" barplot (as suggested by @thelatemail):

# Simulate data
set.seed(123)
data <- sample(1:100, replace=T, prob=dnorm(1:100,50,3))

# Create blank frame
plot.new()
plot.window(
  xlim = c(0,(max(data)-min(data))+1),
  ylim = c(0,max(table(data)))
)

# Draw lines behind barplot first
abline(
  h=seq(0,max(table(data)),2),
  col="grey",lty="dashed")
  
barplot(
    table(factor(data,levels=min(data):max(data))),
    col = rainbow((max(data)-min(data))*2.5),
    space = 0,
    add = T)

barplot_with_lines_behind

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @MichaelChirico's
  • User mentioned (0): @thelatemail
  • Low reputation (1):
Posted by: Mapache

79301921

Date: 2024-12-23 00:13:31
Score: 0.5
Natty:
Report link

Try clearing the Filter at the top of LogCat. It just worked for me. I am not sure how/when I selected a filter - so, the log ended up showing nothing. When I noticed the filter, I cleared it and it worked fine. Cheers!

Reasons:
  • Blacklisted phrase (1): Cheers
  • Whitelisted phrase (-1): it worked
  • Whitelisted phrase (-1): worked for me
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: user2430829

79301909

Date: 2024-12-23 00:01:28
Score: 0.5
Natty:
Report link

There might be a case where your Anypoint Studio is not connected to Anypoint Platform to establish a connection with API manager for Auto Discovery. So disable the auto-discovery in locally for testing purpose or set up Anypoint Platform credentials in Anypoint Studio to have a proper connection for API Auto Discovery.

For Disabling,

Note: Disabling is only for testing purposes.

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Manish Yadav

79301900

Date: 2024-12-22 23:54:26
Score: 3
Natty:
Report link

If you trying it on localhost and your localhost domain is like this: "http://125.0.0.1:5000/" then add the localhost domain without ":5000" so only "http://125.0.0.1"

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

79301899

Date: 2024-12-22 23:53:26
Score: 1
Natty:
Report link

It appears that meson is broken on pkg-config caching.
meson setup --wipe is required to update the build after any PKG_CONFIG_PATH change. --reconfigure or --clearcache does not help.

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

79301898

Date: 2024-12-22 23:52:25
Score: 10.5
Natty: 7.5
Report link

Do you have an example of how to download each file in the OneDrive recursively? I've attempted to enumerate each folder but I've not had success in doing it. Any help is appreciated!

Reasons:
  • Blacklisted phrase (1): appreciated
  • Blacklisted phrase (1): Any help
  • RegEx Blacklisted phrase (3): Any help is appreciated
  • RegEx Blacklisted phrase (2.5): Do you have an
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: GronTron

79301893

Date: 2024-12-22 23:47:24
Score: 1.5
Natty:
Report link

You can use get_key(key)! However, you need to first import the System Module (named ti_system).

get_key can be run without a parameter to output a string corresponding with the key pressed (pressing 1 outputs "1", pressing escape outputs "esc", etc.).

If you use a parameter in get_key, it will delay program execution until that key is pressed. For example, get_key("5") will wait until the 5 key is pressed before running the program.

For example, if you wanted to create an infinite loop that runs until the user presses escape, you would run

from ti_system import *

while (get_key() != "esc"):
  # run code here

You can also get mouse coordinates using get_mouse().

You can see the full documentation for the ti_system module here https://education.ti.com/html/webhelp/EG_TINspire/EN/Subsystems/EG_Python/Content/m_menumap/mm_tisystem.HTML

Yeah... Unfortunately TI doesn't have particularly good documentation. As an aside, I was not able to get print("key: "+get_key()) to work properly, despite get_key working fine in comparisons such as get_key() == "esc", for some reason? This might just be poor code on my part, but this does mean I cannot provide a list of the key strings to specific keys like TIBasic has. If anyone reading this managed to get this to work properly, please let me know!

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Whitelisted phrase (-1.5): You can use
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Jme

79301892

Date: 2024-12-22 23:46:23
Score: 1
Natty:
Report link

Thanks in part to the answers here, I was able to come up with a solution for adding items to a dictionary, including adding items to list values within the dictionary if they are not already in the list.

Python 3:

import collections.abc

def dict_update(d, u, fixed=False):
    for k, v in u.items():
        if isinstance(v, collections.abc.Mapping):
            if k in d.keys() or not fixed:
                d[k] = dict_update(d.get(k, {}), v, fixed=fixed)
        elif isinstance(v, list):
            if k in d.keys() or not fixed:
                # Iterate through list value and add item if not already in list
                for i in v:
                    if i not in d.get(k, []):
                        d[k] = d.get(k, []) + [i]
        else:
            if k in d.keys() or not fixed:
                d[k] = v
    return d
dictionary1 = {
    "level1": {
        "level2": {"levelA": 0, "levelB": 1},
        "level3": ["itemA", "itemB"]
    }
}

update = {
    "level1": {
        "level2": {"levelB": 10},
        "level3": ["itemC"]
    }
}

updated_dict = dict_update(dictionary1, update, fixed=False)
print(updated_dict)

>>> {'level1': {'level2': {'levelA': 0, 'levelB': 10}, 'level3': ['itemA', 'itemB', 'itemC']}}

If fixed=True, the input dictionary d will be fixed and values will only be updated if the keys are already present in the original dict, so new keys will not be added.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: WILL

79301883

Date: 2024-12-22 23:29:21
Score: 1
Natty:
Report link

<form method="POST" autocomplete="off"> to close them for entire form.

If text and password field is next to next that may not work, in that case try "new-password" instead of "off"

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

79301877

Date: 2024-12-22 23:21:19
Score: 2
Natty:
Report link

Set the date on your PC to time in the future. I used 2055. Use Edge default browser function to add the IE site. Edge will now confirm that the site was added in 2055 and will expire 30 days later in 2056. Set the PC to the correct date and Edge still shows the site added in 2055 and will expire in 2056. I am waiting to see what happens after 30 days but am hopeful that there is no clever checking in Edge to correct the 2055 expiry date that it is still showing. I did the date changes in a short time interval and with other apps closed in case the incorrect date could damage other functions on the PC.

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

79301862

Date: 2024-12-22 23:10:18
Score: 2.5
Natty:
Report link

InetAddress is not abstract, needs a case too. Thanks @Turing85

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1.5):
  • No code block (0.5):
  • User mentioned (1): @Turing85
  • Self-answer (0.5):
  • Single line (0.5):
  • High reputation (-2):
Posted by: Aleksandr Dubinsky

79301857

Date: 2024-12-22 23:01:16
Score: 2
Natty:
Report link

I was facing same issue with node v23 Had to downgrade to node v20.18.1 and now it works just fine.

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

79301849

Date: 2024-12-22 22:50:13
Score: 3.5
Natty:
Report link

MYSQL 8.0:

SET GLOBAL default_storage_engine = MyISAM;

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

79301844

Date: 2024-12-22 22:45:13
Score: 0.5
Natty:
Report link

Answers are right. Sometimes such error happens, because circular bean dependencies exist. I found solution to listen to ContextRefreshedEvent, then all beans are initialized and I am able to execute a method on this event.

@EventListener(ContextRefreshedEvent.class)
public void method(ContextRefreshedEvent event) {
    executeAMethod();
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: ReMadWeb

79301839

Date: 2024-12-22 22:40:12
Score: 2.5
Natty:
Report link

You can take a look at external free and paid services as well. For example Latency Test is one of them.

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

79301838

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

I had this issue recently, the answer for me was that findOneAndUpdate(query, rule) is asynchronous, so you have to await or then

Eg. var savedObj = await MyObj.findOneAndUpdate(query, newobj)

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

79301835

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

You are using Node.js v22.12.0, which is very new and may not yet be fully supported by all packages. I think you should the version 20

nvm install 20
nvm use 20
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Samir Guiderk

79301831

Date: 2024-12-22 22:29:10
Score: 0.5
Natty:
Report link

To extract ids where "isFolder": false, use:

Python with jsonpath-ng:

from jsonpath_ng.ext import parse

# JSON response
json_response = {
    "data": {
        "tileGrid": {
            "items": [
                {"isFolder": True, "id": "123456"},
                {"isFolder": False, "id": "6789192"}
            ]
        }
    }
}

jsonpath_expr = parse("$.data.tileGrid.items[?(@.isFolder == false)].id")
ids = [match.value for match in jsonpath_expr.find(json_response)]
print(ids)  # Output: ['6789192']

JMeter JSON Extractor: JSONPath: $.data.tileGrid.items[?(@.isFolder == false)].id Match No.: -1 (for all matches) Variable: nonFolderIds This will extract 6789192. Debug to confirm variable values. Make sure to test pass valid JSON. use any available tools to validate JSON data.

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

79301829

Date: 2024-12-22 22:24:09
Score: 2.5
Natty:
Report link

For 1GB contiguous memory on modern 64-bit systems: generally fine with several GB of RAM. Just watch out for fragmentation if you're doing frequent alloc/free cycles. Consider memory pooling if you hit issues. Test with your specific workload to be sure.

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

79301828

Date: 2024-12-22 22:24:09
Score: 3.5
Natty:
Report link

I have the same issue when my .env is placed in the root of the VScode workspace. It affected me when using it in jupyter notebook. My current workaround is to use _ = load_dotenv(override=True) when loading environment variables from the file.

It seems that vscode automatically source the .env file to create the environment variables when the file is placed at the root. I didn't know that before.

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same issue
  • Low reputation (0.5):
Posted by: Pan

79301818

Date: 2024-12-22 22:14:07
Score: 1.5
Natty:
Report link

Using my library undo.js, you can disable undo and redo actions (not just from shortcuts) using the following code:

undo.observe(document.body, {
    preventDefault:true
});

You can then capture requests from the user for undo and redo actions (using a shortcut or the browser menu) using:

myeditor.addEventListener("undo", function(e){
    // whatever...
});
myeditor.addEventListener("redo", function(e){
    // whatever...
});
Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: JDMCreator

79301814

Date: 2024-12-22 22:06:06
Score: 1.5
Natty:
Report link

I added the following to the p element, and it seems to do the job. The p element is absolute, while its parent is relative.

    text-wrap: nowrap;
    left: 50%;
    transform: translate(-50%,0);

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

79301811

Date: 2024-12-22 22:05:06
Score: 2
Natty:
Report link

I had exactly the same problem and it was a lot of work. The problem is with the visualisation mode. You have to select Game mode. Simulator mode shouldn't even accept the Tab, because mobile phones don't have tab button, I imagine that's the explanation.

enter image description here

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

79301799

Date: 2024-12-22 21:54:04
Score: 1
Natty:
Report link

As predicted, someone already downvoted this question. (They were probably not inclined to attempt an answer because of my obvious apprehension to this platform)

First, let me complain. I've been a developer now of 19 years and over the years I have asked hundreds of questions here, about 30% of the time I get my answer and the rest of the time I get snarky comments about how dumb I am for even asking it. So, to me this platform is toxic and one of the main reasons for people not liking software developers in general (probably more so towards women). Anyway, here is how I got my answer.

First, I tried it myself. I started this process three days ago with the intention described in the original question. None of the examples I had revealed the answer. I then started asking my developer friends. One of them responded exactly as I would have expected this platform to respond which was to say why am I even trying to do this and then offering other options which were not what I was looking for. Then eventually (about 20 minutes after I posted this) one of my good friends with 25 years of experience led me to the answer which was actually simple. Here is the answer (Copy it now before this entire post is flagged)

  1. Go to the instructions I posted above. In those instructions are a link to an .ova file for the amazon image: https://cdn.amazonlinux.com/os-images/2.0.20241217.0/vmware/ (again, copy it now because Amazon likes to change their instructions often)

  2. Install VMware Workstation

  3. Install VirtualBox

  4. Install any linux VM such as Ubuntu 24 on the Virtualbox instance

  5. In your host machine, create a folder called seedconfig and in that folder create files called meta-data and user-data exactly as the instructions say (note these files do not have extensions)

  6. In your Ubuntu machine, open a terminal and install genisoimage with the following command apt-get install genisoimage (don't try to download it from a webpage you'll just go into a loop downloading other garbage)

  7. I'm a bit unclear on how I did this (because I've already removed the Ubuntu machine) but I think I created a duplicate folder with the meta-data and user-data files like I mentioned above but in the ubuntu machine.

  8. from a terminal on the ubuntu machine navigate to the folder you just created and run the genisoimage command as the tutorial suggests: genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data (this will generate a seed.iso file on your ubuntu machine

  9. get that file over into your host machine somehow. I struggled with this because I couldn't just email it to myself (gmail flagged the file as a virus) and I couldn't create a shared drive right away because the instructions for doing that didn't work. I honestly don't know how i got the shared drive to work but I did and eventually copied it over to the host machine and put the file in the same location as the other two files on the host machine.

  10. Using VMWare, create a virtual machine by pointing to the .ova file you downloaded earlier, run the machine. Note, you will not be able to log into this machine because the username/password is not set up yet.

  11. While the machine is running, go to the configuration settings in VMware and find the place where you can add hardware. Add a new CD/DVD device and point that device at your seed.iso file. Make sure you check the boxes for 'Connected' and 'Connect at power on'

  12. Reboot the machine

  13. After it reboots you can now log in with your ec2-user and whatever password you put into your user-data file (the system will immediately ask for a new password)

your welcome.

Reasons:
  • RegEx Blacklisted phrase (2): downvote
  • Long answer (-1):
  • No code block (0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Dallas Caley

79301793

Date: 2024-12-22 21:50:03
Score: 2.5
Natty:
Report link

While "gpresult" showed that the script was running on the Domain Admin account, the drive was still not showing up in Windows Explorer.

The work-around I found for this was to just change the GPO from User Configuration > Policies > Windows Settings > Scripts TO User Configuration > Preferences > Windows Settings > Drive Maps. This seems like the more dedicated way to achieve this sort of task, though someone can correct me if I'm wrong. Thank you!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Alex N.

79301784

Date: 2024-12-22 21:48:02
Score: 0.5
Natty:
Report link

I made a dummy data to try out this code

import numpy as np
import pandas as pd
from xgboost import XGBClassifier
import shap
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split

# Generate a sample dataset
np.random.seed(42)

# Create random features (100 samples, 5 features)
X = pd.DataFrame(np.random.randn(100, 5), columns=['feat1', 'feat2', 'feat3', 'feat4', 'feat5'])

# Create random labels for 3 classes
y = np.random.choice(['class_0', 'class_1', 'class_2'], size=100)

# Encode the labels for multiclass classification
label_encoder = LabelEncoder()
y_enc = label_encoder.fit_transform(y)

# Train-test split (80% train, 20% test)
X_train, X_test, y_train, y_test = train_test_split(X, y_enc, test_size=0.2, random_state=42)

Your code is fine, I think there is probably something wrong with your x or y data which I cannot really check.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Albert Christopher Halim

79301782

Date: 2024-12-22 21:46:02
Score: 0.5
Natty:
Report link

You can "manually" squash migrations, by

  1. clear migration history

    python manage.py migrate --fake myapp zero
    
  2. Remove the migration files

    rm django/myapp/migrations/*.py
    
  3. Make new migration files (there will only be one, this will make the new initial migration file)

    python manage.py makemigrations
    
  4. And migrate to it

    python manage.py migrate --fake-initial
    

The reason for --fake and --fake-initial are to prevent the database from being updated during this process.

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

79301779

Date: 2024-12-22 21:42:01
Score: 2.5
Natty:
Report link

Go to settings in google chrome, privacy and security, security change it to no protection. Go back to privacy and security, go to site settings, got to pop ups and us redirects, and allow pop ups.

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

79301775

Date: 2024-12-22 21:37:00
Score: 2
Natty:
Report link

Thank you. I had the same issue. I am signed in with multiple accounts on my mobile. Using the link on incognito then logging in to my account fixed it for me 👍

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Whitelisted phrase (-1): I had the same
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Nitzan Listman

79301773

Date: 2024-12-22 21:37:00
Score: 1.5
Natty:
Report link

Well, it is a package version problem.

If we read the documentation Pomelo GitHub, we can see that ".Net9" works only with preview vs: 9.0.0-preview.2.efcore.9.0.0 package.

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

79301768

Date: 2024-12-22 21:35:00
Score: 3.5
Natty:
Report link

regarding std::mem_fun vs lambdas and which is more efficient, I found this link helpful for me; https://tech.jocodoma.com/2019/02/25/Lambdas-as-First-Class-Citizens-in-CPP/ basically they claim lambdas, as of C++11 / C++17, seem to be the better solution

Reasons:
  • Blacklisted phrase (1): this link
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: 12oclocker

79301767

Date: 2024-12-22 21:34:59
Score: 5.5
Natty: 2.5
Report link

To any one running into this issue, i made a blog post on this How to fix Invalid Date error in safari

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

79301764

Date: 2024-12-22 21:32:59
Score: 2.5
Natty:
Report link

I faced the same problem earlier, this problem appears when using Android emulator but when using real device it does not appear, in my case I used cachedNetworkImage plugin and after that I did not face this problem again

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

79301759

Date: 2024-12-22 21:29:57
Score: 4.5
Natty:
Report link

Yes I am also facing this issue

This issue is showing up when I expose my local host to the public through some tunneling.I am using Rear Application Front End and Back End Server through Node JS. Front End Server is working properly.But the cookies created on the back-end server are not being received correctly through the public tunnel.This is because the tunnel is only exposing the front end properly.This problem is occurring because the backend server is hosted on the same system.This is not a correct origin error.This is a tunneling issue. There is no way to publish cookies outside the local host, i.e., the cookie in the cookie. If it can be done, it may be possible.In my system, the cookies are repeatedly being stored on the local host. Because the cookies are not being transferred through the tunnel and the system is experiencing the cookies as local host.

res.cookie("token", token, {
  httpOnly: true,  // Prevents JavaScript access
  secure: true,    // Ensures cookies are sent over HTTPS
  sameSite: "None",// Required for cross-origin requests
  domain: ".example.com", // Replace with your domain (e.g., example.com)
});

Here I have tried using two tunnels. One for the back end and another for the front end, but it is not working properly. Here is an .example.com Used as a subdomain where it is targeted or located to a main domain stream but despite that it is not sending the token anywhere other than the local host.This means that there is no way to pass the token through the tunnel. It is stored only on the local host. This is a major issue.If anyone has an answer, please help.

Question

How to pass cookies cross-origin to a public URL through a tunnel

cross origin error in react js using cloudflear tunnel and also my server hosted in local host port 4000 and my react application host in

cloudflared tunnel --url http://localhost:4000

Remember the proxy is localhost:4000 And this is a local host back end server only. The front end server is created through a cloud fair tunnel, the back end server is being used directly.But even though everything is working properly, when receiving cookies, it is receiving a localhost token. I need the token to be generated in my Cloud Fair public domain.Additionally, using any other medium is showing a cross-origin error.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): also facing this
  • Blacklisted phrase (0.5): not working properly
  • RegEx Blacklisted phrase (3): please help
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: D. D. I. STUDIO

79301757

Date: 2024-12-22 21:27:55
Score: 4.5
Natty: 5
Report link

https://selfserver.online/basiclinuxcommands.html basic Linux command to help on use the Linux server

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

79301750

Date: 2024-12-22 21:21:54
Score: 2
Natty:
Report link

I came across this same problem and I have to update to the latest version of visual studio. It happened after a windows update automatically applied overnight.

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

79301749

Date: 2024-12-22 21:21:54
Score: 0.5
Natty:
Report link

std::sort is usually IntroSort algorithm, which starts as a QuickSort, but switches to HeapSort if things go bad to avoid O(N^2) complexity (if recursion becomes too deep). So, std::sort at least uses std::sort_heap as a subroutine.

If you expect, that your data will be bad for QuickSort algorithm, it's better to start HeapSort manually, rather than wait while IntroSort performs some inefficient array partitions and only then switches to HeapSort.

So, worst case of HeapSort is better, than worst case of IntroSort - and if you need best worst case performance, you definitely should use HeapSort instead of IntoSort (std::make_heap + std::sort_heap instead of std::sort). But on the most inputs IntroSort performs faster.

And, of course, HeapSort uses O(1) additional memory instead of O(log(N)) for IntroSort.

P.S. Array of identical items are best case for HeapSort (requires O(N) time for FixDown heap implementation) and worst case for QuickSort without 3-way partition. If you have too much identical items in your array, it might be a good idea to use HeapSort instead of IntroSort.

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

79301746

Date: 2024-12-22 21:20:54
Score: 1.5
Natty:
Report link

It seems I overlooked a quite simple explanation. Using the Files app Internal storage is hidden by default.

I've noticed it a few times using some apps but since all of my devices are legacy devices I'm not used to using SAF and having to select show Internal storage.

That's my excuse and I'm sticking to it...

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

79301742

Date: 2024-12-22 21:11:52
Score: 1.5
Natty:
Report link

I know I shouldn't write personal comments on SO but, the thing about using react is that you want your application to be fast with its reloads, Inertia is so god damn slow when it comes to GET requests.

Note for future: Use Laravel + React with an extra useEffect hook to get the data.

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

79301735

Date: 2024-12-22 21:04:51
Score: 1
Natty:
Report link

Some ideas from an Algorithms perspective:

For an always sorted list, you could make use of data structures like AVL or Red-Black Trees to maintain sorted order of FileList upon creating, deleting or renaming a file as per your choice.

To improve performance with large directories:

Use a hash table for filename lookups, inspired by the linux kernel's dcache

Map filenames (or file IDs) to FileNode pointers in the Red Black Tree for O(1) lookups.

To handle rename cases, I would:

  1. Retrieve the FileNode pointer using Hash table.
  2. Free the occupied memory by FileNode->name. Delete the node from Red-black tree and rebalance.
  3. Reallocate the necessary memory required.
  4. Copy the newName to FileNode->name. Insert the node in Red-black tree and rebalance again.

Further scope of improvement:

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

79301721

Date: 2024-12-22 20:55:49
Score: 1
Natty:
Report link

Similar issue raised here and some users suggested uninstalling and reinstalling urllib3 and six. Try that and if that doesn't work, try other suggested solutions. See https://github.com/urllib3/urllib3/issues/1518

Reasons:
  • RegEx Blacklisted phrase (1): Similar issue
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: 16171413

79301718

Date: 2024-12-22 20:53:47
Score: 4
Natty: 4.5
Report link

Thank you so much "mm8" for these simple but effective steps to creating a self contained executable. I posted an answer because I don't have points to comment but I had to acknowledge your answer.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): to comment
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Dragan Radovac

79301713

Date: 2024-12-22 20:52:47
Score: 1
Natty:
Report link

1. Check if the Issue Occurs in All Projects:

Create a new project and see if the problem persists. If it does, it’s likely a Unity or macOS compatibility issue. Try installing a clean, updated version of Unity or try updating your macOS.

Assuming it's a project specific issue...

2. Delete the Library Folder:

Close Unity, navigate to your project folder, and delete the Library folder. Reopen the project, and Unity will rebuild the folder, which often resolves most issues.

3. Remove Plugins or all Editor Scripts/Utilities:

Some plugins or custom editor utilities might be running and causing these issues. Take a backup of the project and then remove all editor plugins and scripts in editor folder to find out.

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

79301708

Date: 2024-12-22 20:51:46
Score: 2.5
Natty:
Report link

I faced the same problem earlier, this problem appears when using Android emulator but when using real device it does not appear, in my case I used CachedNetworkImage plugin and after that I did not face this problem again

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

79301706

Date: 2024-12-22 20:51:45
Score: 8 🚩
Natty: 5.5
Report link

have you found an answer to this problem?

Reasons:
  • RegEx Blacklisted phrase (2.5): have you found an answer to this problem
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: rateb.k

79301702

Date: 2024-12-22 20:47:44
Score: 0.5
Natty:
Report link

worked for me: https://github.com/morewings/storybook-addon-theme-provider

preview.ts:

 decorators: [
    withThemeProvider(Provider),
    ///...
  ],

Provider.tsx:

export const Provider = <TTheme,>({
  children,
  theme,
}: {
  children?: ReactNode
  theme?: TTheme
}) => {
  return (
    <ThemeProvider theme={theme as DefaultTheme}>
      <GlobalStyles />
      {children}
    </ThemeProvider>
  )
}
Reasons:
  • Whitelisted phrase (-1): worked for me
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Eirene Fireman

79301686

Date: 2024-12-22 20:39:41
Score: 8.5 🚩
Natty:
Report link

99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • No latin characters (3.5):
  • Filler text (0.5): 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  • Low entropy (1):
  • Low reputation (1):
Posted by: Ishmail kalokoh

79301681

Date: 2024-12-22 20:37:41
Score: 0.5
Natty:
Report link

fill_between has been extended to 3D axes as of matplotlib v3.10.0, making this easier to plot. Here's a demonstration based on @armatita's example:

import numpy as np
import matplotlib.pyplot as plt

# Generate some random data
w = 3
x, y = np.arange(100), np.random.randint(0, 100 + w, 100)
z = np.array([y[i - w:i + w].mean() for i in range(3, 100 + w)])
y = np.zeros(x.shape)

fig, ax = plt.subplots(1,1,subplot_kw={'projection':'3d'})
ax.fill_between(x, y, z, x, 0, 0, color='orange', linewidth=0, alpha=0.5)
ax.plot(x, y, z)
plt.show()

The new axlim_clip=True argument has also been added to all 3D plotting functions in this version, to ensure your data does not plot outside the axes limits.

ax.fill_between(x, y, z, x, 0, 0, color='orange', linewidth=0, alpha=0.5, axlim_clip=True)
ax.plot(x, y, z, axlim_clip=True)

fill_between example

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @armatita's
  • Low reputation (0.5):
Posted by: Scott

79301677

Date: 2024-12-22 20:33:39
Score: 1.5
Natty:
Report link

I believe the text field is losing focus because the entire table is being re-rendered when the state updates. I’ve updated the code below, adding a key to maintain focus and optimising the state update:

import TableContainer from "@mui/material/TableContainer";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
import TableRow from "@mui/material/TableRow";
import TableCell from "@mui/material/TableCell";
import TextField from "@mui/material/TextField";
import { styled } from "@mui/system";
import { useState } from "react";

export default function TableTextFieldTest() {
    const [questions, setQuestions] = useState([
        {
            index: 0,
            question: "Do you have any feedback on your manager or team that you'd like to share?",
        },
        {
            index: 1,
            question: "What suggestions do you have for improving the company culture or work environment?",
        },
        {   
            index: 2,
            question: "How was your experience working here?",
        }
    ]);

    const TableBodyCell = styled(TableCell)({
        paddingLeft: "24px",
        paddingRight: "24px",
        paddingTop: "16px",
        paddingBottom: "16px"
    });

    function handleEditTextfield(e, index) {
        setQuestions(prevQuestions => 
            prevQuestions.map(q => 
                q.index === index ? { ...q, question: e.target.value } : q
            )
        );
    };

    return (
        <TableContainer>
            <Table>
                <TableBody>
                    {questions
                        .sort((q1, q2) => q1.index - q2.index)
                        .map((q) => (
                            <TableRow key={q.index}>
                                <TableBodyCell>
                                    <TextField 
                                        value={q.question}
                                        onChange={(e) => handleEditTextfield(e, q.index)}
                                        sx={{ width: "100%" }}
                                    />
                                </TableBodyCell>
                            </TableRow>
                    ))}
                </TableBody>
            </Table>
        </TableContainer>
    );
};

Changes made are:

The above changes should maintain focus on the text field while editing. The problems with the original code were:

This should, hopefully, resolve the issue.

Reasons:
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Zeros-N-Ones

79301674

Date: 2024-12-22 20:31:39
Score: 1
Natty:
Report link

For source you have to use Mapstruct target this notation: "."

@Mapping(source = ".", target = "user") 
CustomerDTO CustomertoCustomerDTO(Customer customer);
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: artiomi

79301666

Date: 2024-12-22 20:26:38
Score: 1.5
Natty:
Report link

@byles1506 This is a tricky exercise that explores concepts like the task queue, microtask queue, and how the event loop works.

When the program runs, await funcOne will be called (and placed inside the microtask queue), and it will immediately output "A" because this is a synchronous operation. Next, the IIFE will execute. At the await funcTwo() line, funcTwo runs and completes immediately. However, the .then callback of the promise is not executed right away. Instead, it is placed in the microtask queue.

The program will then move on from the IIFE without waiting (because don't have any await to hold it) for its result to complete and proceed to the next synchronous task, which is logging "C." At this point, the execution of funcOne finishes, and the program continues after await funcOne();, logging "Done." because is the next synchronous operation.

Once all the synchronous tasks are finished, the event loop will process the microtask queue. This is when "B" will be logged.

In this link, you can have a more detail explanation about those three concepts.

Reasons:
  • Blacklisted phrase (1): this link
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @byles1506
  • Low reputation (1):
Posted by: Isaac Blanco

79301664

Date: 2024-12-22 20:24:38
Score: 0.5
Natty:
Report link

Suggest using the Postscript 'for' operator for this:

0 1 15{
    /x exch def
    0 1 23{
        /y exch def
        x 0.5 add raster mul 
        y 0.5 add raster mul
        2.5 mms 0 359 arc stroke
    }for % y loop
}for % x loop
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ggg

79301653

Date: 2024-12-22 20:13:35
Score: 0.5
Natty:
Report link

According to the official LinkedIn documentation, redirect_uri must match exactly one of the configured URIs in your LinkedIn application settings.
Local addresses (e.g., http://localhost) are not valid.

Instead of using the npm package, I'd recommend following LinkedIn's official Postman tutorial for testing the OAuth flow: https://learn.microsoft.com/en-us/linkedin/shared/authentication/postman-getting-started

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

79301638

Date: 2024-12-22 20:04:33
Score: 1
Natty:
Report link

This can now be done automatically with the release of matplotlib v3.10.0, by setting the axlim_clip=True argument when plotting in 3D.

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-15, 15, 1000)
y = np.ones_like(x)
z = np.exp(-x**2 / 2) / np.sqrt(2 * np.pi)

fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
ax.plot(x, y + 1, z, color='blue')
ax.plot(x, y, z, color='red', axlim_clip=True)

ax.set_xlim(-5, 5)
ax.set_ylim(-1, 4)
plt.show()

axlim_clip=True demonstration

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

79301633

Date: 2024-12-22 20:00:33
Score: 3.5
Natty:
Report link

You could get that using r_fullprofile in the scope but for some reason they "closed" it

https://learn.microsoft.com/en-us/linkedin/shared/references/v2/profile/full-profile

I haven't found any replacement for this let me know if you do

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

79301624

Date: 2024-12-22 19:56:31
Score: 5.5
Natty:
Report link

Thanks @MrCakaShaunCurtis & @DavidThielen. Both solutions, use 1) PersistingComponentStateSubscription or 2) use MavigationManager) worked.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @MrCakaShaunCurtis
  • User mentioned (0): @DavidThielen
  • Self-answer (0.5):
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Tom

79301623

Date: 2024-12-22 19:55:31
Score: 3.5
Natty:
Report link

https://www.facebook.com/profile.php?id=61571177122715&mibextid=ZbWKwL

Jagdish is the only one Nagham_khalid and the rest is good and you are always happy with you all

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

79301617

Date: 2024-12-22 19:52:30
Score: 2.5
Natty:
Report link

@Null Salad, as you mentioned, the switch-case statement is generally more performant than an if-else statement, especially when dealing with large if-else ladders compared to their equivalent switch representation. You can find more details here

In this particular case, if you have a small number of conditions, the performance difference between if-else and switch-case is negligible. The only factor that matters is readability, and personally, I find if-else to be the better option.

Reasons:
  • No code block (0.5):
  • User mentioned (1): @Null
  • Low reputation (1):
Posted by: Isaac Blanco

79301611

Date: 2024-12-22 19:47:29
Score: 1
Natty:
Report link

I believe dash-chat, a Dash-based component, would be a good fit for what you are looking for. Since your chatbot logic is already completed, you can use it as a callback function for the Dash Chat component to implement the chatbot UI. It provides a customizable chat interface where user inputs and bot responses are displayed similar to the image you have shared. You can check it out, and it might save you a lot of time building the UI from scratch!

Reasons:
  • Blacklisted phrase (0.5): check it out
  • Whitelisted phrase (-1.5): you can use
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Gbolahan Okerayi

79301604

Date: 2024-12-22 19:42:28
Score: 1.5
Natty:
Report link

I created .zshenv profile since after mac os 13, it is unable to read ANDROID_HOME and ANDROID_SDK_ROOT values from bash profile. So, copy all .bash_profile values in .zshenv profile. Also, add below statement to .zshenv profile. export ANDROID_SDK_ROOT=$ANDROID_HOME

After that, restart your intellij, android studio and terminal.

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

79301600

Date: 2024-12-22 19:40:27
Score: 2
Natty:
Report link

I have been using conda environment, and have not been facing any issue. You can try that though.

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

79301592

Date: 2024-12-22 19:36:26
Score: 0.5
Natty:
Report link

You can convert your dict items into pd.Series() and then you can assign with theirs keys as follows:

I had encountered a similar problem before and this post has the answer. https://stackoverflow.com/a/42382321/18533317

import pandas as pd

ScaleX_Adjustment = {
    'X-Raw': [range(0, 34), list(range(34, 61)), range(61, 124), list(range(124, 179))],
    '1-8B': [+20, +20, +20, +20, +19, +18, +17, +17, +16, +15, +14, +13, +13, +12, +11, +10, +9, +9, +8, +7, +6, +5,
             +5, +4, +3, +2, +1, +1, 0, -1, -1, -1, -2, -2, -3, -3, -3, -4, -4, -5, -5, -5, -6, -6, -7, -7, -7, -8,
             -8, -9, -9 - 9, -10, -10, -11, -11, -11, -12, -12, -13, -13, -13, -14, -14, -15, -15, -15, -16, -16,
             -17, -17, -17, -18, -18, -19, -19, -19, -20, -20, -20, -20, -20, -20, -20],
    'S-PP': [+10, +10, +10, +10, +10, +10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 1, 1, 0, -1,
             -1, -1, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -5, -5, -5, -5, -5, -6, -6, -6, -6,
             -6, -7, -7, -7, -7, -7, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -10, -10, -10, -10, -10, -11, -11, -11,
             -11, -11, -11, -11]
}

temp={}
for key in ScaleX_Adjustment.keys():
    temp[key]=pd.Series(ScaleX_Adjustment[key])

ScaleX_Adjustment_DF = pd.DataFrame()
for key in ScaleX_Adjustment.keys():
    ScaleX_Adjustment_DF[key]=temp[key]
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: steel_wire

79301591

Date: 2024-12-22 19:35:26
Score: 3
Natty:
Report link

i have been there days ago and tried mixing versions trying to figure out maybe try to make AGP compatible with gradle version see this Link
and this Compatibility Matrix for jvm and gradle and maybe edit this line

 kotlinOptions {
        jvmTarget = "1.8"
    }

to  
kotlinOptions {
            jvmTarget = "17"
        }
Reasons:
  • Blacklisted phrase (1): this Link
  • RegEx Blacklisted phrase (1): see this Link
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: mohamedesam

79301585

Date: 2024-12-22 19:30:25
Score: 0.5
Natty:
Report link

I fixed this error by changing the python interpreter path in pychram

Reasons:
  • Whitelisted phrase (-2): I fixed
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Muni Chittem

79301583

Date: 2024-12-22 19:30:25
Score: 2.5
Natty:
Report link

this project https://github.com/dgtlmoon/changedetection.io which is opensource has some python code which will do it for you, you can use their code, check out the tutorial here if it helps https://changedetection.io/tutorial/checking-web-pages-changes-according-schedule

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

79301574

Date: 2024-12-22 19:24:23
Score: 4
Natty: 4.5
Report link

I don't quite understand what console.log has to do with enumerable? When I log an object, does it log the enumeration?

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

79301570

Date: 2024-12-22 19:22:23
Score: 0.5
Natty:
Report link

Faced with this issue, I published undo.js on GitHub to solve the problem. My thoughts on this are the following:

My library works with contenteditable elements, textarea and inputs, and uses custom events. An example would be the following:

var observer = undo.observe(document.body, {
    allowUntrusted: false,
    captureAll: true,
    preventDefault:false
});
myelement.addEventListener("beforeundo", function(e){
})
myelement.addEventListener("undo", function(e){
    console.log(e.detail.shortcut) // whether the undo event was caused by a shortcut (CTRL+Z)
})
myelement.addEventListener("beforeredo", function(e){
})
myelement.addEventListener("redo", function(e){
})
Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: JDMCreator

79301557

Date: 2024-12-22 19:16:21
Score: 0.5
Natty:
Report link

instead of gcloud auth login try with gcloud auth login --enable-gdrive-access

another solution which i employed at the time was to access the sqllite db used by gcloud to store creds, fetch token and refresh token from there, pass it to the gcloud sheets api with sheet id to access it. I dont think this is required anymore, but just fyi

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

79301552

Date: 2024-12-22 19:10:20
Score: 1.5
Natty:
Report link

I faced a similar issue when I tried to run my project in NetBeans. A login to Tomcat Manager Application window appeared, prompting me for a username and password, with default values pre-filled. However, the window would not disappear, and the execution of the file failed. A red error line indicated that the port 8080 was not working. I realized that this was because I also had XAMPP installed, which was using the same port number. To resolve the issue, I uninstalled XAMPP, reopened NetBeans, and ran the application again. This time, the login window appeared, but after clicking "OK," it disappeared, and my project ran successfully. In conclusion, if you already have XAMPP installed, you can still fix this issue by ensuring there is no port conflict or directly uninstalling the XAMPP server.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Shreya Patil

79301535

Date: 2024-12-22 18:57:17
Score: 1
Natty:
Report link

This helped me to resolve the issue.

https://zaferayan.medium.com/expo-firebase-integration-95a745ae2dfe

Had to rebuild the app to ensure all was wired properly! and also try to check

if (crashlytics.isCrashlyticsCollectionEnabled) {
  console.log('Crashlytics is enabled')
} else {
  console.log('Crashlytics is disabled');
}

Hope it helps!

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Whitelisted phrase (-1): Hope it helps
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: auslander

79301533

Date: 2024-12-22 18:55:17
Score: 3.5
Natty:
Report link

I built a simple product that handles the zipping functionality for you. Check it out: streamzipper.com

Reasons:
  • Blacklisted phrase (0.5): Check it out
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Alexander Watts

79301530

Date: 2024-12-22 18:55:17
Score: 0.5
Natty:
Report link

after @Jeremy Dalmer helped me to overcome the problem with the static event handler and clarified in which class the event, delegate and eventHandler had to go, it was only a small step to follow @Flydog57's advice to use the standard event signature (object sender EventArgs e). For sake of simplicity I put the definition of the event argument class into the same file as the form. I think it is clear now, how to put even more data load on it. Finally it is possible to define the value variable as private in the user control. The result corresponds now to my current level of programming skills. It may be helpful for other newbies like me who search for basic examples for event handling using Winforms.

Full code for the form and the event argument:

using System;
using System.Windows.Forms;

namespace Events
{
    public partial class Form1 : Form
    {

        public Form1()
        {
            InitializeComponent();
            this.myUserControl.Value_Change += this.Form1_ListenToChanges;
        }

        // EventHandler
        public void Form1_ListenToChanges(MyUserControl sender, ListenToChangesEventArgs e)
        {             
            //The following will work now:
            label1.Text = e.Count.ToString();
        }
    }

    public class ListenToChangesEventArgs : EventArgs
    {
        private int _Count;
        public int Count
        {
            get { return _Count; }
        }
        public ListenToChangesEventArgs(int count)
        {
            _Count = count;
        }
    }
}

Full code for the user control:

using System;
using System.Windows.Forms;

namespace Events
{
    public partial class MyUserControl : UserControl
    {
        private int value;

        // Delegate
        public delegate void MyUserControlEventHandler(MyUserControl sender, ListenToChangesEventArgs e);

        // Event
        public event MyUserControlEventHandler Value_Change;

        public MyUserControl()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            value++;
            // Raise event
            if (Value_Change != null) Value_Change(this, new ListenToChangesEventArgs(value));
        }
    }
} 
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Jeremy
  • User mentioned (0): @Flydog57's
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: oelgoetz