79490022

Date: 2025-03-06 16:28:10
Score: 1.5
Natty:
Report link

Your issue is that DuckDB requires arrays to be passed in a proper format when updating. Instead of directly assigning a NumPy array, you need to convert it to a list using .tolist().

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

79490013

Date: 2025-03-06 16:26:10
Score: 2
Natty:
Report link

Maybe you are using v4 of Tailwind, which does not use init, but this instead:

npm install tailwindcss @tailwindcss/vite

https://tailwindcss.com/docs/installation/using-vite

Version 3.4 uses this:

npm install -D tailwindcss@3
npx tailwindcss init

https://v3.tailwindcss.com/docs/installation

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

79490005

Date: 2025-03-06 16:22:09
Score: 4.5
Natty: 4.5
Report link

Is this still a problem? With Astah 10.0 Professional it works fine

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Is this
  • Low reputation (1):
Posted by: Henk Broeze

79490003

Date: 2025-03-06 16:22:08
Score: 2
Natty:
Report link

Although I barely have any experience I did find this. It seems like Apple has the very function you need integrated. You would create a new CBUUID object using the MAC Address as the parameter. Using var_name.uuidString you'd get the UUID the iPhone would assign to the peripheral you're looking for.

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

79489996

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

The issue here is that parallel is not properly formatting the rsync command. The rsync command expects a source and a destination, but the way parallel is passing {} is incorrect.

Ensure {} is prefixed with the remote hostname properly. Modify your command as follows:

ssh -o ConnectTimeout=10 -i /home/ec2-user/.ssh/remote.pem [email protected]
-q -t 'find /var/log/ -type f -print0' |
parallel -j 5 -0 rsync -aPvv -e "ssh -i /home/ec2-user/.ssh/remote.pem"
[email protected]:'{}' /home/ec2-user/local_log/

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Bellamkonda Narendra Venkata S

79489995

Date: 2025-03-06 16:20:08
Score: 3
Natty:
Report link

Kudos to @GuillaumeOutters for bringing up rounding errors.

It seems that different orderings of summing results in (exactly?) two different results, but the difference is something like 17395708 vs 17395696 -- that's a difference of 12, and already way outside the significant digits of the real type. I shouldn't even have considered this difference as significant.

I confirmed this by casting the values to double precision before summing, and the problem went away.

Even though it feels strange that the result switches between these exact two values (for one group; the other groups have different values but with similar characteristics), that's likely just up to how the real type behaves.

Thanks to everybody who chimed in (in the comments to the question).

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @GuillaumeOutters
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Gerhard

79489992

Date: 2025-03-06 16:19:08
Score: 0.5
Natty:
Report link

you need to override inputAccessoryView like this in your WKWebView subclass:

import WebKit

class MyAwesomeWebView: WKWebView {

    override var inputAccessoryView: UIView? {
        return nil
    }

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

79489981

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

Not sure if it's still relevant but for me the problem was IPython version which was 9.0.1. After downgrading to IPython==8.33.0 it was working. Command:

pip install ipython==8.33
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Alon Samuel

79489976

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

For a data factory to read the metrics of a SHIR, the subtype of the SHIR has to be Shared. If the SHIR is shared on a different data factory and if the metrics are tried to be read from over there, the subtype says Linked and will not provide any metrics.

enter image description here

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

79489974

Date: 2025-03-06 16:14:06
Score: 1.5
Natty:
Report link

Usually you create a Filter Class with all fields you want to filter, so it might has a strong similarity to the bean you display in the grid. And the instance of the filter class can be applied to the data view, which returns when you set items to the grid component.

There is a pretty good example in the Filtering section of the documentation. https://vaadin.com/docs/latest/components/grid#filtering

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sebastian Kühnau

79489973

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

On table_name_4, in the where clause should be:

Where date>= max_pt ("table_name_5")
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jose A

79489972

Date: 2025-03-06 16:14:06
Score: 4.5
Natty: 5
Report link

The latest version is actually there: https://packagecontrol.io/packages/REBOL

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

79489968

Date: 2025-03-06 16:12:06
Score: 3.5
Natty:
Report link

I just went to Features in the App's settings and under Accept Payments, there was a short verification I need to complete. The verification process asked me to enter the email and phone number my customers can reach out to for support, whether I was a decision maker, and my percent of ownership of the business. After verifying my email the process was complete and I can now accept credit card payments. Thanks Luis!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Amy

79489967

Date: 2025-03-06 16:12:06
Score: 2.5
Natty:
Report link

@dbush posted an answer of one way to solve it through the common initial sequence rule and unions.

Another way, which is perhaps more rugged and reliable in terms of compiler support, is to have one struct declare an instance of the other struct as its first member. As it turns out, that's the recommended way of implementing inheritance & polymorphism in C, which seems to be what you are doing.

There's this rule found in the current C23 standard below 6.7.3.2:

A pointer to a structure object, suitably converted, points to its initial member (or if that member is a bit-field, then to the unit in which it resides), and vice versa.

This allows us to convert freely from a pointer to a struct and a pointer to the first item in the struct. This rule goes way back to the first C standard and compilers have supported it from a time before strict aliasing debacles became mainstream in the early 2000s.

(The only minor issue is that C actually doesn't specify "suitably converted", although that's a quality of implementation issue and every compiler I ever used interprets it as "explicitly cast to the corresponding pointer type".)

Check out this Q&A for some examples of how to do that: How do you implement polymorphism in C?

Reasons:
  • Blacklisted phrase (1): How do you
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
  • User mentioned (1): @dbush
  • Looks like a comment (1):
  • High reputation (-2):
Posted by: Lundin

79489965

Date: 2025-03-06 16:11:05
Score: 3
Natty:
Report link

Found a resolution to this. In package.json replace the relative file paths for the @jutro libraries with actual file versions e.g. BEFORE "dependencies": { "@digitalsdk/cli": "^10.9.2", "@jutro/app": "file:./@jutro/app", "@jutro/auth": "file:./@jutro/auth", "@jutro/browserslist-config": "file:./@jutro/browserslist-config", . . .

AFTER "dependencies": { "@digitalsdk/cli": "10.9.2", "@jutro/app": "10.9.2", "@jutro/auth": "10.9.2", "@jutro/browserslist-config": "10.9.2", . . .

Reasons:
  • No code block (0.5):
  • User mentioned (1): @jutro
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Syntax Terror

79489944

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

From docs:

Considerations when Enabling Querying

You can make an encrypted field queryable. To change which fields are encrypted or queryable, rebuild the collection's encryption schema and re-create the collection.

https://www.mongodb.com/docs/manual/core/queryable-encryption/fundamentals/encrypt-and-query/#considerations-when-enabling-querying

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

79489942

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

I was experiencing the same issue.

Solved after following the two steps:

  1. Adding "commands" in bot scope
  2. Including @app.command(“/my_command") in OAuth request
Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: user2712873

79489941

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

I was experiencing the similar issue.

Solved after following the two steps:

  1. Adding "commands" in bot scope
  2. Including @app.command(“/my_command") in OAuth request
Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: user2712873

79489940

Date: 2025-03-06 16:01:03
Score: 3
Natty:
Report link

Ok.. It seems to be a 10 years old open bug: https://bugreports.qt.io/browse/QTBUG-37030

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

79489921

Date: 2025-03-06 15:56:02
Score: 0.5
Natty:
Report link

In my opinion, handling everything within a single Livewire component (both step-by-step form data and dynamic field logic) seems too bulky.

It's up to you, there's no really better solution, just keep in mind that if you will reuse this exact same form somewhere else it is obvious that you should put it in a dedicated Form object. Otherwise, do as you think its the best to you to handle it.

And to be honest, I’m not even sure if I should use Livewire for dynamic fields at all. I've seen opinions suggesting that it might be overkill since every update would trigger a request to the server. Some suggested using sessions instead, but I feel like that would be inconvenient.

Triggering a request for every update isn't a bad thing by itself since Livewire have been designed to work with lifecycles events, it just depends how you handle it. There's nothing bad in triggering a request if you want to add another input in the step 2 of your form, it just depends how you manage the lifecycles of your component.

My way to handle that would be to create regular public properties for each of your form inputs, then for the dynamic inputs case i'd create public array properties and just iterate on them. This tutorial is a good example of that solution.

Once you submit the form make sure to validate the inputs if needed and store the data it the way you need it.

I hope this will help.

Reasons:
  • Blacklisted phrase (1): This tutorial
  • Whitelisted phrase (-1): hope this will help
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Lucas

79489907

Date: 2025-03-06 15:53:01
Score: 4
Natty: 4.5
Report link

7e068727fdb347b685b658d2981f8c85f7bf0585`

s44 x55s7e068727fdb347b685b658d2981f8c85f7bf0585 d55x enter link description here`1 ][ enter link description here

Reasons:
  • Blacklisted phrase (0.5): enter link description here
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Andrzej Golec

79489906

Date: 2025-03-06 15:52:00
Score: 0.5
Natty:
Report link

Solution for Fixing Sass Import in Vite 3

Install sass if It's Not Installed

If sass is missing from your project, install it using:

npm install sass --save-dev

Fix the Path in vite.config.js

In vite.config.js, change the additionalData option to use the alias @ instead of ./src/...:

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'

export default defineConfig({
  plugins: [
    vue(),
    vueDevTools(),
  ],
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `@use "@/assets/scss/_variables.scss" as *;`
      }
    }
  },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    },
  },
})

