79536817

Date: 2025-03-26 17:40:31
Score: 0.5
Natty:
Report link

Update 2025, March, for Windows:

Multiple ways exist.

Fast, easy and expensive:

  1. Open the virtual machine in the Azure Portal

  2. Navigate to Monitoring/Insights and enable it

  3. Wait for everything to be set up and the first data to be propagated (5 minutes should be good). Refresh the page and you should see it.

Fast, somewhat complicated, way less expensive:

  1. Do the steps from "Fast, easy and expensive", but when you do it, make sure to note the "Data collection rule"

  2. Navigate to the previously noted Data collection rule

  3. Below Configuration/Data sources select Performance Counters
    Performance counters overview

  4. Select Custom and enter your counters. Replace X here with the Diskletters you need. If a letter does not exist on a VM, it's ignored. Don't forget to click Add

    Add custom performance counters

  5. Useful counters for Disk utilization are (X again placeholder):
    \LogicalDisk(X:)\Free Megabytes
    \LogicalDisk(X:)\% Free Space

  6. Select the newly added counters and click on Destinations:
    Selection of newly added counters

  7. Click on Add destination and add a new Destination, remove the existing one
    Destination adaptation

  8. Click on save

  9. Navigate back to the virtual machine where you started to and open Monitoring/Metrics and adjust the Metric Namespace. There you can find your Metrics:View Disk metrics on the machine

P.S.: To get a list of all counters available on your machine, run typeperf -q in a Powershell, run typeperf -q -? to get help on the command.

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

79536804

Date: 2025-03-26 17:33:29
Score: 1
Natty:
Report link

You could use the method on Color :

.toARGB32()
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
Posted by: thetrutz

79536798

Date: 2025-03-26 17:31:29
Score: 4
Natty:
Report link

Well when you're using FormData to submit your receipt with images, the request.body is getting processed differently than with regular JSON payloads, causing your permission guard to not properly access the employee credentials.

The main problem is that when using FileFieldsInterceptor or any file upload interceptors, the form data fields are parsed differently. Your guard is trying to destructure employeeCode and employeePassword directly from request.body, but with multipart/form-data, these might be coming in as strings rather than as part of a JSON object.

import {
  CanActivate,
  ExecutionContext,
  ForbiddenException,
  Injectable,
  UnauthorizedException,
} from '@nestjs/common'
import { PrismaService } from '../prisma/prisma.service'
import { PermissionEnum } from '@prisma/client'
import { Reflector } from '@nestjs/core'
import { compare } from 'bcryptjs'

@Injectable()
export class PermissionGuard implements CanActivate {
  constructor(
    private prisma: PrismaService,
    private reflector: Reflector,
  ) {}

  async canActivate(context: ExecutionContext): Promise<boolean> {
    const requiredPermission = this.reflector.get<PermissionEnum>(
      'permission',
      context.getHandler(),
    )

    if (!requiredPermission) {
      return true
    }

    const request = context.switchToHttp().getRequest()
    const tokenId = request.user?.sub
    const isCompany = request.user?.pharmacy
    
    // Handle both JSON and FormData formats
    let employeeCode, employeePassword
    
    if (request.body) {
      // Handle FormData - values will be strings
      employeeCode = request.body.employeeCode || request.body.employee_code
      employeePassword = request.body.employeePassword || request.body.employee_password
    }

    if (!tokenId) {
      throw new UnauthorizedException('User not authenticated')
    }

    let permissions: PermissionEnum[] = []

    if (isCompany) {
      // If company login, we need employee validation
      if (!employeeCode || !employeePassword) {
        throw new UnauthorizedException({
          statusText: 'unauthorized',
          message: 'Employee credentials required',
        })
      }

      const company = await this.prisma.company.findFirst({
        where: { id: tokenId },
        include: {
          employees: true,
        },
      })

      if (!company) {
        throw new UnauthorizedException({
          statusText: 'unauthorized',
          message: 'Farmácia não encontrada',
        })
      }

      const employee = company.employees.find(
        (employee) => employee.code === employeeCode,
      )

      if (!employee) {
        throw new UnauthorizedException({
          statusText: 'unauthorized',
          message: 'Funcionário não encontrado',
        })
      }

      const isPasswordValid = await compare(employeePassword, employee.password)

      if (!isPasswordValid) {
        throw new UnauthorizedException({
          statusText: 'unauthorized',
          message: 'Credenciais incorretas',
        })
      }

      permissions = employee.permissions
    } else {
      const user = await this.prisma.user.findFirst({
        where: {
          id: tokenId,
        },
      })

      if (!user) {
        throw new UnauthorizedException({
          statusText: 'unauthorized',
          message: 'User not found',
        })
      }

      const pharmacy = user?.pharmacies[0]?.pharmacy
      if (!pharmacy) {
        throw new UnauthorizedException({
          statusText: 'unauthorized',
          message: 'Company not encontrada',
        })
      }

      permissions = user.pharmaceutical.permissions
    }

    const hasPermission = permissions.some(
      (perm) => perm === requiredPermission,
    )

    if (!hasPermission) {
      throw new ForbiddenException(`Does not have the required permission: ${requiredPermission}`)
    }

    return true
  }
}

Key changes I made to fix your issue:

  1. More flexible field parsing: The updated guard now checks for different possible field names (employeeCode/employee_code) since form fields are sometimes sent with underscores.

  2. Null checking: Added validation to ensure the employee credentials are present when company login is detected.

  3. Better error handling: More descriptive error messages to help debug authentication issues.

  4. Safe property access: Added optional chaining in the user pharmacy access to avoid potential undefined errors.

If you're still having issues, you could also consider implementing a custom middleware specifically for handling employee authentication in FormData requests, which would run before your guard and populate request.body with the parsed credentials.

Reasons:
  • Blacklisted phrase (1): não
  • RegEx Blacklisted phrase (2): encontrada
  • RegEx Blacklisted phrase (2): encontrado
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ayodeji Erinfolami

79536788

Date: 2025-03-26 17:28:28
Score: 5.5
Natty: 4.5
Report link

Whereas i need an output as show below. Any suggestions on the fastest method, without using loop?

    in_column  out_column
0   5           1
1   5           2
2   5           3
3   8           1
4   13          1
5   13          2
6   13          3
7   13          4
8   13          5
Reasons:
  • Blacklisted phrase (0.5): i need
  • RegEx Blacklisted phrase (2): Any suggestions
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Vishal Narsinghani

79536787

Date: 2025-03-26 17:28:28
Score: 2
Natty:
Report link

I managed to make it work using 64Bit version of msbuild as this would address the x64 tools.

"C:\Program Files\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\MSBuild.exe" "C:\Path\To\YourSolution.sln" /p:Configuration=Release /p:Platform=x64

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

79536780

Date: 2025-03-26 17:23:26
Score: 3
Natty:
Report link

You are right, React Admin does bring MUI in it's own dependencies.

However I believe package managers that use PnP (namely PNPM) are more strict regarding the dependencies: if you import from, say, @mui/material, directly in your own code, then you need to add an explicit dependency on @mui/material. The transitive dependency through react-admin is no longer sufficient.

Also, React Admin v5.6.4 included a fix to improve compatibility with some package managers, namely PNPM.

Does using this version help fix your issue?

Reasons:
  • RegEx Blacklisted phrase (1.5): fix your issue?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: slax57

