I'm developing a python GraphQL API server using FastAPI and Strawberry, and I'm implementing this feature: I have two entities, User and Order, which have a on
Lets say we have a struct Original as this: class Original { int x; bool y; bool z; }; Due to alignment, the sizeof(Original) is 8 bytes. 4 for the int,
While testing things around Compiler Explorer, I tried out the following overflow-free function for calculating the average of 2 unsigned 32-bit integers: uint3
I am attempting to solve a coding challenge however my solution is not very performant, I'm looking for advice or suggestions on how I can improve my algorithm.
I am trying to optimize a portfolio for a certain timer period Error message
i have a function function t=strength(x) t(1) = -0.804-0.001.*x(1)-0.001.*x(2)+0.0.*x(3)+0.0.*x(4)-0.031.*x(5)+0.005.*x(6)-0.002.*x(7)+0.001.*x(8)-0.735.
from collections import deque def findMax(hardDiskSpace, k): n = len(hardDiskSpace) if n * k == 0: return [] if k > n: return []
I have a simple JSON reading class that should grab values from a JSON object and put it in c# variables. Right now it uses 8 if statements, but I was wondering
I have the following objective function : Minimize(sum(abs(di[i]-d[i]) ) ) and I want to add a constraint to make sure that d[i] is appeared at least k times i
I want to disable a computation of several filters during Predict call with Tensorflow 2 and Keras. Do i have to modify the source code of Tensorflow to achieve
I am learning about how to optimize using reinforcement learning. I have chosen the problem of maximum matching in a bipartite graph as I can easily compute the
I am trying to optimize the trajectory of a thrust propelled system. The control variable is the mass flow rate, and the final objective is to maximize the mass
I'm trying to solve an optimal control problem where a person lands on the Moon, but has a device that can propel her upwards, via a control parameter, alpha. T
I am trying to cut a large cuboid of dimension (L, W, H) into N (N can be an arbitrary number and doesn't need to be specified) small cuboids where length and w
After looking through stackoverflow + IBM forum + Alex Fleischer's How to Linkedin page, I manage to run my problem with script, changing a parameter at every i
C# 7.2 added two new features: In Parameters Using in for a parameter let's us pass by reference, but then prevents us from assigning a value to it. However the
I want to create a Max Flow - Min Cost program in C# -Visual studio. I'm using this Guide , but I get error at this line MinCostFlow minCostFlow = new MinCostFl
How can I print the gaps(each iteration) like OPL's engine in Python? I want to keep the gaps like this: Nodes Cuts
I currently manage the following set of servers that serve about 700 web pages: SERVER 1 (WEB) Web server: Apache 2.4.29 with MPM Event PHP 7.2.22 CPU: Intel
Struggling to understand why my query is taking ~8-12s to complete when my table has millions of rows. I can force it to use a specific index, and depending on