Restart the Vite Development Server

npm run dev

Key Points:

✔ Use @use "@/assets/scss/_variables.scss" as *; instead of @import, since @import is deprecated in Dart Sass 3.0.0+.

✔ Ensure the path starts with @/ instead of ./src/, which might not be resolved correctly by Vite.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @use
  • User mentioned (0): @import
  • User mentioned (0): @import
  • Low reputation (1):
Posted by: LEONARDO HERNANDEZ

79489895

Date: 2025-03-06 15:49:00
Score: 0.5
Natty:
Report link

There's always (especially with ruby) many ways to structure code. Here's my approach and what I consider to be improvements, but your opinions and preferences may be different. Also - you can decide to ignore Rubocop. This warning doesn't say it's wrong code, just that maybe it's possible to write it better.

Original code

def destroy
  unless Current.user.default_entity.owner == Current.user ||
          Current.user.default_entity.user_privileged?('manage_contacts')

    redirect_back(fallback_location: contacts_path, alert: t('errors.no_access_rights')) and return
  end

  unless @contact.invoices.count.zero?
    redirect_back(fallback_location: contacts_path,
                  alert: t('errors.cant_delete_contact_with_invoices')) and return
  end

  unless @contact.offers.count.zero?
    redirect_back(fallback_location: contacts_path,
                  alert: t('errors.cant_delete_contact_with_offers')) and return
  end

  @contact.destroy

  redirect_to contacts_path, status: :see_other
end

Variation 1

Let's get rid of duplication - we can set alert when there's a problem, and if we set it, we return and redirect.

def destroy
  alert = nil
  unless Current.user.default_entity.owner == Current.user || Current.user.default_entity.user_privileged?('manage_contacts')
    alert = t('errors.no_access_rights')
  end

  unless @contact.invoices.count.zero?
    alert = t('errors.cant_delete_contact_with_invoices')
  end

  unless @contact.offers.count.zero?
    alert = t('errors.cant_delete_contact_with_offers')
  end

  return redirect_back(fallback_location: contacts_path, alert:) if alert

  @contact.destroy

  redirect_to contacts_path, status: :see_other
end

We didn't really make the code shorter or less branched, but we got some insight - there's logic for finding possible problems, and there are two ways this method end - redirect_back with error, or destruction of contact.

Variation 2

Let's move setting alert to separate private method, making action cleaner

def destroy
  return redirect_back(fallback_location: contacts_path, alert:) if alert

  @contact.destroy

  redirect_to contacts_path, status: :see_other
end

private

def alert
  unless Current.user.default_entity.owner == Current.user || Current.user.default_entity.user_privileged?('manage_contacts')
    return t('errors.no_access_rights')
  end

  unless @contact.invoices.count.zero?
    return t('errors.cant_delete_contact_with_invoices')
  end

  unless @contact.offers.count.zero?
    return t('errors.cant_delete_contact_with_offers')
  end
end

The naming here is possibly not great, but it was just fast brainstorm.

This again enhanced the readability of the core - destroy method, and makes it simpler to move the details around, which leads to:

Variation 3

Why are we checking for whether model can be deleted? Controller doesn't need to know that, this knowledge possibly lies in model. Also, ActiveRecord models have a great native way of managing validations and errors, so that will help us make more standard Rails endpoint. Here for reference - Rails docs and Rails guide