79536778

Date: 2025-03-26 17:23:26
Score: 0.5
Natty:
Report link

Thanks to Friede, I've made a function to calculate the distance of many points along a line. Posting here in case this is useful for future reference. https://gist.github.com/wpetry/bb85a1ec3c408b2ab5dae17bd1e7771c

v_distance_along <- function(points, line, dist_unit = "km") {
  # packages
  require(sf)
  require(sfnetworks)
  require(dplyr)
  require(units)
  # check inputs
  if (!inherits(points, "sf") && !inherits(points, "sfc")) {
    stop("'points' must be an sf or sfc object containing POINT or MULTIPOINT geometries.")
  }
  if (!inherits(line, "sf") && !inherits(line, "sfc")) {
    stop("'line' must be an sf or sfc object containing a LINESTRING or MULTILINESTRING geometry.")
  }
  if (!all(st_geometry_type(points) %in% c("POINT", "MULTIPOINT"))) {
    stop("The second argument must be POINT or MULTIPOINT geometries.")
  }
  if (!st_geometry_type(line) %in% c("LINESTRING", "MULTILINESTRING")) {
    stop("The first argument must be a LINESTRING or MULTILINESTRING.")
  }
  if (is.na(sf::st_crs(points)) | is.na(sf::st_crs(line))) {
    stop("Both 'points' and 'line' must have a defined coordinate reference system (see ?st_crs).")
  }
  if (sf::st_is_longlat(points) | sf::st_is_longlat(line)) {
    stop("")
  }
  if (sf::st_crs(points) != sf::st_crs(line)) {
    stop("'points' and 'line' must have the same coordinate reference system (see ?st_crs).")
  }
  if (!units::ud_are_convertible(dist_unit, "meter")) {
    stop("'dist_unit' must be a valid unit of length.")
  }
  line <- sf::st_cast(line, "LINESTRING")  # ensure single LINESTRING
  path <- sfnetworks::as_sfnetwork(sf::st_as_sf(sf::st_sfc(line$geometry)),
                                   directed = FALSE)
  near <- sf::st_nearest_points(points, line)
  snap <- suppressWarnings(sf::st_sfc(lapply(near, function(l) sf::st_cast(l, "POINT")),
                                      crs = sf::st_crs(line)))
  pathx <- sfnetworks::st_network_blend(path, snap)  # add snapped points to network
  dist <- pathx |>
    sfnetworks::activate("edges") |>
    sf::st_as_sf() |>
    dplyr::mutate(length = sf::st_length(x)) |>
    sf::st_drop_geometry() |>
    dplyr::mutate(dist = round(cumsum(units::set_units(length - length[1], dist_unit,
                                                       mode = "standard")), 1),
                  from = dplyr::case_when(  # re-order vertices, moving line end to last position
                    from == 1L ~ 1L,
                    from == 2L ~ max(from),
                    from >= 3L ~ from - 1L,
                  )) |>
    dplyr::select(from, dist)
  return(dist)
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): thx
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Will

79536770

Date: 2025-03-26 17:19:25
Score: 0.5
Natty:
Report link

I am able to get AEST timezone date time with below approach:

       let queryDate = result.values[1];
                    let queryDateObj = new Date(queryDate);
                    log.audit("queryDateObj",queryDateObj);
                    let ASTTimeZone = format.format({
                        value:queryDateObj,
                        type:format.Type.DATETIME,
                        timezone:format.Timezone.AUSTRALIA_SYDNEY
                    });
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Maira S

79536769

Date: 2025-03-26 17:18:25
Score: 0.5
Natty:
Report link

The proposed code from @Yuvraj is not working, because it still creates link, but now this link is a JS code:

127.0.0.1 - - [26/Mar/2025 16:33:59] "POST / HTTP/1.1" 200 -
127.0.0.1 - - [26/Mar/2025 16:33:59] "GET /(function%20(factory,%20window)%20{%20%20%20%20//%20define%20an%20AMD%20module%20that%20relies%20on%20'leaflet'%20%20%20%20if%20(typeof%20define%20=== HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2025 16:33:59] "GET /.leaflet-control-measure%20{%20%20%20%20background-color:%20 HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2025 16:34:00] "GET /(function%20(factory,%20window)%20{%20%20%20%20//%20define%20an%20AMD%20module%20that%20relies%20on%20'leaflet'%20%20%20%20if%20(typeof%20define%20=== HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2025 16:34:00] "GET /.leaflet-control-measure%20{%20%20%20%20background-color:%20 HTTP/1.1" 404 -

But, thanks to him I've found two other options

First option: static links

This will still create "localhost:port/leaflet.measure.js" and "localhost:port/leaflet.measure.css" links in header of final HTML page:

from jinja2 import Template
from folium.elements import JSCSSMixin
from folium.utilities import parse_options


class Measure(JSCSSMixin):
    _template = Template(
        """
        {% macro script(this, kwargs) %}
            var {{ this.get_name() }} = new L.control.measure(
                {{ this.options|tojson }});
            {{this._parent.get_name()}}.addControl({{this.get_name()}});
        {% endmacro %}
        """
    )

    # send static file from localhost via flask
    default_js = [("leaflet.measure.js", "leaflet.measure.js") ]
    default_css = [("leaflet.measure.css", "leaflet.measure.css") ]

    def __init__(self, embedded=True, **kwargs):
        super().__init__()
        self._name = "Measure"
        self.options = parse_options(**kwargs)

But we will resolve them with flask static file serving:

@app.route('/leaflet.measure.js', methods=['GET'])
def foo():
    return app.send_static_file('leaflet.measure.js')


@app.route('/leaflet.measure.css', methods=['GET'])
def baz():
    return app.send_static_file('leaflet.measure.css')

Second option: xzibit style, based on @Yuvraj idea

Inject JS/CSS code directly from static files from python package, no additional requests, no flask code modifications needed:

#  https://github.com/python-visualization/folium/blob/main/folium/elements.py
#  https://github.com/python-visualization/branca/blob/main/branca/element.py
#  https://github.com/python-visualization/folium/blob/main/folium/plugins/measure_control.py
import importlib.resources
from jinja2 import Template
from branca.element import Figure
from folium.elements import JSCSSMixin  # inherits from branca.element.MacroElement
from folium.utilities import parse_options


# I heard that you like templates, now you can inject template inside template, while injecting template to main template
class TemplateInjector:
    """ Class with compatible API for branca.element.Element to be added as a child to folium map
        It must have render() and get_name()
    """
    def __init__(self, name: str, template: Template):
        self._name = name
        self._template = template

    def render(self, **kwargs) -> str:
        return self._template.render(this=self, kwargs=kwargs)

    def get_name(self) -> str:
        return self._name


class Measure(JSCSSMixin):
    # will be self._template for all created class objects
    #   see MacroElement in <https://github.com/python-visualization/branca/blob/main/branca/element.py>
    _template = Template(
        """
        {% macro script(this, kwargs) %}
            var {{ this.get_name() }} = new L.control.measure(
                {{ this.options|tojson }});
            {{this._parent.get_name()}}.addControl({{this.get_name()}});
        {% endmacro %}
        """
    )

    # reload JSCSSMixin method
    def render(self, **kwargs):
        figure = self.get_root()
        assert isinstance(figure, Figure), "You cannot render this Element if it is not in a Figure."

        # load JS code and push it into template
        leaflet_measure_js = importlib.resources.files('geo_plotter').joinpath("static/leaflet.measure.js").read_text()
        js_template = Template(f"<script>{leaflet_measure_js}</script>")
        # push template into header
        figure.header.add_child(TemplateInjector("leaflet_measure_js", js_template))

        # load CSS code and push it into template
        leaflet_measure_css = importlib.resources.files('geo_plotter').joinpath("static/leaflet.measure.css").read_text()
        css_template = Template(f"<style>{leaflet_measure_css}</style>")
        # push template into header
        figure.header.add_child(TemplateInjector("leaflet_measure_css", css_template))

        super().render(**kwargs)

    def __init__(self, embedded=True, **kwargs):
        super().__init__()
        self._name = "Measure"
        self.options = parse_options(**kwargs)
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): this link
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Yuvraj
  • User mentioned (0): @Yuvraj
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: banderlog013

