79133524

Date: 2024-10-28 13:13:01
Score: 1.5
Natty:
Report link

Consider using libraries that simplify working with interfaces and types in Typescript, among other things. I found the npm package dynamo-repo to be the simplest and easiest one to work with.

This other answer has some explanation and examples: use-type-at-dynamodb-output

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

79133513

Date: 2024-10-28 13:11:00
Score: 2.5
Natty:
Report link

I was looking for the same and found out that there is an open discussion about it https://github.com/cucumber/cucumber-js/issues/2088 but it's not implemented in Cucumber.

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

79133512

Date: 2024-10-28 13:10:58
Score: 8 🚩
Natty: 5
Report link

I don't have enough reputation to comment, hence adding it as an answer.

@llermaly, from what I gather as per the reindex documentation, " Reindexing from remote clusters does not support manual or automatic slicing."

So, was this question answered? Even I have a similar requirement.

Reasons:
  • Blacklisted phrase (1): to comment
  • RegEx Blacklisted phrase (1.5): I don't have enough reputation to comment
  • RegEx Blacklisted phrase (2): Even I have
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @llermaly
  • Low reputation (1):
Posted by: Praveen B K

79133511

Date: 2024-10-28 13:10:57
Score: 0.5
Natty:
Report link

I discovered that you can't send the schema name along with it. Even though it's stated in the documentation.

instead of:

setup.Tables["dbo.Tennants"].SyncDirection = SyncDirection.DownloadOnly;

the correct one:

setup.Tables["Tennants"].SyncDirection = SyncDirection.DownloadOnly;

Subtle, but the error didn't show this, I discovered it through the author's own answer.

https://github.com/Mimetis/Dotmim.Sync/issues/1256

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

79133509

Date: 2024-10-28 13:08:57
Score: 1
Natty:
Report link

Finally, I was able to figure it out myself. The file was located in the following location in my android studio manager device explorer,

/data/data/host.exp.exponent/files/SQLite/mydb
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Prifulnath

79133504

Date: 2024-10-28 13:06:56
Score: 3
Natty:
Report link

I have same type of issue if you use any VPN or any VPN browser extension you can uninstall or pause then automatically solve this problem.

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

79133498

Date: 2024-10-28 13:04:56
Score: 1
Natty:
Report link

Same for windows Agent

UserParameter=icmppingsec[*], powershell -NoProfile -ExecutionPolicy bypass -Command "Test-Connection -ComputerName $1 -Count 4 | Measure-Object ResponseTime -Average | ForEach-Object { '{0:N5}' -f ($_.Average / 1000) -replace ',', '.'}"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Aleksey Volodin

79133493

Date: 2024-10-28 13:03:55
Score: 0.5
Natty:
Report link

I found a way to avoid some of not supported commands in standard SQL :

WITH rolling_dates AS (
  SELECT 
    DATE '2024-01-07' AS flash_date 
  UNION ALL
  SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 1 QUARTER) 
  UNION ALL
  SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 2 QUARTER) 
  UNION ALL
  SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 3 QUARTER) 
  UNION ALL
  SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 4 QUARTER) 
)
SELECT 
  * EXCEPT(rn)
FROM (
  SELECT *, 
         ROW_NUMBER() OVER (PARTITION BY S.id, flash_date ORDER BY provided_at DESC) AS rn
  FROM table S
  CROSS JOIN rolling_dates
  WHERE deleted.at IS NULL 
    AND provided_at <= TIMESTAMP(flash_date)
) 
WHERE rn = 1

With this request, I can create my view and use it now.

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

79133489

Date: 2024-10-28 13:01:55
Score: 0.5
Natty:
Report link

The solution to the error is to keep C source files in resources/scala-native and also remove the @link("HelloWorld") from HelloWorld.scala as I already point a custom path to find the .so file using nativeLinkingOptions config in my build.mill

The solution was provided by a Scala Native Lead dev in Scala forum. Link to it here

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

79133487

Date: 2024-10-28 12:59:55
Score: 0.5
Natty:
Report link

One command was missing in all the answers. First, try the git add . then git commit -m "some msg" then git push.

If that doesn't work then move on the the approach given below:

In my case, nothing was working until I used this command:

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

79133478

Date: 2024-10-28 12:57:52
Score: 7 🚩
Natty: 4
Report link

this.Controls.SetChildIndex(this.lblBrandProduct, 0); is not genrated in Windows form for all the fields when i try to add a new form with new fields.Please help me on this

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): Please help me
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Priyanka Pawar

79133469

Date: 2024-10-28 12:54:51
Score: 1
Natty:
Report link

it is: git add full path of your file with file name

suppose I want to add a file MainActivity.kt then If i do git add MainActivity.kt it will throw error sayingfatal: pathspec 'MainActivity.kt did not match any files

so to avoid that:

git add app/src/main/java/com/androminor/firstcompose/MainActivity.kt

I checked all of the above answer. To my surprise they where half baked reply giving wrong output.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: androminor

79133465

Date: 2024-10-28 12:52:51
Score: 1
Natty:
Report link

Why not just use the apply function?:

df["ROMol"] = df[args.smi_column].apply(lambda x: pybel.readstring("smi", x))

Not only is it cleaner but should also be more efficient.

If you are not constrained to using pybel, RDKit has utility functions to do exactly what you want.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Why not
Posted by: Oliver Scott

79133463

Date: 2024-10-28 12:52:51
Score: 1.5
Natty:
Report link

The browser has given h2 tags (and other tags) a font size of some rem, so that it will change size when the font size of the root element changes.

Let's say the browser sets the default root element font size for h2 to 1.5rem, for example. Now you change it to 1rem, so it of course gets smaller.

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

79133462

Date: 2024-10-28 12:51:50
Score: 3
Natty:
Report link

I had the same issue. For me updating package worked! enter image description here

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Felipe Silva Vieira

79133456

Date: 2024-10-28 12:50:50
Score: 1
Natty:
Report link