# app/models/contact.rb
class Contact < ApplicationRecord
  ...

  before_destroy :validate_destruction, prepend: true


  private

  def validate_destruction
    unless Current.user.default_entity.owner == Current.user || Current.user.default_entity.user_privileged?('manage_contacts')
      errors.add t('errors.no_access_rights')
      return false
    end

    unless invoices.count.zero?
      errors.add t('errors.cant_delete_contact_with_invoices')
      return false
    end

    unless offers.count.zero?
      errors.add t('errors.cant_delete_contact_with_offers')
      return false
    end
  end
end

# app/controllers/contracts_controller.rb

def destroy
  if  @contact.destroy
    redirect_to contacts_path, status: :see_other
  else
    redirect_back(fallback_location: contacts_path, alert:) if alert
  end
end

Nice and clean.

I didn't really test all the code, so I don't guarantee it works exactly this way, I'm just trying to point direction

Some general thoughts:

Reasons:
  • RegEx Blacklisted phrase (1): help us
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: janpeterka

79489883

Date: 2025-03-06 15:44:58
Score: 1.5
Natty:
Report link

Since it is a non nullable property you will never be able to asign null. What you can do is create a ReesetDate method that sets _date1 to null if that would ever be needed.

_date1 will be null by default if there is no value asigned to it in the constructor so i dont see why you would want to reset it to null.

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

79489877

Date: 2025-03-06 15:41:58
Score: 5.5
Natty: 5.5
Report link

I have just encountered the same issue in my iPad app (using TS not React). Have you found a solution yet? I'll keep digging

Reasons:
  • RegEx Blacklisted phrase (2.5): Have you found a solution yet
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: bhbr

79489873

Date: 2025-03-06 15:39:57
Score: 2.5
Natty:
Report link

I figured it out on my own - ctrl+.

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

79489863

Date: 2025-03-06 15:36:56
Score: 1.5
Natty:
Report link

this was fixed by applying this in styles.scss:

.mdc-notched-outline__notch {
  border-right: none;
}

the problem was because of the outline appearence i do not know if there is a permanent and more effecient fix for it (https://github.com/angular/components/issues/26102)

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

79489851

Date: 2025-03-06 15:32:55
Score: 1
Natty:
Report link

In my case I had a table where the text had multiple line breaks not showing up.

My solution was to add following CSS to <td> tag:

white-space:pre-line;
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: stev

79489842

Date: 2025-03-06 15:30:54
Score: 4.5
Natty:
Report link

You can't preventing modifying this file due to the internal processes of Vaadin.

Why do you want to stop it?

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Sebastian Kühnau

79489836

Date: 2025-03-06 15:28:54
Score: 0.5
Natty:
Report link

After a bunch of trial and error, i've found a good solution (at least for my 50-node solution. I'll list all the changes I did:

  1. I've gone back and simplified my evaluation function, now it takes the value of an edge, without penalization, as I found out my penalization was causing too much of an effect on the result.
  2. I've added local search (memetization) on the algorithm used.
  3. I've decreased the HallOfFame size to 1.
  4. I added stagnation detection. If the algorithm doesn't improve after 25 generations, I increase the mutation rate. After 5 increases, I regenerate the population using the best individual and reset the mutation rate to the original. After 3 cycles of this, the genetic algorithm halts.

After this improvements, I finally got the following graph:

best path min/avg fitness

Looking at the evolution graph, you can clearly see the population resets that lead to a better path.

Any further tips will be greatly appreciated! :)

Final code:

