Latest Questions

Django attribute error while creating superuser

I've created a custom user model using AbstractBaseUser. When I try to create a super user using terminal via createsuperuser command. I get in create_superuser

Strtok returning the same and incorrect string infinitly

So I am studying system calls in c and I am doing this exercise that I have to make a simple program that search for a file in the PATH (kinda similar to which

No manual entry msg - Fedora

I'm trying on to use the man pages on RHEL. Every time I'm searching for manuals, I'm getting this error message: # man ls No manual entry for ls I've tried th

Why is std::ctype's virtual destructor protected?

I was trying to write std::ctype<char> c; but I couldn't, because that class's is both protected (directly) and virtual (indirectly, through facet). But

Dynamic script content when calling spa.UseAngularCliServer(npmScript: "start");

I need to pass in dynamic content into the start script for Angular when starting it from .Net. Right now I have: spa.UseAngularCliServer(npmScript: "start"); A

MySQL join query taking far too long

The following query is taking forever in MySQL 5.7.23, on a macOS 10.13.6 on 2018 Macbook Pro (A1990) with 50GB of free space: INSERT INTO `a_sg1lib` (`book_id`

How to handle special characters in the string while updating a table using python

Im trying to update some rows to a table, in one of the row a string is having few special charecters. I should be updating the string as is to the db. I have t

How do I chop/slice/trim off last character in string using Javascript?

I have a string, 12345.00, and I would like it to return 12345.0. I have looked at trim, but it looks like it is only trimming whitespace and slice which I don

MongoDB aggregate for daily won/lost games, $cond is always false

I'm doing a couple of $match's and $unwind's and end up with a collection of documents looking like this: { _id:249776348, StartGameTime:1615789789, team:0, win

Convert Tableau filter interactions onto R

I've been using Tableau to visualise some data on activity counts at different sites. I'm trying to convert to using R studio instead. However, I'm facing some

Getting app service logs for internal calls in Azure

We have a .Net app that uses Apereo CAS for authenticating. We verified that the app service is not able to hit the CAS back end to submit the ticket coming fr

How can I plot the annual growth rate in R?

I wrote a function to calculate annual growth for my parameters: growth.rate <- function(data){ for (i in c("Area", "Rainfall", "Yield")) { T1 <- ma

'_ctypes' module missing when python is installed via pyenv

I am trying to set up an environment using pyenv and homebrew on Ubuntu 20.04. There are no problems with my system install of python. However, when I install a

How to compute value for InputSlider R Shiny?

I'm doing a Shiny app and I have a question. I want to have a slider input which min and max values depends on values in some dataframe. That's easy to make. Bu

Create a custom Component for React Material-Table row item

I learn React JavaScript and want to create a Material Table with only one Column and every row is a complex component like this; The Squares with number are pa

How to get from private key and seed phrase to account address?

This info are of a metamask dummy account. Does anyone know the process to get the hash_mm from seed and/or private_key? seed = "else wrist ..."

Struct member names as map keys

I'm looking for a way to map a struct's member to a string (or some other type for that matter): struct Foo { int intMember; int otherIntMember; cha

trying to send data from one script in python to another script

I am trying to write a script so when an IP address can't be seen a message gets sent with a telegram letting me know which computer is offline I have been able

How to measure RTT/latency through TCP clients (created in GoLang) from a TCP server created in GoLang?

so I am hosting a TCP server through GoLang and then I want to connect to my TCP server using multiple TCP clients and measure the RTT every time a new client i

Jmeter - How to run the same thread group but with different properties consequentially using command line

What I want to achieve is: I only have one thread group and the only thing that changes are the Thread Properties I want to run more than one thread group sequ

PostfixAdmin Nginx configuration for accessing via subfolder

First of all, my Nginx configuration server { listen 1443 ssl http2; root /usr/share/webapps/postfixadmin/public/; index index.php;

Change post status to draft (on button click - front-end) with wp_update_post()

I'm adding a button via shortcode into my post on front-end. On click, this button should change the current post status to 'draft'. Changing to 'draft' seems t

How can i check for only one occurence only of each provided symbol?

I have a provided array of symbols, which can be different. For instance, like this - ['@']. One occurrence of each symbol is a mandatory. But in a string there

Split linked list into half in c++

What is wrong with my code in splitting the linked list into half, what causes the error? I kinda get the logic on how to split it, but is this the right implem

ModelState showing invalid, but the value is there?

I hope this makes sense what I am trying to do I have an application built with RazorPages that I am adding server side validation to for a Uni Project I have a

Outer class can't create an object of my inner class [duplicate]

I am so confused. I have a nested class where Book is the inner and Bookshelf is the outer class. When I try to create a Book object in my Boo

image converted from pdf file with Imagick got grey background

I'm trying to convert a pdf file to image with imagick in php. The script works fine but the image created has a grey background like if the background of the p

Take a class as a parameter which has a particular method in it

I know that we can pass a class in a param which has a particular class as its super. For example, see this: public void sampleMethod(Class<? super MyParentC

Draw two or more images vertically in a single canvas

var base_image = new Image(); base_image.src = 'https://......jpg'; var can = document.getElementById("pai"); var ctx = can.getContext('2d'); base_image.onload

Flutter: Updating the more recent value while the user in viewing the page with streams

Am I thinking about this the right way? I created a function that takes in a value from firebase, value in seconds, and convert it into hours:minutes:seconds, t