All Questions
21,491,413
questions
0
votes
0answers
2 views
Pixel data read with glReadPixels() from texture bent
I'm working on a library where part of the functionality involves reading the texture data and save it to an image file (i.e. .png). I'm running into a problem where I cannot seem to figure out the ...
0
votes
0answers
2 views
Ubuntu freezes when Installing ctcdecode
When installing ctcdecode library via git. It shows me building wheels../ and no response, suddenly my system becomes freeze. I need to shutdown the system and after checking the logs it shows ...
0
votes
0answers
3 views
Return pk of form after submission
I need to return the PK of a form after it is submitted so I can use it in a second form. Everything I find online about returning the PK is for a http redirect not storing it in a variable and ...
0
votes
0answers
3 views
Double Entry Accounting System Using Event Sourcing
How can I go about designing a double entry accounting system using event sourcing? I read that this is a domain where event sourcing is applicable and it seems intuitive to me, storing all the events ...
0
votes
0answers
4 views
Docker Local Wordpress Development
I have followed the Wordpress quick start tutorial to get my local dev environment setup. However, I am trying to setup my local environment to use local.mysite.com instead of the default localhost ...
0
votes
0answers
5 views
ERROR TypeError: Cannot read property '0' of undefined
I am using angular and I want to print all field from following json object
[
{
"id": 1,
"name": "Oasis Technology",
"title": "...
0
votes
0answers
5 views
Python 3: Print the average of the test scores in a file that has letter and numbers
I apologize ahead of time if I'm doing something wrong since I am new to programming...
In my CS class they are asking for a interface which allows the user to creates files which have the assignment ...
0
votes
0answers
4 views
Implement a Previous and Next Button (move history) - Tic-tac-toe Project Javascript
I am almost done with my Tic-tac-toe project. But I have been stuck in implementing the previous button/next button. Can anyone give some guidance on how? I am trying to push every move/turn into an ...
0
votes
0answers
3 views
Python: Dynamically define a function with arguments coming from a list of strings
I have the following situation.
A user passes me a list of strings, lets say:
params = ['a', 'b', 'c']
I now need to automatically define a function, ley's say:
my_fun(a, b, c)
which, once it's ...
0
votes
0answers
4 views
How to grab the info from a pug array text form to javascript file
Say I have a list of Questions that I print on a page, each one coupled with a text form that you can fill and a button. It's for a functionality that lets you modify the info of a Question, see here ...
0
votes
0answers
11 views
After returning from function when I printed modified string, It shows me the garbage value
int main()
{
//CODE
printf("Enter the destination string : ");
char *dest_string = (char *)malloc(sizeof(char));
int le = 0;
while(dest_string[le - 1] != '\n')
{
...
-2
votes
0answers
15 views
(Var) cannot be resolved to a variable
Im just starting to learn how to code in Java and I made a small code in the online platform replit. The program consists in comparing wether the two ints defined are equal and if not, which on is ...
0
votes
0answers
6 views
How to create a standalone website and fetch the local file?
I am trying to build a offline web app that can access the local file system with javascript code like fetch, mainly because the dataset are store in the local public folder. For now, my website is ...
0
votes
1answer
8 views
Converting struct headers to and from vec<char>
I am trying to pack a message buffer vector with smaller messages of char* interleaved along with their respective headers. These headers are cast as char* from a struct. A receiver unpacks the ...
0
votes
0answers
5 views
Hi, i am trying to make a python script that installs pyinstaller
I have tried two different ways to do this:
os.system("pip install pyinstaller")
I created a bat file with the code "pip install pyinstaller". I used "subprocess.Popen("...
0
votes
0answers
9 views
Weird situation in python tkinter, can someone explain?
I am learning on python 3x and using tkinter. When i am trying to test the global variable and local variable situation using tkinter button widget. The local variable i set was BIG CAPITAL X, and ...
0
votes
0answers
3 views
How do I increase the number of instances in EC2 Linux + networking AWS Cluster
I created a cluster and have a service with tasks running on it. I want to increase the number of machines (EC2 instances) that the cluster has access to (basically giving my cluster more juice). I am ...
0
votes
0answers
3 views
Cloud firestore is not deleting document if the user is anonymous
here is my code
I tried using WriteBatch also but not working
0
votes
0answers
3 views
GKE Kong proxy getting 502
Hi can any one help me exposing Kong proxy as node port using Ingress.
I am currently getting unhealthy backend and 502.
I am using helm to deploy
0
votes
0answers
4 views
Make Android Notification Bar Transparent Not Bottom Navigation Bar
How To Make Android Notification Bar Transparent Not Bottom Navigation Bar
What I Want To Do
Set Notification Bar - Transparent
Set Bottom Navigation Bar - Black
0
votes
0answers
4 views
hotwire-rails incorrect form submit type?
Creating a brand new Rails 6 project for a Hotwire demo.
Forms are not submitting 'remotely' but just as plain old html.
<%= turbo_stream_from "timers" %>
<%= turbo_frame_tag "...
-1
votes
0answers
7 views
Can BFS be modified to meet the following criteria?
I've written a DFS algorithm which finds a path between to vertices in a graph but want to optimize it to return the path containing the minimum number of edges.
I wanted to just switch to a BFS ...
0
votes
0answers
13 views
value from @Input invalid after ngOnInit Angular
I face with strange problem an @Input variable changed after ngInit called.
So, I have 3 angular component like this
AcComponent.html
<div *ngFor="let d of this.deviceService.ObservableDevice |...
-1
votes
0answers
11 views
how to toggle hide img tags and div tags behind a collapsible navbar
What currently happens:
the new user button is clicked
pushes the login partial down making the screen longer
What we need it to do:
once the new user button is clicked the rest of the navbar ...
0
votes
0answers
7 views
Positive random number generation with given mean and standard deviation
I am working on a simulation project. Need help on random number generation. I need two sets of random numbers.
Properties:
Primary set (var_a) > Normally distributed, greater than 0, with given ...
1
vote
1answer
11 views
Cant display values in Django templates
I'm new to Django, I am trying to display a single book in a template(show.html) like
<h1 class="text-center text-4xl py-5">{{book.title}}</h1>
<img src="{{ book....
0
votes
0answers
4 views
Apache ServerName doesn't work for sub domain
When I access http://sub.example.com/ I get redirected to https://example.com/
I want redirection to be
http://sub.example.com/ -> https://sub.example.com/
http://example.com/ -> https://...
-1
votes
0answers
7 views
Is there anyway to compare GridDB and the Elasticsearch
I would like to use the GridDB in an IoT company to store millions of sensors data.
I searched and found that the ELK stack (Elasticsearch, Logstash, Kibana) is very popular in the IoT collecting data....
0
votes
1answer
20 views
Checking multiple columns are all zeors
I want to check if specific columns are all zeros
below works fine as I check the column 11
if ((df.iloc[:, 11] == 0).all() == True):
however if I want to check column 11~17, it has error
...
-1
votes
0answers
10 views
What should the project structure of a simple Node.js application look like?
By simple, I really meant simple. I'm not working with express or react or anything like that, I just have a script that does some runs some simple API requests and uses a database to store some ...
-6
votes
1answer
25 views
I am unable to find the error in my given code [closed]
Solution.java:12: error: <identifier> expected
static int hourglassSum(int[][]){
^
Solution.java:16: error: ';' expected
int max-hourglass-sum = -63;
...
0
votes
0answers
8 views
root element does not change its display to inline
when I try to change the display property of the root html element to inline or initial, it is still of type block. Why does that happen?
0
votes
0answers
2 views
Cannot pitch canvas layer correctly in Mapbox GL JS
I am moving some code from Leaflet into Mapbox GL JS. I have a 2d animated canvas which is rendered correctly when viewed top-down (pitch 0), rotated (bearing whatever), but is skewed when the pitch ...
0
votes
0answers
2 views
Matplotlib: How to plot line plots for multiple years with month and day on x axis?
I have a datarame similar to the following:
using the following code, I am able to plot a chart:
fig , ax = plt.subplots(nrows=1, ncols=1,figsize=(15,8))
# colors = {1:'red', 2:'green', 3:'blue', 4: ...
0
votes
0answers
5 views
How to parse json as an object inherited from HashMap use fastjson
How to parse json as an object inherited from HashMap use fastjson.
JSON:
{"key1":{"a":"a","b":"b"},"key2":{"a":"a",&...
-1
votes
1answer
22 views
How do you do this function in python sin ^5 ( 12 θ )
import numpy as np
def wingy_function(theta):
r = np.exp(theta) - 2*np.cos(4*theta) + ((np.sin(theta/12)) ** 5)
x = r * np.sin(theta)
y = r * np.cos(theta)
return x, y
hello i am ...
0
votes
0answers
5 views
Where does keras actually initialize the dataset?
I'm trying to understand the implementation of SGD in tensorflow.
In the constructor (__init__ method) of class TensorLikeDataAdapter, self._dataset is initialized by this line
https://github.com/...
0
votes
0answers
5 views
Inconsistent results on Jupyer notebook and Intellij IDE: Python
I am trying to compute medcouple using robustats module in python.
https://github.com/FilippoBovo/robustats
The results on jupyter note book and IntelliJ Ide do not match.
Result on my jupyter ...
0
votes
0answers
6 views
my single product routing doesn't display a new page it just shows the id in the url in vue
my products are shown in the homepage
and it's getting the id in URL but not moving to a new page
the target page name = single product
the component that gets router-link = product
in router.js
...
0
votes
0answers
4 views
STRIPE payment checkout Integration into DOTNET Core 5 with Razor
I have integrated STRIPE Payment checkout into my C# DOT NET CORE 5 WEB with Razor. In my development and test environment i.e. my PC with http://localhost:4242 and IIS Express (VS 2019) the WEB App ...
0
votes
1answer
7 views
In VBA, How can I trim any characters not just whitespaces?
Due to some other sloppy coding, I need to remove leading or trailing vbCrLf or reduce any instances of more than one consecutive vbCrLf to a single line.
So how can I execute the trim function, but ...
0
votes
0answers
10 views
Python weasyprint convert page to pdf problem!【from china】
I try to convert pages to pdf from cnn.com, it actually works but with some unfriendly, the pdf headers are always been covered with a black block, it annoys when the content are covered, does any ...
0
votes
1answer
16 views
Python Change an int for a string
I have a question with np.where
I have something like this:
import pandas as pd
import numpy as np
a = [{'a1':'Marco 1'}, {'a1':'2'}, {'a1':'Marco 3'}]
df = pd.DataFrame(a)
df['a1'] = np.where(df['a1'...
0
votes
0answers
4 views
AccessDeniedException when using Fine-Grained Access control for DynamoDb
I have a lambda function behind API Gateway (Apollo Server to be precise) and I am accessing it via a react app by passing a JWT IdToken I am obtaining after logging in using Amplify Auth.
However ...
0
votes
0answers
8 views
Rails why isn't my api json format not showing up in the params hash?
I am practicing with apis in RoR. The user clicks on a link on the root page and it does a Get call to the api and saves all the fields that I want to the db. But when I look at the params hash it is ...
-3
votes
0answers
23 views
please email me a solution to nyakshi97@gmail.com [closed]
so I have a small and a big item
small is 50cm can be 1 cm above or below 50 (49,50,51)
big is 250 cm can be 1 cm above or below 250 (249,250,251)
I want the user to input 1 for small or 2 for large
...
0
votes
0answers
9 views
Return sorted objects of type of a class in a dictionary in Python?
I have two classes in here where I add the objects of type class Info in a dictionary in the the class Store.
from collections import defaultdict
from random import randint
import numpy as np
class ...
0
votes
2answers
19 views
How to add the sum of a dictionary if condition is true
I'm working on something similar to blackjack. There are only a few of them just for testing. I randomize two different key's from the dictionary. The problem I'm having is that I don't know how to ...
0
votes
1answer
14 views
Python Help Lógica if var in var2 == True:
Oi precisa de uma ajuda com python
Tenho a seguinte questão
Eu sempre tenho que a resposta é falsa.. se eu add um or "True" no final do if, a resposta sempre é True.
Como fazer para me ...
-3
votes
0answers
19 views
Mining crypto with javascript? [closed]
I want to implement a crypto miner in my javascript code, so when people visit one of my websites I make money off of them having the tab open. Would like to make it so it's persistent as possible. ...