# Previous code
    def eaSimpleWithElitism(self,
                            population,
                            toolbox,
                            cxpb,
                            mutpb,
                            ngen,
                            stats=None,
                            halloffame=None,
                            verbose=__debug__):
        """This algorithm is similar to DEAP eaSimple() algorithm, with the modification that
        halloffame is used to implement an elitism mechanism. The individuals contained in the
        halloffame are directly injected into the next generation and are not subject to the
        genetic operators of selection, crossover and mutation.
        """
        logbook = tools.Logbook()
        logbook.header = ['gen', 'nevals'] + (stats.fields if stats else [])

        # Evaluate the individuals with an invalid fitness
        invalid_ind = [ind for ind in population if not ind.fitness.valid]
        fitnesses = toolbox.map(toolbox.evaluate, invalid_ind)
        for ind, fit in zip(invalid_ind, fitnesses):
            ind.fitness.values = fit

        if halloffame is None:
            raise ValueError("halloffame parameter must not be empty!")

        halloffame.update(population)
        hof_size = len(halloffame.items) if halloffame.items else 0

        record = stats.compile(population) if stats else {}
        logbook.record(gen=0, nevals=len(invalid_ind), **record)
        if verbose:
            print(logbook.stream)

        best_val = float('inf')
        gens_stagnated = 0
        mut_exploder = 1
        cicles = 0

        # Begin the generational process
        for gen in range(1, ngen + 1):

            # Select the next generation individuals
            offspring = toolbox.select(population, len(population) - hof_size)

            # Vary the pool of individuals
            offspring = algorithms.varAnd(offspring, toolbox, cxpb, mutpb)

            # Evaluate the individuals with an invalid fitness
            invalid_ind = [ind for ind in offspring if not ind.fitness.valid]
            fitnesses = toolbox.map(toolbox.evaluate, invalid_ind)
            for ind, fit in zip(invalid_ind, fitnesses):
                ind.fitness.values = fit

            elite = halloffame.items
            for i, e in enumerate(elite):
                ie = self.local_search_2opt(e)
                e[:] = ie[:]
                e.fitness.values = self.evaluate_tsp(e)

            # add the best back to population:
            offspring.extend(elite)

            # Update the hall of fame with the generated individuals
            halloffame.update(offspring)

            # Replace the current population by the offspring
            population[:] = offspring

            # Append the current generation statistics to the logbook
            record = stats.compile(population) if stats else {}
            logbook.record(gen=gen, nevals=len(invalid_ind), **record)
            if verbose:
                print(logbook.stream)

            val = halloffame[0].fitness.values[0]
            if val < best_val:
                best_val = val
                gens_stagnated = 0
            else:
                gens_stagnated += 1
            if gens_stagnated >= 25:
                print("Stagnated")
                if mut_exploder < 5:
                    toolbox.register("mutate", 
                                     tools.mutShuffleIndexes, 
                                     indpb=1/(self.graph.nodes - mut_exploder))
                    mut_exploder += 1
                else:
                    print("Reseting...")
                    for i, ind in enumerate(population):
                        population[i] = halloffame.items[0]
                    mut_exploder = 1
                    toolbox.register("mutate", 
                                     tools.mutShuffleIndexes, 
                                     indpb=1/(self.graph.nodes))
                    cicles += 1
                gens_stagnated = 0
            
            if cicles >= 3: break

        return population, logbook

    def run_ga_tsp(self,
                   ngen: int = 3000,
                   cxpb: float = 0.7,
                   mutpb: float = 0.2,
                   pop_size: int = 1000,
                   dir: str | None = None,
                   idx: int = 0,
                   vrb: bool = True) -> tuple[list[int], float]:
        """Runs the Genetic Algorithm for the Traveling Salesman Problem.
        
        This function calls the wrapper functions that define the creator, 
        toolbox and the attributes for the Genetic Algorithm designed to solve
        the Traveling Salesman Problem. It then runs the Genetic Algorithm and 
        returns the best path found and its total value, while also calling the
        wrapper function to plot the results.

        Args:
            ngen (optional): The number of generations. Defaults to 100.
            cxpb (optional): The mating probability. Defaults to 0.9.
            mutpb (optional): The mutation probability. Defaults to 0.1.
            pop_size (optional): The size of the population. Defaults to 200.
            dir (optional): The directory where the plots should be saved. 
                Defaults to None, in which case the plot(s) won't be saved.
            idx (optional): The index for the plot to save. Defaults to 0.
            vrb: (optional): Run the algorithm in verbose or non-verbose mode.
                Defaults to True.

        Returns:
            A tuple containing the best path found and its total value.
        """
        random.seed(169)
        if not self.graph.distances: self.graph.set_distance_matrix()
        
        creator = self._define_creator()
        toolbox = self._define_toolbox()
        population, stats, hof, = self._define_ga(toolbox, pop_size)

        population, logbook = self.eaSimpleWithElitism(population,
                                                       toolbox,
                                                       cxpb=cxpb,
                                                       mutpb=mutpb,
                                                       ngen=ngen,
                                                       stats=stats,
                                                       halloffame=hof,
                                                       verbose=vrb)

        best = [i for i in hof.items[0]]
        best += [best[0]]
        total_value = self.evaluate_tsp(best)[0]

        if vrb:
            print("-- Best Ever Individual = ", best)
            print("-- Best Ever Fitness = ", total_value)

        if dir:
            self._plot_ga_results(best, logbook, dir, idx)
        else:
            self._plot_ga_results(best, logbook).show()

        return best, total_value

    def _define_toolbox(self) -> base.Toolbox:
        """Defines a deap toolbox for the genetic algorithms.
        
        The ``deap.base.createor`` module is part of the DEAP framework. It's 
        used as a container for functions, and enables the creation of new
        operators by customizing existing ones. This function extracts the
        ``toolbox`` instantiation from the ``run_ga_tsp`` function so the code
        is easier to read and follow. 
        
        In the ``toolbox`` object is where the functions used by the genetic
        algorithm are defined, such as the evaluation, selection, crossover
        and mutation functions.

        Returns:
            The toolbox defined for the genetic algorithm.
        """
        toolbox = base.Toolbox()
        toolbox.register("random_order", 
                         random.sample, 
                         range(self.graph.nodes), 
                         self.graph.nodes)
        toolbox.register("individual_creator", tools.initIterate,
                         creator.Individual, toolbox.random_order)
        toolbox.register("population_creator", tools.initRepeat, list,
                         toolbox.individual_creator)

        toolbox.register("evaluate", self.evaluate_tsp)
        toolbox.register("select", tools.selTournament, tournsize=2)

        toolbox.register("mate", tools.cxOrdered)
        toolbox.register("mutate",
                         tools.mutShuffleIndexes,
                         indpb=1.0/self.graph.nodes)
        toolbox.register("clone", self._clone)

        return toolbox
# Rest of code
Reasons:
  • Blacklisted phrase (1): appreciated
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: lovethefrogs

79489834

Date: 2025-03-06 15:28:54
Score: 3
Natty:
Report link

Turns out My windows was just using english as its primary language, once i set windows 11 to use Check Beta: Use Unicode UTF-8 for worldwide language support everything worked fine.

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

79489829

Date: 2025-03-06 15:27:54
Score: 1.5
Natty:
Report link

Solution 1: Use

const fs = require('node:fs');

instead of

import * as fs from 'node:fs';

Solution 2:

Use

node --input-type=module script.js

instead of

node script.js
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: zyad salamony

79489816

Date: 2025-03-06 15:25:53
Score: 5
Natty: 5
Report link

I have a lot of rules and it's impossible to report all of this in the code. How to do to import the excel (I have a csv) automatically to a rules object?

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

79489804

Date: 2025-03-06 15:23:52
Score: 3
Natty:
Report link
  1. Click the Copilot Icon at the top.
  2. Click "Configure Code Completions"
  3. Depending on the current state, click "Enable Completions" or "Disable Completions" to toggle it.

Copilot Menu

Configure Copilot Completions Menu

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

79489803

Date: 2025-03-06 15:23:52
Score: 0.5
Natty:
Report link

It started working for me when I emptied the default DerivedData folder and manually created ModuleCache.noindex folder. If any other folders are needed just creating it worked for me. This is a really annoying bug.

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

79489796

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

The langchain_elasticsearch library in LangChain simplifies the integration of Elasticsearch for Retrieval-Augmented Generation (RAG).

Initialization: Use ElasticsearchStore() to create an Elasticsearch vector store.

Storing Documents: Add documents to the vector store using add_documents(documents).

Retrieving Documents: Perform similarity-based retrieval with similarity_search(query, embedding_model), which finds relevant chunks based on embeddings.

If you have any specific answers about this topic dont hesitate to reach me out.

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

79489794

Date: 2025-03-06 15:18:51
Score: 3
Natty:
Report link
  1. Click the Copilot Icon at the top.
  2. Click "Configure Code Completions"
  3. Depending on the current state, click "Enable Completions" or "Disable Completions" to toggle it.

Copilot Menu

Configure Copilot Completions Menu

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

79489793

Date: 2025-03-06 15:18:51
Score: 2.5
Natty:
Report link

the mistake was that in addition to do_read(), which I called at the end of the read_message() method, I also called it in another part of my code, which led to an error, the result: one do_read() is enough.

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

79489789

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

I had this problem and fixed it by displaying offscreen then doing setPosition after ~100msec. Maybe a shorter delay could work too. Worked on windows, have not tried mac yet. Create the window with x=-20000, or calculate based on screens. Then just bw.setPosition(actualX, y).

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