79536767

Date: 2025-03-26 17:18:25
Score: 4
Natty:
Report link

This might be helpful. Works with Notebooks as well.

https://community.fabric.microsoft.com/t5/Data-Pipeline/Move-pipelines-objects-between-workspaces/m-p/4027112

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

79536763

Date: 2025-03-26 17:16:24
Score: 2
Natty:
Report link

I looked into this since it was an issue i was facing also. Aparently this is a bug that has been around for a longer period as described in this issue.

The bug was related to files being added to uploaded files even if upload failed. I created a PR for it that has now been merged. And from prime vue version 4.3.3 files will not show up as completed after an upload failure anymore. They wont show up as failed either, but that can be done outside of component if you listen to the @error event.

Reasons:
  • No code block (0.5):
  • User mentioned (1): @error
  • Low reputation (0.5):
Posted by: Achtung

79536744

Date: 2025-03-26 17:09:22
Score: 1
Natty:
Report link

Right Click the file you want to read -> Copy Path -> Paste the path in your code, where you want to use it.

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

79536743

Date: 2025-03-26 17:09:22
Score: 1.5
Natty:
Report link

This will provide the desired assignment for currentValue:

var currentValue = pin1[i, 0] < 0 ? ++postNeg : ++postPos;
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Wynsler

79536726

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

use this


        showAvatarForEveryMessage
        renderAvatar={() => null}
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Кирилл Осипов

79536722

Date: 2025-03-26 17:01:20
Score: 1
Natty:
Report link

I have a S3 bucket with an event notification triggering a Lambda function. Whenever a file is uploaded to the S3, the Lambda function will go through AWS Systems Manager which is built in to most EC2's including Windows, to use Powershell to call a AWS Cli copy job to the EC2 folder that you define.

As far as the IAM roles go, the Lambda function will need AWS Systems Manager access e.g. "AmazonSSMFullAccess" policy which is likely too much but it'll work, along with S3 access to read the objects. Your EC2's IAM role will need the minimum following policies: "AmazonSSMManagedInstanceCore", and depending on what else you're doing, possibly "AmazonEC2FullAccess" and "AmazonS3FullAccess". Again, the "full access" policies are far too much but it'll work and from there, just downgrade to a lower policy to ensure that your Lambda is still working.

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

79536721

Date: 2025-03-26 17:00:20
Score: 0.5
Natty:
Report link

You can sort and filter your required workspace changes with the 'Sort' feature available in VS Code.

  1. On VS Code's Activity bar (left side pane), go to the Source Control view and click the three dots adjacent to the SOURCE CONTROL panel to view the options
  2. Then, expand the "View & Sort" menu
  3. Select the "View as Tree" option
  4. Now you can collapse all the inactive directories and expand only the current workspace to view the changes accordingly
Reasons:
  • No code block (0.5):
Posted by: Angela Amarapala

79536718

Date: 2025-03-26 16:58:19
Score: 3
Natty:
Report link

In my case, I had this stackoverflow due to the missing of @Service at UserDetailsService implementation:

2025-03-26T13:52:17.882-03:00 ERROR 14543 --- [image-processor-api] [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.StackOverflowError] with root cause

java.lang.StackOverflowError: null
    at java.base/java.lang.Exception.<init>(Exception.java:103) ~[na:na]
    at java.base/java.lang.ReflectiveOperationException.<init>(ReflectiveOperationException.java:90) ~[na:na]
    at java.base/java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:67) ~[na:na]
@Service
public class UserDetailsServiceImpl implements UserDetailsService {

I'd put it and problem solved :D

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Blacklisted phrase (1): StackOverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Service
  • Low reputation (1):
Posted by: robertomessabrasil

79536715

Date: 2025-03-26 16:58:19
Score: 3
Natty:
Report link

I create account oracle cloud free tier then I sign in first time, require enable secure verification but not show select a method

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

79536709

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

For me helped next:

  1. Turn on windows Developer Mode via Windows Settings (Open Windows Settings, search for Developer settings or Go to Update & Settings then For developers. Toggle the Developer Mode setting, at the top of the For developers page. Read the disclaimer for the setting you choose. Click Yes to accept the change)