I have build a component that works with Alpine.js to fix the selected attribute issue when using select element with Livewire.

My Laravel Livewire Select Component is a custom component designed to enhance the functionality of HTML elements when used with Laravel Livewire. This component seamlessly integrates with Livewire to manage the default selected state of options, ensuring compatibility with Livewire's reactivity. It allows for programmatic default option selection and optimizes performance through an optional JavaScript loading feature.

You can fine the component an instruction on how to use it here:

https://github.com/samuelaustinudhedhe/Laravel-Livewire-Select-Component

Let me know if you need further assistance

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

79133453

Date: 2024-10-28 12:49:50
Score: 1.5
Natty:
Report link
isOdd = new BehaviorSubject(false);

private _destoyed = new Subject<void>()

ngOnInit(): void {
 this.nestedFc.valueChanges
      .pipe(
        takeUntil(this_destroyed),
        map((value: any) => value % 2 !== 0)
      )
      .subscribe((odd) => {
        this.isOdd.next(odd);
      });

Front :

<span *ngIf="(isOdd | async) as value"> {{value}}</span>`

Dont forget to next into complete _destroyed on ngDestroy.

cdr.detectChanges() isn't best way to fix this.

And with this behaviorSubject impl, you can add this one (Optional but better perf) :

changeDetection: ChangeDetectionStrategy.OnPush,
Reasons:
  • Blacklisted phrase (2): estoy
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Yoann ROCHE

79133445

Date: 2024-10-28 12:47:49
Score: 3
Natty:
Report link

It must be at least 14 characters long and include uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), and special characters (!@#$%^&*).

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

79133440

Date: 2024-10-28 12:45:49
Score: 1
Natty:
Report link

The npm documentation states that you can have multiple lines for noproxy. I was able to get it to work by using this format...

noproxy[]=login.microsoftonline.com
noproxy[]=noproxy2.com
noproxy[]=noproxy3.com
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Alberto Hernandez1

79133434

Date: 2024-10-28 12:43:48
Score: 1.5
Natty:
Report link

Generating a file with the word "Dario" repeated one million times, separated by spaces.

This will create a text file with the requested content.

file_path = "/mnt/data/dario_repeated_1_million_times.txt"

Writing "Dario" one million times into the file

with open(file_path, "w") as file: file.write("Dario " * 1_000_000)

file_path

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

79133426

Date: 2024-10-28 12:40:46
Score: 6.5 🚩
Natty: 6.5
Report link

I already tried with custom classloader, it is dynamically adding into classpath, it is resolving the class cast exception but it is not loading all the classes from the jar files as it is calling a class from another jar file. and then it is giving me NoClassDefFoundError. Please give me suggestions to dynamically load all the classes from the jarfiles in java17?

Reasons:
  • RegEx Blacklisted phrase (2.5): Please give me
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: MADHUMITA DAS

79133422

Date: 2024-10-28 12:39:45
Score: 1
Natty:
Report link

Role-based access control (RBAC) is great for managing permissions, but it has a few downsides. It can get complicated in larger organizations, with too many roles leading to confusion. Sometimes, roles aren’t flexible enough for specific tasks, and tracking changes can be difficult—like the issue you mentioned with unauthorized configuration changes. Tools like Okta, OpManager, or AWS IAM can help. They offer features like audit trails, alerts, and access reviews, so you can track who’s doing what. Have you tried using any of these tools? You can also read upon customizable RBAC. They can really simplify managing access and avoid issues like the one you faced!

Reasons:
  • Whitelisted phrase (-1): Have you tried
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: ITAdmin

79133411

Date: 2024-10-28 12:36:44
Score: 4
Natty:
Report link

"rules": { "no-nested-ternary": "off" }

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Владлен Бранецкий

79133405

Date: 2024-10-28 12:33:43
Score: 1
Natty:
Report link

You have to add the query you're trying to run and your table structure from Athena, otherwise it would be so hard to help you.

Usually Athena works with JSON based on the way you configured the crawler to read the data and store it from your S3 files, maybe you stored the data as normal string and you're trying to access one of the attributes or your parsed structure is not what you're actually expecting and for this you have to check the table structure

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

79133404

Date: 2024-10-28 12:33:43
Score: 1
Natty:
Report link

I just tried some things and found it eventually guys.

XWPFParagraph paragraph2 = document.createParagraph();
XWPFRun run2 = paragraph2.createRun();
paragraph2.setAlignment(ParagraphAlignment.BOTH);
run2.setText("...text here....");

XWPFParagraph paragraph3 = document.createParagraph();
XWPFRun run3 = paragraph3.createRun();
paragraph3.setAlignment(ParagraphAlignment.BOTH);
run3.addBreak();
run3.addBreak();
run3.setText("...text here...");

Works like a charm

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Εμμανουήλ Βαρέσης

79133402

Date: 2024-10-28 12:33:43
Score: 0.5
Natty:
Report link

You need to use the jQuery-UI method of the button widget to enable it after disabling it: https://api.jqueryui.com/button/#method-enable

btn.button( "enable" );

If you bypass jQuery-UI it will not correctly manage the button state, which is the point of jQuery-UI.

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

79133398

Date: 2024-10-28 12:33:43
Score: 1.5
Natty:
Report link

I know its old but still answering because it may help someone in future.

I was facing same issue.

The reason was email sending was not configured in my wordpress.

Issue was fixed after Installing WP Mail SMTP plugin and configuring with my custom SMTP details.

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

79133391

Date: 2024-10-28 12:32:43
Score: 2.5
Natty:
Report link

guys i got an issue in vs code (phpcs executable is not found - phpcs) ..if anyone face this problem before searching the solution make sure the your php resolver extension is off .. i got this issue for the extensions

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

79133380

Date: 2024-10-28 12:29:42
Score: 1.5
Natty:
Report link

In EHTML you can just wrap with e-form and add you hidden input fields or <e-form-dynamic-value> to bind values, it will be more readable.

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

79133379

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

Yes, this is possible with the OpenTelemetry Incubator extension, see: https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/incubator

We are using no-code instrumentation with the java agent (no sdk) and I was able to get the url.full property exported to our Azure backend.

My config yaml file for the HTTP client side metric:

- selector:
    instrument_name: http.client.request.duration
  view:
    attribute_keys:
      - url.full
      - http.route
      - http.request.method
      - http.response.status_code
      - server.address

You could do the same for the server side metric too.

For more info check out the discussion: https://github.com/open-telemetry/opentelemetry-java-instrumentation/discussions/11220

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

79133369

Date: 2024-10-28 12:26:41
Score: 3
Natty:
Report link

If you stumble accross this in 2024, you might have run into this github issue.

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

79133368

Date: 2024-10-28 12:26:41
Score: 5
Natty:
Report link

so just came across your post, we had some queries regarding sso and scim, since you are also doing sso(using openid) and scim, what is your approach, we do the following

  1. Get the users using scim(Here in azure ad attribute mapping we have mapped the oid with external id, so when we get the users , we get oid as well as other attributes ie firstname , lastname etc, this we store )
  2. when the user does sso, we make sure that we decode the token, and get the oid, this oid we check with the oid stored in the step1 and if yes we give access to the api, let me know if you are following the same approcah

Let me know if the same approach you follow, and let me know what we are following is a proper approcah, as i couldnt find any documentation or steps on how to use both together,

thanks in advance

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): what is your
  • RegEx Blacklisted phrase (3): thanks in advance
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Dom

79133367

Date: 2024-10-28 12:26:41
Score: 1.5
Natty:
Report link

In my case, I had two "deplyments" inside the "deployments" tag of two different projects in standalone.xml. I deleted one and kept the one I was interested in and it worked again.

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

79133364

Date: 2024-10-28 12:25:40
Score: 1.5
Natty:
Report link

This seems to be a known bug in SQL Server 2022, you should upgrade to the latest version.

For more details, see https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate1#1993393

where the fix was done.

Latest CU15 can be downloaded https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate15

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

79133363

Date: 2024-10-28 12:25:40
Score: 4
Natty:
Report link

German instructions found here: https://www.flutter.de/artikel/flutter-assets-bilder-sound-verwenden English instructions: not yet found.

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

79133337

Date: 2024-10-28 12:17:38
Score: 1.5
Natty:
Report link

In the xsl:stylesheet element the xmlns:wix attribute needs to be updated from v3 to v4:

xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"

xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"

The same needs to be done in the .wxs file.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Tamás Somogyi

79133331

Date: 2024-10-28 12:15:35
Score: 6 🚩
Natty:
Report link

I amended this line of code msk = [isinstance(row, float) for row in df['latitude'].tolist()] to msk = df['latitude'].isnull().tolist() which essentially identifies those rows that have NaN values in the latitude column that I wanted to update. Thank you for the advice from @Anerdw.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (3): Thank you for the advice
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Anerdw
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: CGarden

79133324

Date: 2024-10-28 12:13:35
Score: 1
Natty:
Report link

First I have to say: Sorry for the noise!

I found a copy & paste-error in the SQL statement:

u.`name`=plu.`name`=MID(plu.`name`,3,LENGTH(plu.`name`)-4) 

Should be:

u.`name`=MID(plu.`name`,3,LENGTH(plu.`name`)-4) 

The produced error was just misleading in that case.

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

79133319

Date: 2024-10-28 12:12:34
Score: 4
Natty:
Report link

You can run PyTorch using ROCm for AMD gpu accelerated learning now, via ubuntu

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

79133296

Date: 2024-10-28 12:05:32
Score: 0.5
Natty:
Report link

Welcome to StackOverflow! Now, matrices are 'by design / by construction' always two-dimensional. Internally, they are represented as a single vector with a dimension attribution of length two -- enforcing just rows and columns. So a 'three-dimensional matrix' cannot exist, and that means you cannot use NumericalMatrix.

But Array objects are supported in whichever dimension you want to use, including three. There are examples in the package i.e. this is adapted from one of the tests

Rcpp::cppFunction("IntegerVector x(){return IntegerVector(Dimension(2,3,4));}")

But what you probably really want is to look at RcppArmadillo and its cube class which has (way) more support for three-dimensional arrays right out of the box.

Reasons:
  • Blacklisted phrase (1): StackOverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ada Lovelace

79133290

Date: 2024-10-28 12:03:32
Score: 2.5
Natty:
Report link

Check this answer: How do I change tkinter default title in OS bar?

The following should do the trick. I had the same issue on Ubuntu 24.04

program=Tk(classname="My Window")  
program.mainloop()
Reasons:
  • Blacklisted phrase (1): How do I
  • Whitelisted phrase (-1): I had the same
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Kailash Kalyani

79133287

Date: 2024-10-28 12:03:31
Score: 4.5
Natty: 4.5
Report link

The information provided is insuffucient, first off, start by providing entire source code if you have it, second, the address you provided maybe randomized depending if PIE is enabled or not, so the data you provided maybe incorrect. Please provide the entire source code so that we can work on it and solve your issue.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please provide
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Incursio_02

79133285

Date: 2024-10-28 12:02:31
Score: 1
Natty:
Report link

The ceil() function only rounds up to integers. This work around can be adapted to round up to pennies. You can write a function to do that for you.

from math import ceil
payment = 3.1234
payment = 100 * payment
payment = ceil(payment)
payment = payment / 100
print(payment)
3.13
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: DogwoodRavine

79133280

Date: 2024-10-28 12:01:30
Score: 3
Natty:
Report link

In my case I forgot to declare the property without getters and setters.

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

79133273

Date: 2024-10-28 12:00:30
Score: 0.5
Natty:
Report link

What you can do to avoid refresh token being sent to every request is to ensure it is only sent to specific path, for example:

res.cookie('refreshToken', refreshToken, {
  httpOnly: true,
  secure: true,
  sameSite: 'Strict',
  path: '/refresh-token' // this cookie will only be sent with requests /refresh-token
});

res.cookie('accessToken', accessToken, {
  httpOnly: true,
  secure: true,
  sameSite: 'Strict'
});
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): What you can
  • Low reputation (0.5):
Posted by: Mathe

79133271

Date: 2024-10-28 12:00:30
Score: 1
Natty:
Report link

Remove the cast to array

relation as same

public function skills()
{
  return $this->hasMany(Skill::class, 'id', 'skills');
}

used the accessor like this

public function getSkillsAttribute($value)
{
   $skillIds = json_decode($value, true); 
   return Skill::whereIn('id', $skillIds)->get();
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Avinash Bansode

79133265

Date: 2024-10-28 11:59:29
Score: 4.5
Natty:
Report link

from .net 8, it's now possible. enter image description here

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

79133260

Date: 2024-10-28 11:58:29
Score: 0.5
Natty:
Report link

In my case, setting the metadata type to attribute solved the issue.

   vich_uploader:
        metadata:
            type: attribute
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Marcos Labad

79133254

Date: 2024-10-28 11:55:28
Score: 2.5
Natty:
Report link

Granting individuals the power to determine which functions are employed and at what time poses a security threat that necessitates careful attention, in addition to the security risks inherent in viewing the function's results.

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

79133242

Date: 2024-10-28 11:52:28
Score: 5.5
Natty: 4
Report link

I am trying to use the two Anova with replication and this error message was displayed. Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in 'y' In addition: Warning message: In storage.mode(v) <- "double" : NAs introduced by coercion Please I need help to interpret this message

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): I am trying to
  • Blacklisted phrase (2.5): I need help
  • No code block (0.5):
  • Low reputation (1):
Posted by: Uzoma Aligwekwe

79133235

Date: 2024-10-28 11:51:27
Score: 1
Natty:
Report link

Thank you everyone for your comments. Based on those comments, I added the following line to my code:

const markedSpaceNumbers = markedSpaces.map(Number);

My method now reads:

const checkIfMarksAreCorrect = () => {
    const spaces = document.querySelectorAll(".marker");
    const markedSpaces = Array.from(spaces)
        .filter((space) => space.classList.contains('marked'))
        .map((markedSpace) => markedSpace.textContent.trim());
    console.log('The marked spaces are: ' + markedSpaces);
    console.log(`checkIfMarksAreCorrect ballsDrawn: ${ballsDrawn}`);
    const markedSpaceNumbers = markedSpaces.map(Number);
    const legitSpaces = markedSpaceNumbers
        .filter((markedNumber) => ballsDrawn.includes(markedNumber));
    console.log('legitSpaces: ' + legitSpaces);
};

Everything is working now! Thanks again!

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

79133229

Date: 2024-10-28 11:49:27
Score: 0.5
Natty:
Report link

My understanding of git checkout was that if I specified the path I wanted my repo to end up at, it checks it out directly to there.

However, after some fiddling around, I have no discovered that the solution to this problem.

It is that even though i have specified the 'path: cibuild', inline with the error, i actually had to create the '/home/vsts/work/1/s/poc-plan-in-pr' directory myself manually.

- pwsh: |
          New-Item -Path "$(Pipeline.Workspace)/s/$(Build.Repository.Name)" -ItemType "directory" -Force
        displayName: "pr step: prepare checkout"
      - checkout: self
        displayName: "pr step: checkout repository"
        path: "cibuild"
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Conal Sparrow

79133199

Date: 2024-10-28 11:41:25
Score: 0.5
Natty:
Report link

Thank you @j-loscos, works like a charm. I slightly adjusted your solution to include some new-lines (and removed the unnecessary restore at the end).

  <Target Name="DisableWarnings" BeforeTargets="CoreCompile">
    <ItemGroup>
      <AutoGeneratedFiles Include="**/*.Designer.cs" />
    </ItemGroup>
    <WriteLinesToFile File="%(AutoGeneratedFiles.FullPath)"
        Condition="!$([System.IO.File]::ReadAllText(%(AutoGeneratedFiles.FullPath)).StartsWith(&quot;#pragma warning&quot;))"
        Lines="$([System.String]::Concat(&quot;#pragma warning disable 1591&quot;,$([System.Environment]::NewLine),$([System.Environment]::NewLine),$([System.IO.File]::ReadAllText(%(AutoGeneratedFiles.FullPath)))))"
        Overwrite="true"
        Encoding="Unicode" />
  </Target>
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @j-loscos
  • Looks like a comment (1):
  • High reputation (-1):
Posted by: Christoph

79133198

Date: 2024-10-28 11:41:25
Score: 3.5
Natty:
Report link

Great thanks a lot for this Solution!!! It has resolved my routine import problem in Talend

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Marc

79133195

Date: 2024-10-28 11:40:25
Score: 1
Natty:
Report link

[apiController] [Route("api/[controller]")] remove the action object from there and add with the HttpGet method like [HttpGet("index")] and for every HTTP request use a unique name

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

79133181

Date: 2024-10-28 11:35:24
Score: 1
Natty:
Report link

You can use django web-push package. If you’re integrating django-webpush with Django REST Framework (DRF),you’ll need to implement a custom endpoint to save push subscription information, this package by default accepting session authentication so you will need to implement JWT.

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

79133179

Date: 2024-10-28 11:35:24
Score: 3.5
Natty:
Report link

Just remove the dependencies and undo the dependencies using ctrl+z

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

79133177

Date: 2024-10-28 11:34:24
Score: 2.5
Natty:
Report link

You need use the Native format builder or other tools to define a Custom nxsd. Make use of Choice,ChoiceCondition & ChoiceValue construct or StartsWith Constructs of nxsd to handle the data conditionally.

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

79133159

Date: 2024-10-28 11:29:22
Score: 3
Natty:
Report link

That's a bug, if you can make a reproduction of the problem (rebuilding the database from a script) then please file an issue on github (https://github.com/duckdb/duckdb/issues) so it can be fixed

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

79133157

Date: 2024-10-28 11:28:22
Score: 0.5
Natty:
Report link
 .form-control:focus {
      border: none !important;
      outline: none !important;
      box-shadow: none !important;// dont forget this one as it is the one which shows that blue shadow when typing
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jasper

79133146

Date: 2024-10-28 11:26:21
Score: 2.5
Natty:
Report link

In my case the file containing [OneTimeSetUp] should be in root of your test project folder.

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

79133143

Date: 2024-10-28 11:25:21
Score: 2
Natty:
Report link

SingleTask did not work for me. However, this worked:

android:launchMode="singleInstance"
Reasons:
  • Blacklisted phrase (1): did not work
  • Low length (1.5):
  • Has code block (-0.5):
Posted by: Олександр Бабіч

79133142

Date: 2024-10-28 11:25:21
Score: 3
Natty:
Report link

To query glue data catalog table from an AWS Glue job, you need the following requirements in your configuration.

Check this option :

AWS glue metatdata

and add the following param to the glue job :

--enable-glue-datacatalog true

Please let me know if these requirements address your problem

Reasons:
  • RegEx Blacklisted phrase (2.5): Please let me know
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ahmed

79133138

Date: 2024-10-28 11:24:21
Score: 0.5
Natty:
Report link

I have put this into AndroidManifest.xml

<activity
    ...
    android:launchMode="singleInstance"
    ...
</activity>
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Олександр Бабіч

79133116

Date: 2024-10-28 11:15:18
Score: 0.5
Natty:
Report link

I found solutions to both of my problems, and I'd like to share them in case others face similar issues.

Updated Code

Here's the updated code that implements these solutions:

import plotly.graph_objects as go
from plotly.subplots import make_subplots
import numpy as np

# Example activation levels
times = np.arange(0, 10, 0.5)
nodes = ['A', 'B', 'C']
activation_data = {
    'A': np.sin(times),
    'B': np.cos(times),
    'C': np.sin(times + np.pi / 4)
}

# Define fixed colors for each node
node_colors = {
    'A': 'red',
    'B': 'blue',
    'C': 'green'
}

# Node positions
node_positions = {
    'A': (1, 1),
    'B': (2, 2),
    'C': (3, 1.5)
}
x_positions = [node_positions[node][0] for node in nodes]
y_positions = [node_positions[node][1] for node in nodes]

# Create subplot layout
fig = make_subplots(
    rows=2, cols=1,
    shared_xaxes=False,
    row_heights=[0.5, 0.5],
    vertical_spacing=0.15
)

# Add line plot traces for each node
for node in nodes:
    fig.add_trace(
        go.Scatter(
            x=[],  # Empty initial data
            y=[],
            mode='lines+markers',
            name=f'Node {node} Activation',
            line=dict(color=node_colors[node]),
        ),
        row=1, col=1
    )

# Add network graph trace
initial_colors = [activation_data[node][0] for node in nodes]
fig.add_trace(
    go.Scatter(
        x=x_positions,
        y=y_positions,
        mode='markers',
        marker=dict(
            size=20,
            color=initial_colors,
            colorscale='Viridis',
            showscale=False
        ),
        name="Network Graph",
    ),
    row=2, col=1
)

# Fix axes ranges for network graph
fig.update_xaxes(
    range=[0, 4],
    fixedrange=True,
    row=2, col=1
)
fig.update_yaxes(
    range=[0, 3],
    fixedrange=True,
    row=2, col=1
)

# Create frames for animation
frames = []
for t, time in enumerate(times):
    frame_data = []
    # Update line plot traces
    for i, node in enumerate(nodes):
        x_data = times[:t+1]
        y_data = activation_data[node][:t+1]
        frame_data.append(go.Scatter(
            x=x_data,
            y=y_data,
            mode='lines+markers',
            line=dict(color=node_colors[node])
        ))
    # Update network graph colors
    node_activation_colors = [activation_data[node][t] for node in nodes]
    frame_data.append(go.Scatter(
        x=x_positions,
        y=y_positions,
        mode='markers',
        marker=dict(
            size=20,
            color=node_activation_colors,
            colorscale='Viridis',
            showscale=False
        )
    ))
    frames.append(go.Frame(data=frame_data, name=str(t)))

# Define slider steps
sliders = [dict(
    steps=[
        dict(
            method='animate',
            args=(
                [str(k)],
                dict(
                    mode='immediate',
                    frame=dict(duration=0, redraw=True),
                    transition=dict(duration=0)
                )
            ),
            label=f"t={times[k]:.1f}"
        ) for k in range(len(times))
    ],
    transition=dict(duration=0),
    x=0, y=0,
    currentvalue=dict(
        font=dict(size=12),
        prefix='Time: ',
        visible=True,
        xanchor='center'
    ),
    len=1.0
)]

# Update layout with frames and slider
fig.update(frames=frames)
fig.update_layout(
    sliders=sliders,
    height=600,
    title="Synchronized Network Graph and Line Plot with Time Slider",
)

# Fix axes ranges for line plot
fig.update_xaxes(
    range=[times[0], times[-1]],
    row=1, col=1
)

fig.show()
Reasons:
  • Whitelisted phrase (-2): Solution:
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): face similar issue
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: CapsLock

79133111

Date: 2024-10-28 11:13:17
Score: 0.5
Natty:
Report link

According to https://cloud.google.com/text-to-speech/docs/voice-types:

Journey Voices doesn't support SSML input, speaking rate and pitch audio parameters, and the A-Law audio encoding.

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

79133108

Date: 2024-10-28 11:12:17
Score: 4
Natty:
Report link

I had same problem, but I created jax-ws-catalog.xml in my project and solved error. https://stackoverflow.com/a/34547520

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

79133106

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

In Firefox and Chrome, an anchor element <a> is rendered with display of inline.

Except, when the anchor tag is a child of another element that has display of flexbox, then the anchor tag is rendered with display of block by default.

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

79133101

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

2024:

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

79133091

Date: 2024-10-28 11:06:15
Score: 1.5
Natty:
Report link

Had a similar case and solved it with ADLFS (https://github.com/fsspec/adlfs)

It allows filesystem-like operations to azure blob storage.

Also the error "#1 Json Decoder Error Expecting Value: line 1 column 1 (char 0)" Can be due to UTF-8 BOM encoding bytes at the start of the JSON (in my case this was the issue, had to enforce encoding - utf-8-sig.

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

79133087

Date: 2024-10-28 11:04:14
Score: 0.5
Natty:
Report link

I found that the error occurred in the _layout.tsx section when creating an app in React Native. After wrapping the _layout.tsx part like this, the error was resolved. Thank you! When developing apps or websites, it’s often difficult to spot errors clearly, just like creating algorithms. I think I struggled with this for about three weeks.

// app/(tabs)/_layout.tsx
import React from 'react';
import { useColorScheme } from 'react-native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Colors } from '@/constants/Colors';
import { TabBarIcon } from 'C:\\app\\my-app\\components\\navigation\\TabBarIcon';
import NatureRecordForm from './NatureRecordForm';
import BiologyRecordForm from './BiologyRecordForm';
import RecordStorage from './RecordStorage';
import NatureDetails from './NatureDetails';
import BiologyDetails from './BiologyDetails';
import { NatureRecordProvider } from '@/RecordLogic/RecordContext';

export default function Layout() {
  const colorScheme = useColorScheme();

  const Tabs = createBottomTabNavigator();

  return (
    <NatureRecordProvider>
      <Tabs.Navigator
        screenOptions={{
          tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
          headerShown: false,
        }}>
        <Tabs.Screen
          name="NatureRecordForm"
          component={NatureRecordForm}
          options={{
            title: 'Nature Record Form',
            tabBarIcon: ({ color, focused }) => (
              <TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
            ),
          }}
        />
        <Tabs.Screen
          name="BiologyRecordForm"
          component={BiologyRecordForm}
          options={{
            title: 'Biology Record Form',
            tabBarIcon: ({ color, focused }) => (
              <TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
            ),
          }}
        />
        <Tabs.Screen
          name="RecordStorage"
          component={RecordStorage}
          options={{
            title: 'Record Storage',
            tabBarIcon: ({ color, focused }) => (
              <TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
            ),
          }}
        />
        <Tabs.Screen
          name="NatureDetails"
          component={NatureDetails}
          options={{
            title: 'Nature Details',
            tabBarIcon: ({ color, focused }) => (
              <TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
            ),
          }}
        />
        <Tabs.Screen
          name="BiologyDetails"
          component={BiologyDetails}
          options={{
            title: 'Biology Details',
            tabBarIcon: ({ color, focused }) => (
              <TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
            ),
          }}
        />
      </Tabs.Navigator>
    </NatureRecordProvider>
  );
}
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: 000 000

79133083

Date: 2024-10-28 11:04:14
Score: 4.5
Natty:
Report link

could you please let me know what I am doing wrong in the following task?

What is wrong with my code? I can't find the issue and I tried everything I possible knew.

import pandas as pd

clean_data = pd.read_csv('production_data.csv')

clean_data['batch_id'] = clean_data['batch_id'].dropna() # Ensure no missing values

clean_data['production_date'] = pd.to_datetime(clean_data['production_date'], errors='coerce').dt.date clean_data['production_date'] = clean_data['production_date'].fillna(pd.to_datetime("2023-01-01").date())

clean_data['raw_material_supplier'] = clean_data['raw_material_supplier'].replace({1: 'national_supplier', 2: 'international_supplier'}).fillna('national_supplier') clean_data['raw_material_supplier'] = clean_data['raw_material_supplier'].str.lower().str.strip()

clean_data['pigment_type'] = clean_data['pigment_type'].fillna('other') clean_data.loc[~clean_data['pigment_type'].isin(['type_a', 'type_b', 'type_c']), 'pigment_type'] = 'other' clean_data['pigment_type'] = clean_data['pigment_type'].str.lower().str.strip()

clean_data['pigment_quantity'] = clean_data['pigment_quantity'].fillna(clean_data['pigment_quantity'].median()).clip(lower=1, upper=100).astype(float)

clean_data['mixing_time'] = clean_data['mixing_time'].fillna(clean_data['mixing_time'].mean()).astype(float)

clean_data['mixing_speed'] = clean_data['mixing_speed'].fillna('Not Specified') clean_data.loc[~clean_data['mixing_speed'].isin(['Low', 'Medium', 'High']), 'mixing_speed'] = 'Not Specified' clean_data['mixing_speed'] = clean_data['mixing_speed'].str.capitalize().str.strip()

clean_data['product_quality_score'] = clean_data['product_quality_score'].fillna(clean_data['product_quality_score'].mean()).clip(lower=1, upper=10).astype(float)

print(clean_data.info()) print(clean_data.isna().sum())enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • RegEx Blacklisted phrase (2.5): could you please let me know what
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ama Tutti

79133079

Date: 2024-10-28 11:03:14
Score: 0.5
Natty:
Report link

For reference: A purely stack-based aggregation yields 114 baggs*/sec single threaded and 360 baggs/sec multi-threaded (code below).

Let's assume this is the max. performance we can gain from the CPU. Then we are still factor 10+ away from the 8 baggs/sec we get on a heap/main memory bound aggregation.

Isn't that a prove that only the main memory interaction is slowing things down? Meaning, the 65GB throughput limit on a 100GB M2 chip is more or less the factual limit that can be achieved?

#pragma omp simd reduction(+:sum) simdlen(8)
for (int l = 0; l < loops; l++) {
    sum += sum_array_simd(array, 16);
}
...
double sum_array_simd(double *array, size_t size) {
    float64x2_t sum_vec = vdupq_n_f64(0.0);  // Initialize SIMD vector to zero
    for (size_t i = 0; i < size; i += 2) {
        float64x2_t vec = vld1q_f64(&array[i]);
        sum_vec = vaddq_f64(sum_vec, vec);
    }
    double result[2];
    vst1q_f64(result, sum_vec);
    return result[0] + result[1];
}

*baggs = billion aggregations

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

79133069

Date: 2024-10-28 10:59:12
Score: 1
Natty:
Report link

I have found another way, much simpler employing library(ggExtra) for creating Marginal Histogram / Boxplot with simple commands:

ggMarginal(p1, type = "histogram", fill="transparent")
ggMarginal(p1, type = "boxplot", fill="transparent")
ggMarginal(p1, type = "density", fill="transparent")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: mschmidt

79133062

Date: 2024-10-28 10:58:10
Score: 11 🚩
Natty: 3.5
Report link

I have the same issue. I removed the domains from crosslinking in GA4 on Nordicgear.dk and Applegenbrug.dk but i still have these weird sufix's. any suggestions?

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • RegEx Blacklisted phrase (2): any suggestions?
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Kasper

79133059

Date: 2024-10-28 10:58:10
Score: 3.5
Natty:
Report link

Upgrading spotbugs version to 4.8.3 will solve the issue.

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

79133058

Date: 2024-10-28 10:57:10
Score: 0.5
Natty:
Report link

You can make an api with api gateway and lambda where the lambda will have ffmpeg to take one frame of the image on a particular time of the video and then send the image content from the api. Or even you can implement an event driven workflow where on video upload to s3, initiate that lambda to grab the image. Although in this case the video time set might be a tricky but based on your workflow you can decide.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Amir Hossain

79133056

Date: 2024-10-28 10:56:07
Score: 7.5 🚩
Natty:
Report link

what is the best method? Has it been resolved?

Reasons:
  • RegEx Blacklisted phrase (1.5): resolved?
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): what is the
  • Low reputation (1):
Posted by: Neil Markd

79133050

Date: 2024-10-28 10:53:07
Score: 2
Natty:
Report link

If it's still relevant, I've just created an NPM package called asf-file-props doing precisely that (extract and calculate duration) in TypeScript with no dependencies. Works with .asf, .wma and .wmv files.

Check out the sources on Github, those are pretty concise and straightforward: https://github.com/chamie/asf-file-props

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

79133035

Date: 2024-10-28 10:49:06
Score: 1.5
Natty:
Report link

If anyone is still looking for a quick hack for vuejs

  1. add a "@click=closeOpenTabs" to the DisclosureButton
  2. declare function:
const closeOpenTabs = () => document
    .querySelectorAll('button[data-headlessui-state="open"]')
    .forEach((b) => b.click());
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Passing By

79133026

Date: 2024-10-28 10:46:05
Score: 1
Natty:
Report link

I also found that when using the simple Excel function "=SUMIF(...)" it is very quick, while using VB code it takes ages. I could not believe the difference in time.

I asked ChatGPT: "Why is SUMIF in Excel so much faster than doing the same with visual basic code?" It gave me the following:

The SUMIF function in Excel is indeed faster than writing equivalent code in VBA for several reasons:

Internal Optimization: Excel functions like SUMIF are highly optimized in their native code. They run at a low level directly in the Excel engine, which processes them much faster than VBA, which is an interpreted language.

Efficient Memory Management: Excel functions operate within Excel’s own efficient memory management, while VBA often requires additional overhead for memory allocation and array handling. VBA is slower because it has to manage the data movement between the worksheet and the VBA runtime.

Parallel Processing: Excel’s functions are optimized to take advantage of multithreading when possible, especially in newer versions. VBA, however, is single-threaded, which means it can't leverage multi-core processors for parallel computation.

Overhead of VBA Loops: When you try to replicate a SUMIF using VBA, you often use loops and conditional statements, which add significant overhead. Excel functions like SUMIF handle large ranges in a single pass, while a VBA loop performs individual operations for each cell.

Fewer Interactions with the Worksheet: Excel’s built-in functions minimize interactions between Excel’s interface and the code itself. VBA, however, has to read and write back to the worksheet, adding more time to each operation.

For scenarios with large data sets or frequent calculations, using Excel's native functions is often much faster than relying on VBA.

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

79133025

Date: 2024-10-28 10:46:05
Score: 4
Natty:
Report link

Recheck the attribute name author.

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

79133024

Date: 2024-10-28 10:46:05
Score: 1
Natty:
Report link

The !important key should only be used as a temporary solution. It is generally a last resort in urgent situations and when overriding external CSS libraries. You can use document.querySelector(".element").style.display = "flex"; to apply a display style, and override it later with document.querySelector(".element").style.display = "none";

To ensure clear and manageable CSS, it is best practice to add, remove, or override the same classes instead of directly applying inline styles.

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • RegEx Blacklisted phrase (2): urgent
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Goktug

79133021

Date: 2024-10-28 10:45:05
Score: 1
Natty:
Report link

Using this option will work in github Action for me

ssh -o TCPKeepAlive=yes -o ServerAliveCountMax=20 -o ServerAliveInterval=15 username@host
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jigar Prajapati

79133019

Date: 2024-10-28 10:45:05
Score: 2.5
Natty:
Report link

Connecting a Java backend with an HTML/CSS frontend involves using frameworks like Spring Boot for the backend and RESTful APIs for communication, enabling seamless data exchange and dynamic user experiences.

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

79133006

Date: 2024-10-28 10:42:04
Score: 2
Natty:
Report link

To handle a "length 0" error in an R Shiny application, check if the object or data you're working with is empty before processing it. Use conditional statements like if (length(object) > 0) to ensure the object has data. Alternatively, the req() function in Shiny can help by pausing reactive expressions until certain conditions (like non-zero length) are met, preventing errors from empty data.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Global Key info solutions

79133003

Date: 2024-10-28 10:42:04
Score: 1.5
Natty:
Report link

width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important; usebitttttttttttt t t t t t t t \t t t t width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;emphasized text

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Filler text (0.5): tttttttttttt
  • Low reputation (1):
Posted by: user28023115

79133000

Date: 2024-10-28 10:40:03
Score: 2.5
Natty:
Report link

A NavigatorObserver can help you monitor route changes throughout the app without relying on the BuildContext.

  1. Create a Custom NavigatorObserver

    class RouteObserverService extends NavigatorObserver { String? currentRoute;

    @override void didPush(Route route, Route? previousRoute) { super.didPush(route, previousRoute); currentRoute = route.settings.name; print("Current Screen: $currentRoute"); }

    @override void didPop(Route route, Route? previousRoute) { super.didPop(route, previousRoute); currentRoute = previousRoute?.settings.name; print("Returned to Screen: $currentRoute"); } }

  2. Add the Observer to Your App. Pass the custom observer to the MaterialApp to ensure it tracks navigation changes across the app.

    final RouteObserverService routeObserver = RouteObserverService();

    void main() { runApp(MyApp()); }

    class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( navigatorObservers: [routeObserver], home: HomeScreen(), ); } }

  3. Push to screen like below to get the current visible screen name.

    // Navigating to Screen using named Navigator.pushNamed(context, '/screenName'); // Navigating to Screen pushing a widget Navigator.push( context, MaterialPageRoute(builder: (context) => DetailsScreen()), settings: RouteSettings( name: '/screenName');

  4. Access the Current Route from Anywhere. Since the RouteObserverService is global, you can access the currentRoute attribute to get the latest screen name from anywhere in the app.

    String? currentScreenName = routeObserver.currentRoute; print("Currently Displayed Screen: $currentScreenName");

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • User mentioned (1): @override
  • User mentioned (0): @override
  • User mentioned (0): @override
  • Low reputation (1):
Posted by: Aiden Pearce

79132998

Date: 2024-10-28 10:39:03
Score: 2.5
Natty:
Report link

Yes with modules, functions are compiled separately, like object files, and the compiler only "sees" them during the link stage. Optimizations like inlining happen at link time, similar to link-time optimization (LTO) in headers. So, modules optimize later but work similarly to LTO

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

79132990

Date: 2024-10-28 10:38:03
Score: 1
Natty:
Report link

Had the same problem recently: Ran :checkhealth to find that one of my plugins needed NeoVim v.0.10.

Afterwhich, running :checkhealth again will list your TreeSitter parsers as missing, which requires a tedious job: Running TSInstall <parser> again.

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

79132989

Date: 2024-10-28 10:37:02
Score: 2
Natty:
Report link

Turns out I am an idiot :)

I am generating both a static and a dynamic version for all my libraries, and I was only generation CC information for the dynamic libraries (and most of the Unit Tests are currently using the static libraries).

All is well now.

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

79132987

Date: 2024-10-28 10:37:02
Score: 0.5
Natty:
Report link

With mysql2 for Node (with connection pool) & typescript,

try {
        const [result] = await pool.execute<ResultSetHeader>(/* QUERY */,
            [
                /* PARAMS */
            ])
        return result.affectedRows
    } catch (e) { //etc
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: wkille

79132981

Date: 2024-10-28 10:35:02
Score: 0.5
Natty:
Report link

Please change launchWhenResumed to launch because launch will work only when the fragment resumes.

private fun reloadWebViewOnClick(){
    //webview reload
    lifecycleScope.launch {
        launch(Dispatchers.Main) {
            binding?.webview?.reload()
        }
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Azeem Haider

79132980

Date: 2024-10-28 10:35:02
Score: 2.5
Natty:
Report link

If you are using Xcode 15 or the latest code version try to set "No" for the "User Scripting sandbox" option on build Settings.

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

79132978

Date: 2024-10-28 10:34:01
Score: 1.5
Natty:
Report link

Make sure to add WidgetsFlutterBinding.ensureInitialized(); to your isolate before initializing Firebase.

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

79132975

Date: 2024-10-28 10:33:01
Score: 0.5
Natty:
Report link

There is also a way to start chrome with disabled security features:

chromium --ignore-certificate-errors --disable-web-security --user-data-dir=./dummy_data

You need to provide a valid data directory, otherwise it will not work.

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

79132966

Date: 2024-10-28 10:30:00
Score: 2
Natty:
Report link

Fixed! Just needed to manually specify

output_dir: .next/server/pages/

for the static site in app.yaml.

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

79132965

Date: 2024-10-28 10:28:59
Score: 4.5
Natty:
Report link

I have a similar issue. I am trying to migrate data from MSSQL to MySQL, and I feel that I have checked everything. Both MSSQL and MySQL are running locally. I am the only user on this desktop. I have tried and tested many times to see that full database permissions are granted on both MSSQL and MySQL sides. I have tried through the MySQL Workbench migration wizard and through command line. It seems that there could be something wrong with how the migration throws this error: "ERROR: Determine number of rows to copy" I am grateful for everyone who works on MySQL - but there has to be some kind of error in wbcopytables executable - or at least how it throws errors. It may be a bit of data, but it really isn't that big. I would think that the people who work on MySQL would want the transition from MSSQL to MySQL to be smoother. At this point I feel that I have tried every option in both the UI from MySQL Workbench, and also from creating a .cmd file.

Reasons:
  • Blacklisted phrase (1): I am trying to
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have a similar issue
  • Low reputation (1):
Posted by: Thomas Nathan Tobey

79132963

Date: 2024-10-28 10:28:59
Score: 1.5
Natty:
Report link

if you get here in 2024, this may be caused by IntelliJ not indexing the project correctly. deleting the .idea folder and restarting the IDE worked for me. see IntelliJ does not show project folders

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

79132962

Date: 2024-10-28 10:28:59
Score: 1
Natty:
Report link

Solution to this problem is quite simple. Just wait until the HTML is parsed, before calling customElements.register. The scheme I normally use when the HTML children have to be processed in connectedCallback: class MyComponent extends HTMLElement{ static { globalThis.addEventListener('load', ()=>{customElements.define('my-component', MyComponent)}); } }

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: G. vdVeen