79489784

Date: 2025-03-06 15:13:50
Score: 0.5
Natty:
Report link

Angular has tried to tie SSG together with SSR at the moment, so even if you only want to use SSG/prerender, it will force you to set a server and also will build a server, and rename your index files so they don't work off the bat.

It's stilly, but you can literally just rename the index.csr.html files and then server as static content as expected.

Reasons:
  • No code block (0.5):
Posted by: Worthy7

79489764

Date: 2025-03-06 15:04:48
Score: 1.5
Natty:
Report link

Yes, you can achieve this using as const to preserve the literal type of fields:

const user = { fields: ["name"] as const };
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Krishna Dhoot

79489761

Date: 2025-03-06 15:03:48
Score: 1
Natty:
Report link

I ran

sudo gem install cocoapods

And then restarted Android Studio.

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
Posted by: ymerdrengene

79489760

Date: 2025-03-06 15:03:47
Score: 4
Natty: 5
Report link

can we add amount filter as well in here

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): can we add am
  • Low reputation (1):
Posted by: LK_V

79489757

Date: 2025-03-06 15:01:47
Score: 4
Natty:
Report link

I currently encounter thesame issue, this could be the culprit, we can target what spins and what should not spin via this tailwind thing hahaha, happy coding

enter image description here

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

79489752

Date: 2025-03-06 15:01:47
Score: 1
Natty:
Report link

BTW ispac is binary file but it is just a zipped project folder (try to replace .ispac extension into .zip or append .zip extension to .ispac and open it as a zip file).

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

79489744

Date: 2025-03-06 14:57:46
Score: 1
Natty:
Report link

Field renames requires control over the consumer schema if you target to have a backward compatible deployment.

This means that you have to:

  1. Register the schema version containing the alias to the schema registry (at this point both apps still use the old schema)
  2. Deploy the consumer application to use the latest schema version (at this point, producer publishes with the old schema, but the consumer "understands" both field names)
  3. Deploy the producer application to use the latest schema version (at this point, both applications communicate via the renamed field)

In this case, the deployment order is important and complies to being backward compatible. As you already saw, updating the producer first will break consumers due to the fact that they are not aware of an alias since they do not use that schema.

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

79489735

Date: 2025-03-06 14:54:45
Score: 5
Natty:
Report link

I am encountering the same error repeatedly. Could this issue be related to macOS 12 being outdated or reaching its end of support?

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

79489732

Date: 2025-03-06 14:53:44
Score: 1.5
Natty:
Report link

This doesn't actually fix the problem but is a work around. Instead of:

data = np.fromfile(filepath,dtype=np.uint8)

I replaced it with:

with open(filepath, 'rb') as file:
    data = array.array('B',file.read())
data = np.array(data)

Now I can run the script without without error and without using F9.

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

79489703

Date: 2025-03-06 14:42:42
Score: 0.5
Natty:
Report link

So I, of course, solved it a few hours after posting the issue here by just scheduling the command to execute later.

player.getServer().scheduleInTicks(5, () => {
        player.runCommand(`execute in minecraft:overworld run item replace block ${copyx} ${copyy} ${copyz} container.0 with ${book.getId()}${book.getNbt()}`);
    })

My educated guess on why this is happening:
I assume you can only interact with the world in the tick event, and not in any other event. So, by scheduling it, it gets executed in a later tick event, and thus works.

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

79489695

Date: 2025-03-06 14:39:41
Score: 1.5
Natty:
Report link

Authorization to access databricks API via power apps {"error_description":"OAuth application with client_id: '5be4998e-7916-48aa-b62f-f3bdafec260f' not available in Databricks account '64a96936-b09e-489c-b813-696d6d4488a0'.","error":"invalid_request"}

The error message suggests that the OAuth application with the provided is not available in your Databricks account. Make sure your app is added as service principal in Databricks. Below are the steps for above error resolution.

Step 1. log in to the Azure Databricks workspace.
Step 2. Click your username in the top bar of the Azure Databricks workspace and select Settings.
Step 3. Click on the Identity and access tab and add your client ID.

enter image description here

Step 4. Next to Service principals, click Manage.
Step 5. Click Add service principal.

enter image description here

Step 6.Click the drop-down arrow in the search box and then click Add new.
Step 7.Under Management, choose Databricks managed.

enter image description here

Step 8. Enter a name for the service principal. Click Add.
Step 9. Finally open power apps and add necessary details as shown in picture.
Add client ID from Azure AD and create a secret ID, authorization URL add Databricks URL and as shown in below screenshot.

enter image description here

enter image description here

Step 10 . Finally test the connection.

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Shraddha Pore

79489683

Date: 2025-03-06 14:34:40
Score: 2.5
Natty:
Report link

Working in VSCode on a Mac (not sure if the menu names are different), you need to click on Code > Settings > Settings to get to the Settings menu. Then select the Workspace tab and continue with the instructions provided in the top answer.

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

79489677

Date: 2025-03-06 14:32:39
Score: 7.5 🚩
Natty: 5
Report link

were you able to do this? like i have to edit the pdf file user can edit the text or even table values and some form values which i first replace from the fields from the database, how did you achieve that editing part?

Reasons:
  • RegEx Blacklisted phrase (3): were you able
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: reem

79489671

Date: 2025-03-06 14:29:38
Score: 1
Natty:
Report link

I can give you the technical differences but the "best options" is opinion based. Basically: React Native Projects are limited in their Add-On support so depending on how big you want to scale this storybook, or use hybrid components react is your way to go. If you want a soley robust React Native program react-native is the preffered choice atleast in my opinion. The Frameworks differ as native is in app and react is using a web-based UI. The reason why some mix it in a project is just because they want to have a web-review and a mix supports you there as react alone has some wonky interactions with react-native components.

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

79489665

Date: 2025-03-06 14:27:37
Score: 3
Natty:
Report link

When new to python and programming, I struggled with a means to edit a specific record in a list. List comprehensions will EXTRACT a record but it does not return an .index() in my_list. To edit the record in place I needed to know the .index() of the actual record in the list and then substitute values and this, to me, was the real value of the method.

I would create a unique list using enumerate():

unique_ids = [[x[0], x[1][3]] for x in enumerate(my_list)]

Without getting into details about the structure of my_list, x[0] in the above example was the index() of the record whereas the 2nd element was the unique ID of the record.

for example, suppose the record I wanted to edit had unique ID "24672". It was a simple matter to locate the record in unique_ids