  2. Setup nvm 1.1.12 (not newest, bcs it doesn't correctly setup npm) https://github.com/coreybutler/nvm-windows/releases/download/1.1.12/nvm-setup.zip

  3. If you don't have any installed NodeJs, then during installation specify path to nmv: D:\Programs\nvm - dont use disk C: Then installer will be asked to install nodejs, specify path to D:\Programs\nodejs - don’t use disk C:

  4. after installation check is powershell/terminal recognizing nvm alias - if not then setup environment variables (Win+R then input: sysdm.cpl then Advanced tab) Open Path variable - edit it - input next:

d:\Programs\nvm
d:\Programs\nodejs\

  1. install needed nodejs version: nvm install 12.19.1

  2. activate installed nodejs version: nvm use 12.19.1

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

79536697

Date: 2025-03-26 16:48:17
Score: 0.5
Natty:
Report link

With <ReferenceLine /> and its segment property, it's possible:

<ReferenceLine
  x={14}
/>
<ReferenceLine
  segment={[
    {
      x: 14,
      y: 1200,
    },
    {
      x: 14,
      y: 1050,
    },
  ]}
/>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hugo Levet

79536688

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

Using

brew services start postgresql

will start the postgres service AND launch it on start. You should instead use

brew services stop postgresql
brew services run postgresql

To simply start the service, but not launch it later on boot

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

79536684

Date: 2025-03-26 16:44:16
Score: 4
Natty: 4
Report link

This seems to be caused, according to my personal experience, by a schema conflict. YMMV.

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

79536680

Date: 2025-03-26 16:40:15
Score: 2
Natty:
Report link

If you've hidden all the action buttons and have nothing left to right click, use the View: Reset All Menus command in the command palette.

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

79536679

Date: 2025-03-26 16:40:15
Score: 3
Natty:
Report link

Same understanding here. Do you usually communicate through which platform? If meta wont help, we need to help ourselves :D

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

79536673

Date: 2025-03-26 14:09:38
Score: 1
Natty:
Report link

I found this answer which gives clear steps:

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

79536669

Date: 2025-03-26 14:08:38
Score: 0.5
Natty:
Report link

For short answer, in this case, I would use second option.

For longer answer:

Raise Exception Within Python:

Using the save method with a ValueError is checked within the python code, it can add overhead for each time save method is called and it wont evaluate inserted data.

But if you need to check more complex code which database engine cant handle or add custom exceptions, it is better to use first option.

Using CheckConstraint:

Using second option, evaluation is done by database engine, what is more efficient that python and it also can validate inserted data. In this case it would be better to use db engine to validate, to also check insert data and keep it closer to source. If check is simple enought for database engine, use CheckConstraint method.

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

79536664

Date: 2025-03-26 14:06:37
Score: 2
Natty:
Report link

This solved my issue

sudo apt-get install libstdc++-14-dev

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

79536658

Date: 2025-03-26 14:05:37
Score: 1.5
Natty:
Report link

This solved my issue

sudo apt-get install libstdc++-14-dev

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

79536657

Date: 2025-03-26 14:05:37
Score: 2.5
Natty:
Report link
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{

    public function up(): void
    {
        Schema::create('produtos', function (Blueprint $table) {
            $table->id();
            $table->string('nome');
            $table->decimal('preco', 8, 2);
            $table->timestamps();
        });
    }


    public function down(): void
    {
        Schema::dropIfExists('produtos');
    }
};

?>


<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Produto extends Model
{
    use HasFactory;
    protected $fillable = ['nome', 'descricao', 'preco']; // Adicione todos os campos que você deseja permitir para atribuição em massa

}




<?php

namespace App\Http\Controllers;
use App\Models\Produto;

use Illuminate\Http\Request;

class ProdutoController extends Controller
{
    public function index()
    {
        return response()->json(Produto::all());
    }

    public function store(Request $request)
    {
        $request->validate([
            'nome' => 'required|string|max:255',
            'preco' => 'required|numeric',
        ]);

        $produto = Produto::create($request->all());
        return response()->json($produto, 201);
    }

    public function show($id)
    {
        $produto = Produto::findOrFail($id);
        return response()->json($produto);
    }

    public function update(Request $request, $id)
    {
        $produto = Produto::findOrFail($id);
        $produto->update($request->all());
        return response()->json($produto);
    }

    public function destroy($id)
    {
        Produto::destroy($id);
        return response()->json(null, 204);
    }
}



<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

use App\Http\Controllers\ProdutoController;

Route::get('produtos', [ProdutoController::class, 'index']);
Route::post('produtos', [ProdutoController::class, 'store']);
Route::get('produtos/{id}', [ProdutoController::class, 'show']);
Route::put('produtos/{id}', [ProdutoController::class, 'update']);
Route::delete('produtos/{id}', [ProdutoController::class, 'destroy']);
Reasons:
  • Blacklisted phrase (3): você
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: luan araujo

79536645

Date: 2025-03-26 14:00:36
Score: 11 🚩
Natty: 6
Report link

were you able to solve this? I am facing a similar issue with servereless pyspark. It's just that I am reading a path in a zip file passed through --archives using a Java code that runs through a JAR provided using --jars file

Reasons:
  • Blacklisted phrase (1): you able to solve
  • RegEx Blacklisted phrase (1.5): solve this?
  • RegEx Blacklisted phrase (3): were you able
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): I am facing a similar issue
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Akshay

79536644

Date: 2025-03-26 14:00:36
Score: 3.5
Natty:
Report link

It's not possible to get any extra information about what's unsaved in the Visio Application without making a custom method for it, by doing a full file comparison.

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

79536639

Date: 2025-03-26 13:58:35
Score: 0.5
Natty:
Report link

DateTimeFormatterBuilder.parseDefaulting()

Perhaps surprising this formatter works for your task:

    private static final DateTimeFormatter formatter
            = new DateTimeFormatterBuilder()
                    .appendPattern("uuuu[-MM[-dd['T'HH[:mm[:ss]]]]]")
                    .parseDefaulting(ChronoField.MONTH_OF_YEAR, 12)
                    .parseDefaulting(ChronoField.DAY_OF_MONTH, 31)
                    .parseDefaulting(ChronoField.HOUR_OF_DAY, 23)
                    .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 59)
                    .parseDefaulting(ChronoField.SECOND_OF_MINUTE, 59)
                    .parseDefaulting(ChronoField.NANO_OF_SECOND, 999_999_999)
                    .toFormatter(Locale.ROOT);

I have specified 31 as the day of month to pick when no day of month is in the string. For February 2025, which has 28 days, this gives — 2025-02-28T23:59:59.999999999, so the last day of February. It seems that java.time is smart enough to just pick the last day of the month.

Full demonstration:

    String[] inputs = { "2025", "2025-01", "2025-02", "2025-01-15", "2025-01-15T09", "2025-01-15T09:15" };
    for (String input : inputs) {
        LocalDateTime localDateTime = LocalDateTime.parse(input, formatter);
        System.out.format(Locale.ENGLISH, "%16s -> %s%n", input, localDateTime);
    }

Output:

            2025 -> 2025-12-31T23:59:59.999999999
         2025-01 -> 2025-01-31T23:59:59.999999999
         2025-02 -> 2025-02-28T23:59:59.999999999
      2025-01-15 -> 2025-01-15T23:59:59.999999999
   2025-01-15T09 -> 2025-01-15T09:59:59.999999999
2025-01-15T09:15 -> 2025-01-15T09:15:59.999999999

You said in a comment:

Yeah, but for simplification of the question lets truncate this Dates to the ChronoUnit.SECONDS and without zones :)

So just leave out .parseDefaulting(ChronoField.NANO_OF_SECOND, 999_999_999).

            2025 -> 2025-12-31T23:59:59
         2025-01 -> 2025-01-31T23:59:59
         2025-02 -> 2025-02-28T23:59:59
      2025-01-15 -> 2025-01-15T23:59:59
   2025-01-15T09 -> 2025-01-15T09:59:59
2025-01-15T09:15 -> 2025-01-15T09:15:59
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Filler text (0.5): 999999999
  • Low reputation (1):
Posted by: Lily Devi

79536629

Date: 2025-03-26 13:56:35
Score: 1
Natty:
Report link
  1. Windows+R
  2. type regedit
  3. find HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  4. set LongPathsEnabled to 1
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: CrazyEight

79536619

Date: 2025-03-26 13:53:33
Score: 13.5 🚩
Natty: 5.5
Report link

Did you find a solution to this issue? If so, how did you resolve it?

Reasons:
  • RegEx Blacklisted phrase (3): Did you find a solution to this
  • RegEx Blacklisted phrase (3): did you resolve it
  • RegEx Blacklisted phrase (1.5): resolve it?
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Did you find a solution to this is
  • Low reputation (1):
Posted by: Anas_LA

79536618

Date: 2025-03-26 13:52:33
Score: 2.5
Natty:
Report link

For future reference,
It seems using Remote config from a python server environment is possible now.
Use Remote Config in server environments - Python

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

79536605

Date: 2025-03-26 13:45:31
Score: 5
Natty: 6
Report link

This is such a clear answer! I created an account just to say thank you!

It seems that QtCreator can be a little less than ... intuitive?

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Grant_H

79536597

Date: 2025-03-26 13:43:30
Score: 2.5
Natty:
Report link

This behaviour is baffling for macOS users. Thankfully there are Settings options to tell VS Code to use the global macOS find clipboard: search for "global clipboard" in Settings and check both

See https://stackoverflow.com/a/77504043/403750

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

79536587

Date: 2025-03-26 13:40:29
Score: 4.5
Natty:
Report link

