Latest Questions

Can the way in which a function is called depend on its arguments?

In Common Lisp, is there a way for an argument to a function to determine how the function is called, in the following sense? Let's say we have a function which

How to extract the oldest value for a column from a set of rows instead of all the rows?

I have a table in the following format Name|Token| Date | --------------------- John|7 |2010-4-30| John|7 |2011-4-30| John|9 |2011-5-30| John|9 |

Spacy transformer misses simple dates: Am I implementing something wrong?

If I run the following: import spacy nlp = spacy.load("en_core_web_trf") string = 'POLICY DETAILS Penod of Cover Your Policy gives you 18/11/21 (Noor) 18/11/22

How to pass an interface as parameter in koin

I'm so beginner in koin. I have a method that named "MesheRepoImpl" that get an interface as parameter. I know that I can't pass an interface to a method in Koi

Detect multiple tabs opening... and close the newest tabs! (via BroadcastChannel API)

I've put this function on load so I can detect a new tab being opened: function checkNewTabs() { const channel = new BroadcastChannel('tab'); channel.postMe

Test onClick of a button is called when there is no props passed down to it using testing library react and jest

I have a component for an upload button which calls the ref of an input when clicked: import { useRef, FC } from 'react'; import Button from '@mui/lab/LoadingBu

React native app crash after that I installed it with apk (with some warnings)

I am trying to run a react native app. In the terminal I ran npx react-native init rn8, then I open android Studio to upgrade AGP to version 7.1.3 and I also se

Rails, is find_by().present? more performant than where().exists?

This question arose from me doing 2 types of performance tweaks: changing a lot of my where().present? statements to where().exists? changing a lot of my where(

How to run a single-file javascript soundboard app from Rails 7

I have a single-file Javascript soundboard application from app academy. The code works fine, but how do I "wire" it into the Rails 7 server? I'm struggling to

How to make boundaries with numpy at mathplot lib

I am trying to generate random numbers from -0.005 to 0.005 and want to give position from 0 to box size enter code here import Numpy as np a= [] velocities=

csv export failing when executing jupyter notebook from command line

I have a jupyter notebook that i am executing from command line using jupyter run Anomaly.ipynb now in my notebook i am exporting the dataframe as csv df.to_cs

Unity sprite with white transparent area shows whit line at border in scene

I have this sprite here which is part of a character. As you probably can see, it has a white area in the lower middle, which is semi-transparent. But when pla

I get an error when I install the SWITIFY package, does anyone know what it means?

when I install the package sweetify, I get the following error Does anyone know what the reason is? I went through all the steps that were in the main dock Trac

absolute positioning with respect to scalable element

In the following example code I have an outer div ("div1", relative position), which has viewport size. Inside there is a img which is scaled as large as possib

How to restrict the user to enter leading, trailing and consecutive space in a string in kotlin

I have a scenario, where I need to restrict the user to enter leading, trailing and consecutive space and if the user enters do not update the text with space b

how to use two variables in a for loop in shell script

how to use two variables in a for loop in a shell script. Below is the id and name of the projects got using jq operation. Netbank734113 8a70803f8045722601804f6

How to set target net7.0 -windows?

I try change <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net6.0-

CMake and GTest in VS 2019 test building failure

Somehow I have the same problem I had last time see here and I can't solve it this time. I have my CMakeLists.txt file: cmake_minimum_required (VERSION 3.20) s

Firebase dynamic link does not go smooth

I'm trying to use Firebase dynamic link option and succeeded to create a link that opens the app, but the opening process doesn't look smooth. It looks somethin

Powershell Sort-Object PSCustomObject with Object[] as value

I am using RestAPI access to azure. I am getting a list of changesets for a build ID. I would like to sort the object type with increasing Changeset number. The

Creating axis gap in histograms

I'm trying to create a gap in a histogram between 0.6 and 1 (on the y axis) but don't really know how to go about this. The gap.barplot solution does not seem t

Is it a good design in RDBMS to reference RelationshipTable ID from another table

Consider the following example CREATE TABLE courses ( id INT, title VARCHAR(100), ); CREATE TABLE students ( id INT, name VARCHAR(100), ); Bec

using swiper in react js app that created by vite

i'am trying to use swiper js in my react js project that created with vite but it throws and error with this title : Failed to resolve import "swiper/css" from

How to take an element from an array list and assign it into another array list

I have to create a program in java, which is based on an ordering system. I have the following classes : orders, orders list, supplier, supplier list, payment,

How to filter all child objects by value of parent class of parent in SQLAlchemy in flask application

I have simple flask application with following relations between models. class Category(db.Model): id = db.Column(db.Integer, primary_key=True) name = d

Plotting multiple store sales into 1 plot

I have problem plotting multiple timeseries into 1 plot. My dataframe looks like this: So I want all 10 stores plotted into 1 plot, such that all stores have

Pycord: Slash command sharing a name with a slash command group?

Is there any way to have a slash command sharing a name with a slash command group? I want to be able to have a command /settings that will list the current set

Connecting various devices to Arduino

I need to connect the following devices to an Arduino UNO board. The problem is that I run out of pins to be able to connect them all. Is ther

The Jupyter do not show border lines and grey blocks

everybody. I learn NumPy and pandas with the Jupyter. When printing, it does not show borderlines and grey blocks. Example: Should be: How to solve it? Thank

How to get rfid tag data from impinj R420 using C++?

I am totally new to tag reader hardware and Impinj. I have to collect rfid tag data from impinj R420 onto a computer which is connected by ethernet. How should