wanted = [x for x in unique_ids if x[1] == "24672"][0] wanted (245, "24672")

Thus I knew the index at the moment was 245 so I could edit as follows:

my_list[245][6] = "Nick"

This would change the first name field in the my_list record with index 245.

my_list[245][8] = "Fraser"

This would change the last name field in the my_list record with index 245.

I could make as many changes as I wanted and then write the changes to disk once satisfied.

I found this workable.

If anyone knows a faster means, I would love to know it.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): anyone knows
  • Long answer (-1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: Nick Fraser

79489663

Date: 2025-03-06 14:27:37
Score: 6.5
Natty: 8
Report link

I don't want https redirection in bootstrap. how can i cancel this redirection?

Reasons:
  • Blacklisted phrase (0.5): how can i
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: selim

79489655

Date: 2025-03-06 14:25:37
Score: 1.5
Natty:
Report link

Use fish ! For Mac Users:

brew install fish
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: danielassayag

79489643

Date: 2025-03-06 14:22:36
Score: 3
Natty:
Report link

I was looking for a solution as well, and came across this gist which helps you do exactly that.

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

79489640

Date: 2025-03-06 14:20:36
Score: 3
Natty:
Report link

request.raw.version_string gives the text presentation, e.g. HTTP/1.1

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

79489638

Date: 2025-03-06 14:19:35
Score: 1.5
Natty:
Report link

What worked for me:

brew update
brew upgrade icu4c
brew link --force icu4c
brew reinstall node

After this, both my node --version and npm create commands worked as expected

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): What
  • Low reputation (1):
Posted by: reyna

79489629

Date: 2025-03-06 14:15:35
Score: 0.5
Natty:
Report link

Within the settings.py file, before the cache settings were encountered, I instantiated a local client which made use of the Django cache API and thus set the cache backend to the default django.core.cache.backends.locmem.LocMemCache.

Moving the cache settings up in the file before the instantiation of the local client allowed the correct django_bmemcached.memcached.BMemcached backend to be set as specified.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Stéphan van Biljon

79489609

Date: 2025-03-06 14:05:33
Score: 2.5
Natty:
Report link

Check for "regular" filters removing rows... I spent hours looking for a programmatic solution, then an issue with excel, before finally realizing that a filter 30 columns in was blocking rows...

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

79489606

Date: 2025-03-06 14:04:32
Score: 3
Natty:
Report link

Thanks so much for your help!

@Bnazaruk – you were right, the issue was with a GTM tag. And thanks to @disinfor’s suggestion, I checked the console log. At first, it didn’t tell me much, but after looking at it a few times, I noticed a link related to CookieYes.

It turned out that the tag created for Consent Mode with CookieYes was conflicting with the plugin’s own script.js, leading to an infinite loop that prevented certain elements on the page from loading.

Now, I’ll be working on fixing the issue with this tag.

Once again, thanks for your help!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): thanks
  • Whitelisted phrase (-0.5): thanks for your help
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Bnazaruk
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Greg

79489598

Date: 2025-03-06 14:01:32
Score: 1
Natty:
Report link
schema = @Schema(types = {"integer"})

You can work around the issue by using "types" instead of "type".

It seems to be a bug with swagger core 3.1. Here and here are two GitHub issues related to the problem.

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

79489597

Date: 2025-03-06 14:00:31
Score: 4
Natty: 4
Report link

For me it lists nothing. But SQL Server Management Studio lists a lot. Anyone an idea why? (Local instance I parse from registry)

Reasons:
  • Blacklisted phrase (0.5): why?
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: SVEN KUEHNE

79489588

Date: 2025-03-06 13:57:30
Score: 0.5
Natty:
Report link

Instead of pushing object

[ServiceContract(Namespace = "int:")]
[XmlSerializerFormat]
public interface IUsersService
{
    [OperationContract]
    [FaultContract(typeof(SoapResponse))]
    Task<GetUserSomethingResponse> GetUserSomething(GetUserSomethingQuery query);
}

Separating each parameter and delivering it into constructor with X amount of properties helped.

    ///Interface
    [OperationContract]
    [FaultContract(typeof(SoapResponse))]
    Task<GetUserSomethingResponse> GetUserSomething(string username, string id, bool archive);

///Implementation Method
public async Task<GetUserSomethingQueryResponse> GetUserSomethingQuery(string username, string id, bool archive) 
=> await mediator.Send(new GetUserSomethingQuery(username, id, archive));
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: SimonCrane

79489575

Date: 2025-03-06 13:54:30
Score: 0.5
Natty:
Report link
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.13"/>
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.13"/>
    <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.13"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.13"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.13" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.13"/>
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Bilal Furkan Karaca

79489573

Date: 2025-03-06 13:53:29
Score: 1
Natty:
Report link

I found the solution to my problem : npm install

Reasons:
  • Whitelisted phrase (-2): I found the solution
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: KarljoY973

79489572

Date: 2025-03-06 13:53:29
Score: 0.5
Natty:
Report link

You need to use TarantoolTuple, everything works with it. Below is an example.

var turple = TarantoolTuple.Create(fromToHash, newest, oldest, _limit);
var result = _client.Call<TarantoolTuple<long, long, long, int>, TarantoolTuple<long, string, string, long, string, string>[]>("message_get_list_in_range", turple).Result;
var res = result.Data.FirstOrDefault();
if (res != null)
{
    var output = res.Select(x => new MessageEntity()
    {
        Id = x.Item1,
        From = x.Item2,
        To = x.Item3,
        FromToHash = x.Item4,
        SendingTime = DateTime.Parse(x.Item5),
        Text = x.Item6
    });

    return output;
}
else
{
    return new List<MessageEntity>();
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Vladislav Filatov

79489564

Date: 2025-03-06 13:48:28
Score: 2.5
Natty:
Report link
using MemoryCache cache = new(new MemoryCacheOptions());

as shown here https://www.nuget.org/packages/microsoft.extensions.caching.memory

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

79489555

Date: 2025-03-06 13:43:27
Score: 6 🚩
Natty: 4.5
Report link

When i try to write the above xml namespace as setattributeNs and deploy it in dev environment I am facing backslash issue like the escape characters for “”. Is there any solution for it

Reasons:
  • Blacklisted phrase (1.5): any solution
  • Blacklisted phrase (1): Is there any
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When i
  • Low reputation (1):
Posted by: Nick

79489548

Date: 2025-03-06 13:41:26
Score: 1.5
Natty:
Report link

Adding

-Dspring-boot.build-image.imagePlatform=linux/arm64

to spring-boot:build-image did the trick for me.

See https://docs.spring.io/spring-boot/maven-plugin/build-image.html

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

79489547

Date: 2025-03-06 13:41:26
Score: 3
Natty:
Report link

I believe the bottleneck you're facing is the use of the job queue. I've seen many solutions online that have the same problem.

First you're using hardware_concurrency to determine the number of threads you want to use. The fact is that the call returns the number of logical processors (see SMT or Hyperthreading), if you're doing a lot of calculation maybe you should try something closer to the physical CPU count or you won't see much speedup.

Also you're using a mutex and a condition var, which is correct, but prone to frequent context switch that can mess with the scaling of your solution.

I'd try to see if batching can be implemented, or maybe trying some active waiting methods (i.e. spinlocks instead of locks). Also as other suggested, reserving the memory in advance can be good, but std::vector makes a good job already, also memory caches are really efficient (so probably the bottleneck isn't there).