can't separate by semicolons as I want output plots in the notebook. it is so typical of computer or software responses. a guy asks a question, and no one gives a direct answer. instead, the guy gets a lecture on some view of how the world should be.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): can't
  • Low reputation (1):
Posted by: arby111

79536586

Date: 2025-03-26 13:40:29
Score: 3
Natty:
Report link

I have the same bug, horizontal lines are not showing !
I'm searching since 2hours now.

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

79536573

Date: 2025-03-26 13:34:28
Score: 3
Natty:
Report link

Use all small-case letters:
\> pip install simpleitk

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

79536568

Date: 2025-03-26 13:33:27
Score: 0.5
Natty:
Report link

I had to add a wildcard to make child routes work:

export const serverRoutes: ServerRoute[] = [
  {
    path: 'public/*',
    renderMode: RenderMode.Server,
  },
  {
    path: '**',
    renderMode: RenderMode.Client
  }
];
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: perotom

79536555

Date: 2025-03-26 13:28:25
Score: 5
Natty: 5
Report link

Do you remember, that you must use different "apiKey"/"secrets" sets for demo-treading and real-trading mode?

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

79536542

Date: 2025-03-26 13:22:24
Score: 1
Natty:
Report link

I know thats not the case here for this issue but sometimes the OS itself can hold on to that port for some reason, and because of that theres no PID attached to the port on the results of netstat or lsof commands

So basically you need to restart the port

sudo fuser -k 3000/tcp
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Matheus Schreiber

79536538

Date: 2025-03-26 13:21:24
Score: 1.5
Natty:
Report link

Late to the party here but VS 2022 has a Errors and warnings section. I added to the Suppress specific warnings section. Problem solved. I tried changing the warning level but it didn't change anything.

enter image description here

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

79536528

Date: 2025-03-26 13:18:23
Score: 1.5
Natty:
Report link
export BUNDLE_GITHUB__COM=<your-token-goes-here>

After that, just run the build.

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

79536522

Date: 2025-03-26 13:17:23
Score: 0.5
Natty:
Report link

Yes, you could export data to word doc. Here is the code:

import statsmodels.api as sm
import numpy as np
import pandas as pd
from docx import Document

np.random.seed(123)
data = pd.DataFrame({
    'X1': np.random.randn(100),
    'X2': np.random.randn(100),
    'Y': np.random.randint(0, 2, 100)
})

model = sm.Logit(data['Y'], sm.add_constant(data[['X1', 'X2']])).fit()

summary = model.summary2().tables[1]

doc = Document()
doc.add_heading('Regression Results', level=1)

table = doc.add_table(rows=summary.shape[0] + 1, cols=summary.shape[1])
table.style = 'Table Grid'

for j, col_name in enumerate(summary.columns):
    table.cell(0, j).text = col_name

for i in range(summary.shape[0]):
    for j in range(summary.shape[1]):
        table.cell(i + 1, j).text = str(round(summary.iloc[i, j], 4))

doc.save("Regression_Results.docx")
print("Regression table successfully exported to 'Regression_Results.docx'")

Output:

enter image description here

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

79536521

Date: 2025-03-26 13:16:22
Score: 2
Natty:
Report link

PortableApps https://portableapps.com/ works with Windows XP 32-bit and 64-bit, and there are often legacy apps for XP 32-bit. If you search for apps using PortableApps on the computer you should only find apps that works with this computer.

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

79536516

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

solution by Padi Amu worked for me

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

79536515

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

ERROR at line 1:

ORA-01702: a view is not appropriate here

You cannot create an Index on a view

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

79536512

Date: 2025-03-26 13:12:21
Score: 2.5
Natty:
Report link

I was having the exact same problem and creating my access token with read_api, read_registry and read_repository permissions fixed the problem.

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

79536508

Date: 2025-03-26 13:11:21
Score: 0.5
Natty:
Report link

Add this to your app.tsx and it will load the new page then scroll to the top.

useEffect(() => {
    window.scrollTo(0, 0);
}, [location.pathname]); // Trigger the effect when the pathname changes
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Sheikh Wahab Mahmood

79536505

Date: 2025-03-26 13:09:20
Score: 0.5
Natty:
Report link

DuckDB now proposes the following duckdb documentation page :

select array_to_string(['1', '2', 'sdsd'], '/')

which is a more compact way to write:

SELECT list_aggr(['1', '2', 'z'], 'string_agg', '-')

nb: it only works if all elements are of the same type

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

79536504

Date: 2025-03-26 13:08:20
Score: 1
Natty:
Report link

About FFTW3

  1. CMake do not providde a builtin find module
    ref: https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html

  2. FFTW provide a CMake based build
    ref: https://github.com/FFTW/fftw3/blob/master/CMakeLists.txt

  3. Unfortunately, Homebrew formulae use the autotool build system
    ref: https://github.com/Homebrew/homebrew-core/blob/dda17fba84547fddbcb4206679794de4b0852071/Formula/f/fftw.rb
    ref: https://formulae.brew.sh/formula/fftw#default

So you have to rely on providing your own find module...

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

79536501

Date: 2025-03-26 13:08:20
Score: 2.5
Natty:
Report link

After investigation on module traceback, I found my solution :

traceback.extract_stack()

And analyse list in many level (around 10) and I have found file and line of import.

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

79536495

Date: 2025-03-26 13:07:20
Score: 1
Natty:
Report link

It looks like the /# of the url in the port and path check causes the problem. You can add # to your check to fix it.

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

79536493

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

if you are trying to deploy form Oracle cloud shell, please make sure you select GENERIC_ARM shape, because the arch of the cloud shell machine is ARM.

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

79536485

Date: 2025-03-26 13:01:18
Score: 3.5
Natty:
Report link

would

@Async

still allow to make parallel call if you are not using any Future interface and return instead String object?

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

79536482

Date: 2025-03-26 13:00:18
Score: 2.5
Natty:
Report link

If any package reference is present under project reference that should not be present under package in test project dependency and the package version should be same as the project package version.

Spent lot of time and discovered the solution trying different options.

Thanks.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Saheli Nandi

79536475

Date: 2025-03-26 12:57:17
Score: 2
Natty:
Report link

For Ubuntu, maybe another Linux users.

I tried many solutions within this post, and they didn't even work on VSCode terminal, either because I am using Linux, or simply the command didn't output something. I tried the KISS approach and do it from terminal, instead of VSCode terminal, it requested username, which was the normal one for Github and the password, which is the classic token I have already generated, with it, the push request worked fine, and then, also worked as well on VSCode, most probably the IDE was having issues to authenticate me on Github, but as the terminal did, then everything worked out fine and keeps doing it.

Not the most clever approach, but it solved the authentication issue after 10 minutes of trying several answers within this post.

Reasons:
  • Blacklisted phrase (1.5): any solution
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Nicolás Gómez

79536474

Date: 2025-03-26 12:57:17
Score: 1
Natty:
Report link

Had the same Problem and the quartz scheduler dependency pulled in an incompatible jar. when the IDE setup the classpath these got mixed up and the instantiation failed due to the missing method.

Either upgrade/exclude the old dependency or let a build system like gradle or maven manage your classpath to exclude dependencies that differentiate classpaths for runtime and compiletime

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

79536448

Date: 2025-03-26 12:47:14
Score: 4.5
Natty:
Report link

