Latest Questions

Remove array if meets certain conditions

I'm trying to work out how I can remove all timestamps which have a certain reservation id after them. Currently I can unset only based on timestamp and not che

psycopg2.OperationalError: could not connect to server in docker

Trying to launch in docker or locally flask+postresql. Both have the same problem ** File "E:\tz\flask-quiz\app\app.py", line 12, in db.create_all() ** I don't

How can I implement C static variable into Go code? [duplicate]

I am trying to re-write a piece of C code into Go and I stumbled upon a static variable. I am wondering how I can achieve the Go's equivalent

gtkwave tcl script for adding specific signals

I have a huge VCD file that I use in combination with gtkwave to observe certain signal behaviors. I have a list of signals stored into a .txt file which are th

How to read csv with separator inside json?

I would like to read a csv file but the separator sometimes appear in the second column (json). Is it possible to escape pipe when it appears inside quotes ? fr

How to filter sample field in test json property using SimpleFilterProvider

[{"test":{"sample":"0","Duration":1,"reserved":"0"},"testMain":[{"testsubtype":{"sample":"OUT","Duration":2}}]}] How to filter only sample field in test json fi

Deserialization of ser. files not working

I am trying to practice Deserialization with ser files, but every time I do, I get an error. here's the code: import java.io.*; public class Main { public

Wget progress in script

I have a Dockerfile which clones a repo and runs a shell script that exists inside that repo ... Example RUN git clone https://github.com/DaehwanKimLab/hisat-ge

malformed node or string on line 1: <ast.BinOp object at 0x10f5c5f00> when remove ' of words in python3

I want to remove the start ' and end ' of a string in Python 3, this is how I do it: new_words = ast.literal_eval(str(words)) but when the content is W/"128d6f

How to upload images on node js?

I am having issues getting any image data on the form in the ejs file after submitting. Upon debugging, there is a req.body.image which has the filename but req

Saving data into database table

I have this code that takes two information from user ( username , password ) How can I save these information into database table . Note: I have already made d

Separation of users and posts microservices?

Currently there is a users microservice in my project, which handles all the authentication logic and stores user data (email, name, bio etc.) One of my applica

Daemonize process in makefile

Im struggling to get a process started in a Makefile to be launched in the background and the Makefile target to complete. It's a simple flask and dramatiq appl

discord bot is not sending image of collected URL while using collector

I am trying to do a simply paste a link in a particular channel and wait for the bot to send it again with message. here in this example I should get: hello ima

Stop function from functioning

So I'm modifying a webpage, it has a button, it is coded so mouseup goes to a link, I want to change this, adding mouseup functions don't work; mousedown works

module is not defined in ES module scope

I try to update my code because I update nodejs from 8.12.0 to 16.14.0 and use es6.This my code before I got update nodejs. const encryptRequestHeader = () =>

Create NSG ARM Template from CSV via Azure PowerShell

I am trying to automate my NSG creation, as well as NSG remediation for Azure via DevOps pipelines. Therefore, I wrote a PowerShell script that creates an ARM T

How can I add System.Windows.Forms to WPF application when adding via reference/Depenency doesn't work?

Following every guide everywhere: Step 1: Step 2: it works! Huzzah! Except that it doesn't. Instead I get yellow triangles: This project is tiny for now becau

Hibernate keeps creating N+1 querys

I've got no idea why is this happening. I thought the "JOIN FETCH" thing and/or "EntityGraph" were meant to address this, but then the query made by Hibernate l

how to reset input fild without empty string in react.js

How can I reset the input field if I use it this way? const [email, setEmail] = useState({ email: "", emailError: "" }); const handleEmail = (inputEmail

Java operator + & <= is undefined for the argument type(s) double, boolean [closed]

Hi I am struggling with following Task.Can someone explain me how to solve this at a beginner level Given: Initialize the variables with the s

Why does match will not release the mutable borrow until end of it's expression?

I want to return client, In this function in any circumstances the code will not continue after match so rust should allow returning client. pub async fn call_q

Error: Xamarin bin and obj folder empty and build failing [duplicate]

I'm building a Xamarin project for Android and IOS on Visual Studio 2019 but my bin and obj folder when I compiled where empty all of a sudden

How to link cuda library to cpp project/files with Cmake?

I am trying to write a gui program using the gtk libraries and do some matrix operations with the cuda libraries, however I get an error when trying to link the

concepts template argument deduction

The concept below has two template parameters but only one is specified during usage. Is T always deduced and InnerType always the parameter that needs explicit

Add SOAPHeader to each request [duplicate]

I'm very new about this topic, so I'm sorry if my problem explanation will be not very clear. I'm using Visual Studio 2019 c#, and I'm creatin

Web based Timer application using window.setInterval method in JavaScript does not work as expected on mobile browser (Chrome, Firefox etc.)

Web-based timer application using window.setInterval method in JavaScript does not work as expected in the mobile browser. The reason behind this is that after

How to fix "initial_lr not specified when resuming optimizer" error for scheduler?

In PyTorch I have configured SGD like this: sgd_config = { 'params' : net.parameters(), 'lr' : 1e-7, 'weight_decay' : 5e-4, 'momentum' : 0.9 } o

Clojure: unit-tests defined with with-test are not actually run

Example adapted from the standard documentation for with-test: (ns my-test (:require [clojure.test :refer :all])) (with-test (defn my-function [x y] ;;

Python: sum function with for loop: different results

Here is the code: d = {1 : 1, 2 : 2, 3 : 2} s, s1 = 0, 0 for e in d: s += sum(x for x in range(d[e])) s1 = sum(sum(y for y in range(d[e])) for e in d) print