There are also a lot of job queues that are lock-free. See for example LPRQ which is a multiproducer-multiconsumer queue. The paper has also an artifact section from which you can get the actual implementation.

If you find the implementation too complicated you can think of having a buffer from the producer to every consumer (in a lock free manner), the implementation is much more simple See here and probably scales much better than a single buffer shared between threads (assuming the thread count is known in advance).

Reasons:
  • Blacklisted phrase (1.5): any solution
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): have the same problem
  • Low reputation (0.5):
Posted by: Mattia Piras

79489539

Date: 2025-03-06 13:39:25
Score: 1
Natty:
Report link

You can do the following:

enter image description here

enter image description here

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

79489536

Date: 2025-03-06 13:38:25
Score: 3
Natty:
Report link

did you know, you can run javascript by typing (javascript:"your code") in addressbar of browser, you can run it? also,you can load html by typing ("data:text/html,"your html code") in addressbar.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): did you
  • Low reputation (1):
Posted by: ali reza

79489532

Date: 2025-03-06 13:36:25
Score: 0.5
Natty:
Report link

On my case adding the following line in the iOS .podspec fix the problem (in the podspec from your iOS Swift library, not from the React Native library):

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }

Then re-run pod install in your react native example app and Clean the Build folder

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

79489522

Date: 2025-03-06 13:31:23
Score: 1
Natty:
Report link
python -c "import sys, json; print json.dumps(json.load(sys.stdin),sort_keys=True, indent=0)" < json_file

 python -c "import sys, json; print json.dumps(json.load(sys.stdin),sort_keys=True, indent=0)" < json_file | tr -d "\n"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sudarsan Bandi

79489509

Date: 2025-03-06 13:28:23
Score: 1.5
Natty:
Report link

Images under /public can be shown directly from URL. Try to open it and see if is visible. If so, may is do to some CSS classes or something about Image tag. Did you tryied to use the tag (the classic tag and not the component) to see if it work?

Reasons:
  • Whitelisted phrase (-2): Did you try
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Marco Rovida

79489508

Date: 2025-03-06 13:27:23
Score: 2
Natty:
Report link

The biggest mistake I have seen, regardless of the database chosen (relational, document), is no clear ageoff strategy. One of the first things I ask, is how long is the data relevant. You would be surprised how many times I hear, "I don't know". The second question I ask, is what makes a record unique, again you would be surprised in the answers.

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

79489490

Date: 2025-03-06 13:21:21
Score: 2
Natty:
Report link

You could request a test notification in production to see how long it takes.

https://developer.apple.com/documentation/AppStoreServerAPI/POST-v1-notifications-test

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

79489488

Date: 2025-03-06 13:20:21
Score: 3.5
Natty:
Report link

Yes, the language and region change to English (United states) helped.

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

79489483

Date: 2025-03-06 13:19:21
Score: 3.5
Natty:
Report link

this is also the necessary requirement

  1. List item
Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Ani

79489477

Date: 2025-03-06 13:18:20
Score: 0.5
Natty:
Report link

The issue is with how the /D option is used—it needs to be applied to the forfiles command directly, not inside the cmd /c part.

Try modifying your code like this:

echo off
forfiles /p "c:\users\J33333\Desktop\DDrive\test" /s /m "TS*.xmt" /D -30 /c "cmd /c del @file"
exit

Here's the breakdown:

This should delete only the files that match both criteria: filenames starting with "TS" and older than 30 days.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @file
  • User mentioned (0): @file
  • Low reputation (0.5):
Posted by: hmu535

79489471

Date: 2025-03-06 13:16:20
Score: 2
Natty:
Report link

Run these 2 commands and then install git

sudo apt update
sudo apt upgrade
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nishtha Jain

79489469

Date: 2025-03-06 13:16:20
Score: 3
Natty:
Report link

Youre skibidi,

But your kaas and eat kaas

Ask your mentor about this, oh nevermind He hates you !

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

79489462

Date: 2025-03-06 13:11:19
Score: 1
Natty:
Report link

To identify and solve this problem, you could use OCR and anomaly detection. Firstly, fetch structured data from the images using Tesseract OCR or google Vision API then, clean and organize them in data frame. The usage of statistical methods like mean, IQR and standard deviation or ML models like Isolation, Forest, Autoencoders, Clustering can detect unusual number of event counts. Categorize zero values by comparing them with typical patterns of the past time period to determine if they are intended or error, At the very end, weed out wrong-flagged anomalies and enhance the detection model.

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

79489459

Date: 2025-03-06 13:11:19
Score: 0.5
Natty:
Report link
import {
  to = aws_iam_role.devops
  id = "devops"
}

resource "aws_iam_role" "devops" {
  assume_role_policy = jsonencode({}) # This is a required field, make it an empty poliy
}

Then run terraform apply (or tofu apply).

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

79489454

Date: 2025-03-06 13:10:19
Score: 2.5
Natty:
Report link

change the link in the "use application" activity. So that it targets in the browser of your choice.

Once this is done, it should open the selected browser.

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

79489453

Date: 2025-03-06 13:10:19
Score: 2
Natty:
Report link

I had a very similar issue with nginx proxy manager.
after hours of debugging decided to see if this issue could be related to the nginx/proxy manager itself.
I switched to Caddy and everything worked without any issue.
so I guess it was related somehow to NPM.

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

79489451

Date: 2025-03-06 13:10:19
Score: 1.5
Natty:
Report link