Thank you very much - that is exactly what I was looking for.

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

79536445

Date: 2025-03-26 12:47:14
Score: 1
Natty:
Report link

I have a Blazor Hybrid Maui app that uses websocketclient. When user navigates away from the page, I need to gracefully close the connection. I use OnLocationChanged(). That should work for you as well.

private void OnLocationChanged(object? sender, LocationChangedEventArgs e)
{
    if (e.IsNavigationIntercepted)
    {
        // Handle the page closing event here
        ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "Page Closing", CancellationToken.None);
    }
}
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Scott Carter

79536442

Date: 2025-03-26 12:46:14
Score: 7 🚩
Natty: 6
Report link

Any update on this? Having exactly the same issue...

Reasons:
  • Blacklisted phrase (1): update on this
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): Having exactly the same issue
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: whiteBear22

79536435

Date: 2025-03-26 12:44:13
Score: 1.5
Natty:
Report link

1.Maybe you should check if the Redirect URLs in supabase are set correctly.

enter image description here

2.Check the web domain name setting of Service ID in Apple. The supabase documentation says that you need to add <project-id>.supabase.co

via: Login with Apple > Using the OAuth flow for web > Configuration

Configure Website URLs for the newly created Services ID. The web domain you should use is the domain your Supabase project is hosted on. This is usually .supabase.co while the redirect URL is https://.supabase.co/auth/v1/callback.

enter image description here

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

79536431

Date: 2025-03-26 12:43:13
Score: 3.5
Natty:
Report link

Maintainer here. It is really courious, it seems to be a problem with the C++ core function of division operator. I promise to check it and say you something. Thanks!

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

79536429

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

Worked for me on node-alpine:16 by adding and running:

apk add gcompat

Reasons:
  • Whitelisted phrase (-1): Worked for me
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jordan Sheinfeld

79536423

Date: 2025-03-26 12:39:12
Score: 1
Natty:
Report link

I know not answering the specific question as such but if you want to automatically populate a spreadsheet with the ISO week number then set the value in the cell to the google sheet function =WEEKNUM(TODAY(),21) in your App Script. A workaround for google sheets.

cell.setValue("=WEEKNUM(Today(),21)");
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Andrew Paine

79536417

Date: 2025-03-26 12:38:11
Score: 1.5
Natty:
Report link

Use the --async flag in your web app deploy command.

This will cause the command to poll for the status as opposed to waiting. The Azure LB will timeout after 230 seconds (link) so if your job is expected to take longer than that, use the --async flag.

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

79536411

Date: 2025-03-26 12:36:10
Score: 6.5 🚩
Natty: 6
Report link

Why not use ODBC insted of jdbc?

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Why not use
  • Low reputation (1):
Posted by: KM-Data

79536410

Date: 2025-03-26 12:35:10
Score: 1.5
Natty:
Report link
Finally, the solution was to enclose the TOSTMF parameter in a double apostrophe TOSTMF(''/REPORTS/xxxxxx.PDF'')
CALL QSYS2.QCMDEXC('CPYSPLF FILE(AUMENTO1) TOFILE(*TOSTMF) JOB(557767/RAB/AUMENTO1) SPLNBR(1) TOSTMF(''/REPORTES/xxxxxx.PDF'') STMFOPT(*REPLACE) WSCST(*PDF))'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: raabsoft

79536408

Date: 2025-03-26 12:35:09
Score: 8.5 🚩
Natty: 6
Report link

Just checking if you got any solution for this.. Please share if you found one. Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2.5): Please share
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Prabha

79536398

Date: 2025-03-26 12:33:08
Score: 2.5
Natty:
Report link

Recovery Companies of Jeff on TiKTOK is the best hacking organisation

For all social media hacking and recovery

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: 葉又慈

79536384

Date: 2025-03-26 12:27:07
Score: 2.5
Natty:
Report link

For macOS it's Cmd + Shift + V for preview in a new tab and Cmd + K (lift both keys) and then V for side-by-side preview.

See VSCode Markdown Guide for more info.

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

79536361

Date: 2025-03-26 12:19:05
Score: 1.5
Natty:
Report link

The onto:measurement in GraphDB reports the values in milliseconds. In this system, the total time for an event is the sum of all individual timing intervals recorded for that event. For cases with nested measurements, a net execution time is computed by subtracting the time spent in nested events from the total time.

For further technical details on onto:measurement, please refer to official GraphDB documentation, which is regularly enriched with additional information:
https://graphdb.ontotext.com/documentation

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

79536357

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

guyes don't do it because you will losse your data

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

79536324

Date: 2025-03-26 12:03:00
Score: 4
Natty:
Report link

The Solution i found working is to remove the connections of OpenGIS and add conda and place conda on top for the python bindings, currently conda works but to connect with geoserver i need to add the PYNOPATH variable manually everytime and delete it when i want to use normal python installed in the windows for daily tasks.

Reasons:
  • Blacklisted phrase (0.5): i need
  • RegEx Blacklisted phrase (1): i want
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Rupesh Kumar Yadav Mediboyina

79536323

Date: 2025-03-26 12:02:00
Score: 2
Natty:
Report link

I killed the task running at that port (in my case my react app at localhost:3000) using: npx kill-port 3000 and restarted my app as usual.

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

79536300

Date: 2025-03-26 11:52:58
Score: 0.5
Natty:
Report link

Since this question existed, I have repeatedly occupied myself with it, because I am also very interested in it. I have gained support here. https://discourse.gnome.org/t/gtk4-screenshot-with-gtksnapshot/27981/3?u=holger The problem is to get a "own" GtkSnapshot, which can then be converted into a GskTexture and printed out accordingly. It is important that the GtkWidget is already drawn.

In this example, I was guided by a contribution from April 2020. https://blog.gtk.org/


#include<gtk/gtk.h>

/* This is the important part */
void demo_snapshot(GtkWidget *widget, GtkSnapshot *snapshot);

void custom_snapshot(GtkWidget *widget) {
    GtkSnapshot *snapshot = gtk_snapshot_new();
    
        demo_snapshot(widget, snapshot);

    int w = gtk_widget_get_width(widget);
    int h = gtk_widget_get_height(widget);

        GskRenderNode *node = gtk_snapshot_free_to_node (snapshot);
    GskRenderer *renderer = gtk_native_get_renderer (gtk_widget_get_native (widget));
    GdkTexture *texture = gsk_renderer_render_texture (renderer,
                                       node,
                                       &GRAPHENE_RECT_INIT (0, 0, w,h ));
    gdk_texture_save_to_png (texture, "screenshot.png");

};

/* From here the GtkWidget to be printed begins*/

#define MY_TYPE_WIDGET (my_widget_get_type())
G_DECLARE_FINAL_TYPE (MyWidget, my_widget, MY, WIDGET, GtkWidget)

GtkWidget *my_widget_new();

/*********************************/

struct _MyWidget
{
    GtkWidget parent_instance;
};

struct _MyWidgetClass
{
    GtkWidgetClass parent_class;
};

G_DEFINE_TYPE(MyWidget, my_widget, GTK_TYPE_WIDGET)


