Latest Questions

Calling FileField objects in template renders incorrect path

I've implemented a FileField model in my project. I can successfully upload svg files and they save to the desired location. Within my project, I make heavy use

How can I include external modules when compiling Python code with Cython?

I have an extension that I compile with cython into the related *.pyd or *.so files, which are then imported into my very basic main.py: if __name__ == "__main_

Determine Whether Two Date Ranges Overlap

Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap? As an example, suppose we have ranges denot

Unable to run unique iterations for individual objects

I'm trying to present 25 entries (name, company, skill, etc.) on the page and am having trouble getting the unique information. i.e. I only see the first entry

Error status after sending 32768 bytes from serial port in Python

I am making uart communication using serial library. I can send and receive data, but when the number of bytes sent reaches 32768 or more, I get the error; Val

Google maps remove UI from tab order

In my application I have dialog that opens google maps. When navigating google maps with tab the UI at the bottom of the map is "tabable". How can I remove this

PLPGSQL function returns ERROR: integer out of range even if value is correct

I'm experiencing strange behaviour on two Postgres functions returning a single bigint value. The first one returns the correct value while the second one throw

pm2 can't find package.json when start

I try to start my app on VPS.I can start my app in terminal, but when I work with pm2 , I get the error 0|gentle-s | Error: Cannot find module '/root/my-app/ind

generic type to add missing properties in type

I have the onMessage function that gets events from SDK of the third party in my app interface TypeA { a:string, b:undefined } interface TypeB{ b: '

Python Django error "Select a valid choice. That choice is not one of the available choices."

I am relatively new to Django so I am likely doing something obviously wrong but I cant seem to figure out what exactly. I have a model called Report and this h

In Typescript "keyof Record<string, string>" is not "string"

I'm hitting this wall since days now and I'm not sure anymore if I'm the problem or if typescript is broken... I defined a generic class with the generic extend

Service stope after few Hours in android

I am creating one foreground service and start this service using STICKY. It detect phone lock and on event. It working fine for few hours but after some time t

Gradle task list that can be parsed

I am looking for a way to retrieve the output of gradle tasks in a way that can be (easily) parsed. Ideally in JSON for instance. I feel that I am missing the

Reentrant lock not updating the shared resource properly

I have a shared variable count, which I am incrementing in increment() method and two threads are access this. I'm getting the wrong final count. Here is the s

how many rows will the query return?

table t has a field X which is the primary key. the table has 5 rows. how many rows will the query returnenter image description here

Circle drawn in Openlayers not changing properly

I have a JS file that allows me to draw a circle on an interactive made with Openlayers 4.6.5. The problem I currently have is that once the circle is drawn, I

How to make my animated image stay in the same place even when I scroll down the screen?

I have placed an animated image on my landing page however when I scroll down the screen the animated image also moves with the screen, I have put position: fix

Can not connect to firebase authentication browser module

Hey everyone I am learning firebase phone authentication in web app. I have an error that I can not find the solution. I imported the browser module for firebas

For MudBlazor component MudSelect, how do I get selected value to align in the center?

I have a very simple drop down, a MudSelect, which is working fine. When you list the choices they align fine in the middle, but I do not know how to get the s

how in GridLayout (Android) to fit the last two blocks to full width?

I am currently learning the Android front-end development, and our teacher gave us this task: We need to create the next grid in Android Studio: Task Grid using

Intercept Kafka rollback in a Spring Batch

In a Spring Batch I developed an ItemWriter that use a StreamBridge to write to Kafka with a transactional producer. With a CompositeItemWriter, the step use al

Codes for reCaptcha v2

I have a simple contact us form [asp.net]. I also have Google reCaptcha-v2 site key as well as secret key. Can you please let me know what codes I need to add a

How do I use fetchAll in php?

I am using this statement to fetch the elements in a column in my db $result = $stmt->fetchAll(PDO::FETCH_COLUMN, 0); but I get this error when trying to

Summarising movements of individuals spread over several rows

I am a newly self-taught user of R and require assistance. I am working with a dataset that has captured location of residence and whether the locality is metro

Combining cte with dates and table with dates between two dates

I have a few pieces of code that give me things that I need, but I need some help for put them together. I have: create table #test ( job int, dateL date) inser

How to group by data in one column into multiple columns keeping rows

Identifier Value 511016 75.72911 511016 79.01783 511016 74.87570 511029 72.75873 511029 74.41798 511029 78.56112 The dataset consists of two columns (as above

i trying to install elasticsearch and i downloaded but in command prompt it show error like this

[error is showing like bundled jdk][1] I try all the method but elastic search is not installed for me.pls give solution for this [1]: https://i.stack.imgur.com

Java doesn't support IRI?

Example code: java.net.URI.create("http://测试.com").getHost(); // return null new java.net.URL("http://测试.com").getHost(); // return

android webview project speed up

I just started android. Is there a github project with images, css and js cookies that I can use for android webview? I am using standard webview but it works t

Update Azure Function Node.js Version, avoid downtime and lost messages

I have an Azure Function App hosted on an Elastic Premium service plan. It triggers from coming Service Bus messages. I need to upgrade the Node.js version from