I had it working with only ignoredPaths: ['customs'],

I have not checked this but it will probably ignore everything that's coming from this path

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

79489447

Date: 2025-03-06 13:09:18
Score: 1
Natty:
Report link

Ok, so, the answer I used looked like this:

class MyClassName(App):
    def __init__(self, **kwargs):
        super(MyClassName, self).__init__(**kwargs)
        Clock.schedule_once(lambda dt: self.place_canvas(), timeout=0.01)
    #Create card
    card1 = Factory.CardGL()

    #Placing card in scrolling layout
    sm.get_screen('sm3').ids.Dashboard_SM_1.get_screen('DB_MAIN').ids.DB_MAIN_BL_T_01.add_widget(card1)
    sm.get_screen('sm3').ids.Dashboard_SM_1.get_screen('DB_MAIN').ids['card_1'] = weakref.ref(card1)




    def place_canvas(self):
        self.core_item = sm.get_screen('sm3').ids.Dashboard_SM_1.get_screen('DB_MAIN')
        self.bound_item = self.core_item.ids.card_1
        self.size_out = StringProperty()
        self.pos_out = StringProperty()
        self.size_out = self.bound_item.size
        self.pos_out = self.bound_item.pos
        self.bound_item.canvas.add(RoundedRectangle(source = self.GS_IMG_LSRC, pos = self.pos_out, size = self.size_out))
        # Header
        cardtopgl = Factory.CardTopGL()
        self.core_item.ids.card_1.add_widget(cardtopgl)
        self.core_item.ids['cardtop_gl'] = weakref.ref(cardtopgl)
        cardtopbt = Factory.CardTopBT(text='[b]Grocery[/b]')
        self.core_item.ids.cardtop_gl.add_widget(cardtopbt)



I didn't need to change any of the .kv stuff, and I've eliminated some of the other things I put in the card for berevities sake, but this should give a picture of what solved my issue. Basically I just made python wait until the object was rendered and placed before putting anything in it. This probably isn't the most ideal solution, but it works for my needs atm.

Thanks to the people who commented, even though I didn't use your exact solution, it took me down the road to find what I needed.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Brian Linden

79489441

Date: 2025-03-06 13:04:17
Score: 4.5
Natty:
Report link

I have resolved my query. What I was wanting to do was to calculate the overtime based on the Total Number of hours worked in a week, the standard hours being 40 per week and 8 per day. Overtime is only paid once both thresholds are breached. Thank you all for your help, it was veery much appreciated. Especially Black cat, as the reminder about SUM(FILTER()) function was key.

Kind Regards, John

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): Regards
  • Blacklisted phrase (1): appreciated
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: John Hendrick

79489432

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

colors = colorgram.extract('images.jpg', 1000) we can pass upper limit of number so it will give the no. of color present example it have 100 then it will give you 100 so we can set the limit higher

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

79489431

Date: 2025-03-06 13:01:16
Score: 0.5
Natty:
Report link

Your issue is likely due to missing font support for non-English characters in the web export.

Try these fixes:

  1. Use a Unicode Font: Import a font like Noto Sans or Arial Unicode and set it in Project Settings > GUI > Theme > Default Font. \
  2. Use DynamicFont: Create a DynamicFont resource, load a TTF/OTF font, and apply it to UI elements. \
  3. Ensure Fonts Are Included in Export: Check export_presets.cfg to make sure the font is bundled. \
  4. Test Encoding: Print different language characters in the console to see if they are processed correctly.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Qasim Leo

79489428

Date: 2025-03-06 13:00:16
Score: 4.5
Natty:
Report link

Got it! it was a problem with the port. Fixed now! Thanks you

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

79489427

Date: 2025-03-06 12:59:16
Score: 0.5
Natty:
Report link

You shouldn't run Spark inside Airflow, especially on MWAA, which uses the Celery Executor by default (tasks share the same compute). Airflow is designed for workflow orchestration, not heavy data processing. Running Spark directly within Airflow tasks will inevitably lead to resource contention and potential failures due to MWAA’s limited compute resources.

Instead, offload the Spark job to a dedicated service like AWS Glue or EMR & use the Airflow operators to trigger these services. See here for example operator for Glue.

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

79489422

Date: 2025-03-06 12:57:15
Score: 1
Natty:
Report link

Posting this in case anyone needs it nowadays.

You can check it out here inside the Unpack Profile section.

A provisioning profile is a property list wrapped within a Cryptographic Message Syntax (CMS) signature. To view the original property list, remove the CMS wrapper using the security tool:

% security cms -D -i Profile_Explainer_iOS_Dev.mobileprovision -o Profile_Explainer_iOS_Dev-payload.plist
% cat Profile_Explainer_iOS_Dev-payload.plist 
…
<dict>
  … lots of properties …
</dict>
</plist>
Reasons:
  • Blacklisted phrase (0.5): check it out
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Franco Angulo

79489419

Date: 2025-03-06 12:56:15
Score: 2
Natty:
Report link

I got the same error. The ICS file is probably not valid. You can open it on other operating systems, but it's not working in Safari. Check if your ICS file is valid—I used this page to validate it: https://icalendar.org/validator.html.

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

79489414

Date: 2025-03-06 12:55:14
Score: 1
Natty:
Report link

In 2025 there is:

text-indent: 3em each-line;

however it's currently not supported by Chromium.

It sets text indent for every new line in the textarea (it doesn't apply to wraped text).

More info here

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

79489413

Date: 2025-03-06 12:54:14
Score: 1
Natty:
Report link

yii\base\ErrorException: Undefined variable $start in /var/www/tracktraf.online/frontend/controllers/TelegramController.php:197 Stack trace: #0 /var/www/tracktraf.online/frontend/controllers/TelegramController.php(197): yii\base\ErrorHandler->handleError() #1 [internal function]: frontend\controllers\TelegramController->actionRotatorCheck() #2 /var/www/tracktraf.online/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array() #3 /var/www/tracktraf.online/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams() #4 /var/www/tracktraf.online/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction() #5 /var/www/tracktraf.online/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction() #6 /var/www/tracktraf.online/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest() #7 /var/www/tracktraf.online/frontend/web/index.php(18): yii\base\Application->run() #8 {main}

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

79489409

Date: 2025-03-06 12:52:14
Score: 2.5
Natty:
Report link

I attempted to make a smooth snake game, but i didnt add the curved junctions because i used div boxes as snake parts, here it is:

https://github.com/meedo-blip/meedo-blip.github.io

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