void
demo_snapshot (GtkWidget *widget, GtkSnapshot *snapshot)
{
  GdkRGBA red, green, yellow, blue;
  float w, h;

  gdk_rgba_parse (&red, "red");
  gdk_rgba_parse (&green, "green");
  gdk_rgba_parse (&yellow, "yellow");
  gdk_rgba_parse (&blue, "blue");

  w = gtk_widget_get_width (widget) / 2.0;
  h = gtk_widget_get_height (widget) / 2.0;

  gtk_snapshot_append_color (snapshot, &red,
                             &GRAPHENE_RECT_INIT(0, 0, w, h));
  gtk_snapshot_append_color (snapshot, &green,
                             &GRAPHENE_RECT_INIT(w, 0, w, h));
  gtk_snapshot_append_color (snapshot, &yellow,
                             &GRAPHENE_RECT_INIT(0, h, w, h));
  gtk_snapshot_append_color (snapshot, &blue,
                             &GRAPHENE_RECT_INIT(w, h, w, h));
}


static void click_cb (GtkGestureClick *gesture,
                      int              n_press,
                      double           x,
                      double           y)
{
  GtkEventController *controller = GTK_EVENT_CONTROLLER (gesture);
  GtkWidget *widget = gtk_event_controller_get_widget (controller);

  custom_snapshot(widget);

  if (x < gtk_widget_get_width (widget) / 2.0 &&
      y < gtk_widget_get_height (widget) / 2.0)
     g_print ("Rot!\n");
  else if  (x > gtk_widget_get_width (widget) / 2.0 &&
      y > gtk_widget_get_height (widget) / 2.0)
      g_print ("Blau!\n");
  else if  (x > gtk_widget_get_width (widget) / 2.0 &&
      y < gtk_widget_get_height (widget) / 2.0)
      g_print ("Grün!\n");
  else if  (x < gtk_widget_get_width (widget) / 2.0 &&
      y > gtk_widget_get_height (widget) / 2.0)
      g_print ("Gelb!\n");
};

void
demo_measure (GtkWidget      *widget,
              GtkOrientation  orientation,
              int             for_size,
              int            *minimum_size,
              int            *natural_size,
              int            *minimum_baseline,
              int            *natural_baseline)
{
  *minimum_size = 100;
  *natural_size = 200;
};


static void my_widget_dispose(GObject *gobject)
{
    MyWidget *self = MY_WIDGET(gobject);
    G_OBJECT_CLASS (my_widget_parent_class)->dispose (gobject);
};

static void my_widget_class_init (MyWidgetClass *class)
{
    G_OBJECT_CLASS(class)->dispose = my_widget_dispose;
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
    // hier kein LayoutManager notwendig
    widget_class->snapshot = demo_snapshot;
    widget_class->measure = demo_measure;   

};

static void my_widget_init (MyWidget *self)
{
   
      GtkGesture *controller = gtk_gesture_click_new ();
          g_signal_connect_object (controller, "pressed",             
                            G_CALLBACK (click_cb), NULL,G_CONNECT_DEFAULT);
          gtk_widget_add_controller (GTK_WIDGET(self), GTK_EVENT_CONTROLLER(controller))
};

GtkWidget *my_widget_new()
{
    MyWidget *self;
    self = g_object_new(MY_TYPE_WIDGET,NULL);
    return GTK_WIDGET (self);
};

/************************************************************/

static void activate (GtkApplication *app, gpointer user_data)
{
    GtkWidget *window;
    window = gtk_application_window_new(app);
    GtkWidget *widget = my_widget_new();
    gtk_window_set_child(GTK_WINDOW(window),GTK_WIDGET(widget));
    gtk_window_present(GTK_WINDOW (window));

};

int main (int argc, char **argv)
{
    GtkApplication *app;
    int status;

    app = gtk_application_new("org.gtk.mywidget",
            G_APPLICATION_DEFAULT_FLAGS);
    g_signal_connect(app, "activate", G_CALLBACK(activate),NULL);
    status = g_application_run (G_APPLICATION(app), argc, argv);
    g_object_unref(app);
    return status;
}

enter image description here

Have fun trying.

Reasons:
  • Probably link only (1):
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
Posted by: Holger

79536288

Date: 2025-03-26 11:44:56
Score: 0.5
Natty:
Report link

The cc and bcc might still be null or an empty string ("") when being passed, even though you assigned them as an array. Modify the constructor assignment to always ensure an array.

 $this->cc = is_array($cc) ? $cc : [];
 $this->bcc = is_array($bcc) ? $bcc : [];
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Arif Hassan

79536280

Date: 2025-03-26 11:41:56
Score: 1
Natty:
Report link

As mentioned in the comments it's a bit rude to ask others to do your job, when you haven't even tried yourself.

The following pattern should work:

Pattern:

_[a-z]+\.[0-9]+

Replace with:

_inf$0

Explanation:

"_" matches the underscore literal so we find the start of the pattern we're looking for

"[a-z]+" matches any lowercase letter any number of times (there is no straightforward way to match exactly 3 letters)

"\." matches the dot literal (escaped by a backslash because the dot is a regex expression itself)

"[0-9]+" matches any digit any number of times (so it can occur 3 or 4 times and still gets matched)

_inf$0 replaces the matched pattern with "_inf" plus the matched pattern itself

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

79536274

Date: 2025-03-26 11:39:56
Score: 1
Natty:
Report link

You can copy files from external stages to internal stages in snowflake now: (without Python Stored Procedures)

COPY FILES INTO @[<namespace>.]<stage_name>[/<path>/]
  FROM @[<namespace>.]<stage_name>[/<path>/]
  [ FILES = ( '<file_name>' [ , '<file_name>' ] [ , ... ] ) ]
  [ PATTERN = '<regex_pattern>' ]
  [ DETAILED_OUTPUT = { TRUE | FALSE } ]

https://docs.snowflake.com/en/sql-reference/sql/copy-files

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

79536273

Date: 2025-03-26 11:39:56
Score: 1.5
Natty:
Report link

I came across this situation in Visual Studio 2019. The reason for this behavior was the "Optimize code" flag on the Build tab. Some information about this can be found here:
https://learn.microsoft.com/en-us/visualstudio/debugger/project-settings-for-csharp-debug-configurations

Unless a bug appears only in optimized code, leave this setting deselected for Debug builds. Optimized code is harder to debug, because instructions do not correspond directly to statements in the source code.

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

79536267

Date: 2025-03-26 11:37:55
Score: 4
Natty:
Report link

I am also looking for the same information.

I am trying to convert the following HF model https://huggingface.co/nickypro/tinyllama-15M/tree/main tokenizer.json into tokenizer.model inorder to run Karpathy's llama2.c - https://github.com/karpathy/llama2.c/blob/master/doc/train_llama_tokenizer.md.

I tried the following steps:

1. Extract vocabulary from tokenizer.json
2. Train the sentencepiece tokenizer using spm_train with the extracted vocabulary (vocab_size = 32000). This generates tokenizer.model
3. Use tokenizer.py to convert the tokenizer.model to tokenizer.bin.

Even though the above steps were successful, the inference resulted in gibberish. I assume this has something to do with the tokenizer.model that was generated. If anyone could assist with this, it would be really helpful.

@user2741831

Reasons:
  • Blacklisted phrase (1): I am trying to
  • Blacklisted phrase (2): I am also looking
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Neetha Jyothish

79536265

Date: 2025-03-26 11:36:54
Score: 5
Natty:
Report link

Yes i connected. now i want to connect the mysql database in the live server . i have ip but the error will come

org.hibernate.exception.JDBCConnectionException: unable to obtain isolated JDBC connection [Communications link failure

please give the solution ..

my application.properties

# Application Name

spring.application.name=product

# Remote Database Configuration

spring.datasource.url=jdbc:mysql://My_IP:3306/test

spring.datasource.username=root

spring.datasource.password=my_password

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

# Hibernate & JPA Settings

spring.jpa.hibernate.ddl-auto=update

spring.jpa.show-sql=true

spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect

Reasons:
  • RegEx Blacklisted phrase (2.5): please give the solution
  • RegEx Blacklisted phrase (1): i want
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Bharath m

79536262

Date: 2025-03-26 11:34:54
Score: 2
Natty:
Report link

Thanks @JérômeRichard and everyone. I misprinted in for-loops conditions. Should be xx <=limit and y*y<= limit instead of x <= limit and y <= limit. Everything else (dynamic array, array data type, I/O stream and etc.) plays zero role in my case. Now all primes up to 10Millions are found within ~2-3 seconds. I made such mistake because I thought I transferred code from PHP clearly and my eyes just 'skipped' this moment every time I reviewed this part of C++ code. I am not lazy, but my brain is =)

P.S. I made all necessary corrections to C++ code in my Question.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @JérômeRichard
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Dart Paul

79536261

Date: 2025-03-26 11:33:54
Score: 3.5
Natty:
Report link

use debug statement to print your api token and then use ask again here

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

79536252

Date: 2025-03-26 11:30:53
Score: 3
Natty:
Report link

On mobile devices you must use "ontouchstart" instead of "onclick" to start playback without error.

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

79536249

Date: 2025-03-26 11:29:53
Score: 0.5
Natty:
Report link

This error typically occurs due to permission issues with npm and Git. Here’s how you can resolve it:

1. Check Git Installation Ensure Git is installed and accessible:

git --version If not installed, install it using:

sudo apt update && sudo apt install git

2. Fix Permission Issues Run the following to take ownership of the npm directory:

sudo chown -R $(whoami) ~/.npm sudo chown -R $(whoami) /usr/lib/node_modules

3. Clear NPM Cache Try clearing the npm cache:

npm cache clean --force

4. Use Node Version Manager (NVM) Instead If you installed Node.js via sudo apt install nodejs, it may cause permission issues. Using NVM can prevent this:

curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash source ~/.bashrc nvm install node nvm use node Then reinstall MERN CLI without sudo:

npm install -g mern-cli

5. Try Installing Without Global Flag If the issue persists, install MERN CLI locally:

npx mern-cli

If you still face problems, consider hiring expert MERN stack developers from GraffersID to streamline your development process and avoid technical hurdles!

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

79536235

Date: 2025-03-26 11:23:52
Score: 2.5
Natty:
Report link

Using catch we can get the message.

set res [catch {exec ./a.out} msg ]
puts "$msg"
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user2890240

79536232

Date: 2025-03-26 11:22:51
Score: 4
Natty: 4.5
Report link

https://gist.githubusercontent.com/bbaranoff/ba4df362e74329094828eb72bf244b64/raw/46148f76fbec12d65c0ef500bdbd10400a0dc846/tea1_opencl_crack.py

Works with RTX 4090 and i9 14HX don't know for others

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

79536230

Date: 2025-03-26 11:21:51
Score: 1
Natty:
Report link

Similar to some other answers, but this is much easier:

  1. open a finder window,

  2. type the app name into the search box, and

  3. delete all the files that show up. (Sometimes under Debug folder, Release folder, and/or codesign folder)

  4. try reinstall the app using the pkg file.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
Posted by: Brian Hong

79536220

Date: 2025-03-26 11:14:49
Score: 4.5
Natty: 5
Report link

Another option is to open that file with tools like https://app.packetsafari.com/ or https://www.qacafe.com/analysis-tools/cloudshark/

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

79536217

Date: 2025-03-26 11:13:49
Score: 3
Natty:
Report link

I second the previous answer. Building with release configuration solves the connection issue. Wish I had vound this earlier. At least I can move on for now.

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

79536210

Date: 2025-03-26 11:11:48
Score: 1
Natty:
Report link

I don't think this answer is correct according to the latest Google Cloud documentation:

Source

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

79536208

Date: 2025-03-26 11:10:48
Score: 2
Natty:
Report link

Resolve by setting 'hoodie.write.lock.provider' = 'org.apache.hudi.client.transaction.lock.InProcessLockProvider'

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

79536201

Date: 2025-03-26 11:07:47
Score: 1.5
Natty:
Report link

Had this same issue too, copy the .gitignore file to another location, delete the exisiting cache folder, create a new one, move the .gitignore file back in it, then run php artisan optimize:clear , that fixed it for me :)

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

79536185

Date: 2025-03-26 10:58:45
Score: 1.5
Natty:
Report link

Well, I should probably wait before I post since I found a solution shortly after. Anyone interested, here is a solution that works:

Source: https://github.com/microsoft/vscode-python/issues/6986#issuecomment-581960186

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Run project in Debug Mode",
            "type": "debugpy",
            "request": "launch",
            "program": "Main.py",
            "console": "integratedTerminal",
            "env": {
                "PYTHONDONTWRITEBYTECODE": "1" 
            }
        }
    ]
}
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: BusyChild77

79536184

Date: 2025-03-26 10:57:44
Score: 2.5
Natty:
Report link

There is an open-source tool that can read FHIR bundles and transform FHIR resources into various flat structures (such as CSV, relational database tables, or JSON arrays). You can define mappings and work with different file types easily.

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

79536181

Date: 2025-03-26 10:55:44
Score: 2.5
Natty:
Report link

The error message you're seeing, SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data, usually means that the response you're getting isn't valid JSON. Here are a few things you can check:

Check the Response: Use your browser's developer tools to inspect the network request for the reCAPTCHA verification. Look at the response to see if it's returning an error message instead of valid JSON.

API Keys: Make sure that the new reCAPTCHA keys are correctly set up in your code. Double-check that you're using the right keys for the environment (development vs. production).

Server-Side Validation: Ensure that your server-side code is correctly handling the reCAPTCHA response. If there's an issue with how the server processes the response, it might not return valid JSON.

Check for Downtime: While it's rare, you can check if Google's reCAPTCHA service is experiencing any outages. You can look for status updates on their official status page or forums.

CORS Issues: If you're making requests from a different domain, ensure that your server is set up to handle CORS (Cross-Origin Resource Sharing) properly.

If you've checked all these and it still doesn't work, it might be helpful to consult the reCAPTCHA documentation or forums for more specific troubleshooting steps. Good luck!

Reasons:
  • RegEx Blacklisted phrase (2): it still doesn't work
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: CodeCrafter2GB

79536165

Date: 2025-03-26 10:47:42
Score: 3
Natty:
Report link

I tried to Make puppeteer browser version but I failed

the article says to clone the puppeteer repo, install the dependencies and to build with rollup or webpack.

There are a couple of things I am not sure about

should I install the puppeteer repo in my project or ouside of my project ?

should I build my app with rollup or add a rollup build script to the puppeteer project after I cloned it ?

I don't know if my approach is right but I decided to clone puppeteer into my project and build everything with rollup and use my main.ts as an entry point for the rollup build.

Here is my concern : Why would I ever use vite and rollup for the same app ? Isn't one useless at this point ?

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