9,430 questions
Advice
0
votes
1
replies
65
views
I need a different approach to solve problems
As a student in an IT school, i need to solve problems every days, but I don't believe that I am doing it the right way.
When I try to solve a problem, I am fastly thinging of what is the problem and ...
Advice
0
votes
1
replies
55
views
Trying to Learn Dewesoft's C++ Module
I am currently trying to learn Dewesoft's C++ script module. Unfortunately, there is no forum for it specifically so I am pressing all the buttons to try to find help. I want to write a code where I ...
1
vote
4
answers
132
views
Apply the same code, but in different columns
I already have the code I need. I just need to apply this code in different columns and I'm not being able to do it that. Right now, I'm only able to apply it in one column. That's the code below:
...
3
votes
3
answers
139
views
How to simplify a logic expresion in sympy?
I'm not sure if I'm doing something wrong, I have the following script:
X = sympy.Symbol('X', real=True)
Y = sympy.Symbol('Y', real=True)
ex = ((X >= 1.4) & (X <= 1.6) & (Y <= 0.5)...
4
votes
2
answers
116
views
How to reduce multivariate boolean expressions
I need to model a system of several boolean expressions in 512 variables. Due to the number of variables, I found the expressions are way too large to handle normally, which is why I need a way to ...
-6
votes
2
answers
178
views
make code without ```#include <cmath>``` in c++ [closed]
so i have a problem
Mr. Dengklek wants to make a square pond for his ducks, with the following conditions:
The area of the pond is between 100,000 and 200,000 square cm.
The area of the pond (in ...
0
votes
1
answer
99
views
Allocation of water to buckets from depots
The problem is that there are 2 depots with various sizes of buckets. They have some prefill volume of water.
I have different water allotment of these 2 depots.
The volume utilisation is defined as ...
0
votes
0
answers
75
views
When pressing a certain key to enter password change, the key is set as first digit of new password (pic16f877a)
Change Password function
ChangePassword:
MOVLW 0x01
MOVWF CHANGEMODE
MOVLW b'01000011' ;c
CALL LCDDisplay
MOVLW b'01001000' ;H
CALL LCDDisplay
MOVLW b'01000001' ;A
...
-2
votes
1
answer
100
views
CMP , DIV & MUL Questions
Last month I started to learn how to use Cheat Engine to script with zero knowledge and some things are not clear to me. My objective was to create a defense boost by dividing the damage taken by ...
0
votes
0
answers
63
views
¬q, (¬p⇒(¬q⇒¬r)), (s∨r), (s⇒t), and (p⇒t), prove t., using Fitch
I am doing an intro to logic course and have been set the above. The rules allowed are:
and introduction
and elimination
or introduction
or elimination
negation introduction
negation elimination
...
1
vote
1
answer
88
views
A way to condition JOIN lookup tables based on the id value of a (parent) lookup table [MariaDB]
I am trying to wrap my head around how to write a statement that can fetch data from multiple lookup tables but also incorporate an if condition that triggers certain JOINS based on the value of the (...
2
votes
1
answer
62
views
Calculate new indexes when shifting a column in a table
The following example scenario:
I have the column A with
RowIndex: 4
ColumnIndex: 7
I want to shift the Column A 11 places to the left so my resulting column indexes (B) are
RowIndex: 2
ColumnIndex: 6
...
0
votes
0
answers
42
views
Textract extract 2 columns of QUANTITY type data. What would be the best way to detect which is the good one?
I'm using AWS Textract with AnalyzeExpense to extract data from P.O.
But sometime, P.O. have "QTY ORDERED" and "QTY SHIPPED" and both are detected as QUANTITY. So I end up with 2 ...
0
votes
0
answers
38
views
How do i fix a logic error meaning that an incorrect piece is moved in my spritekit game?
I am making a basic chess game in Swift with Spritekit:
func moveSelectedPiece(to newPosition: (Int, Int)) {
guard let pieceToMove = selectedPiece else { return }
// Calculate the ...
0
votes
1
answer
38
views
Logic Puzzle: Normalize elements of array with minimum and maximum constraints
The sum of the elements of an array needs to be one while the elements adhere to certain maximum and minimum constraints. If the element is smaller than the minimum allowed value, it element may be ...
0
votes
0
answers
22
views
How to make an offset of a binary variable on GLPK
I have a binary parameter with one subscript WxTy[x];
And a binary variable with the same subscript WxTyOffset[x];
Additionally I have another variable called Offset and it is a single value (Offset);
...
2
votes
2
answers
85
views
python sympy satisfiable vs solveable?
I'm learning to use sympy and am doing
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = ...
1
vote
1
answer
88
views
Pyspark creating paring logic
I am working in Azure synapse and getting myself used to working with pyspark. I want to create a paring logic between lines in my df but I can’t get it to work. I have an ID column and a sequence ...
-1
votes
1
answer
22
views
Delete the same shapes in each slides
I have many PPT files, each PPT file has many slides and in each slides, there are many shapes.i want to delete the 2 shapes with the name "Google Shape;227;p3" and "Google Shape;228;p3&...
0
votes
1
answer
67
views
how to compare lists with their frequency
I'm interested in finding similarities between two lists. I have the count of duplicates in the first column, and the pattern is in the second column. What would be the most logical way to compare ...
1
vote
2
answers
150
views
How to get maximum average of subarray?
I have been working this leet code questions
https://leetcode.com/problems/maximum-average-subarray-i/description/
I have been able to create a solution after understanding the sliding window ...
0
votes
2
answers
41
views
Binary search 704 leetcode calling a function in python 3
class Solution:
def search(self, nums: List[int], target: int) -> int:
#establish a left and right limit
l = 0
#this will take from the right and push more ...
1
vote
4
answers
166
views
Checking if a string of "a" and "b" can be reduced to empty if duplicates occur consecutively
I'm trying to approach this issue with O(n) so I'm using a stack. In this code:
def can_reduce_to_empty(s):
stack = []
while True:
n = len(s)
i = 0
new_s = []
...
0
votes
2
answers
80
views
I'm having difficulty definining a property in Coq, not sure how to approach
I've implemented a proof system from a paper in Coq, as shown below.
Term proof System
Require Import Ensembles.
Definition Var := nat.
Definition Name := nat.
Inductive Term: Type :=
| VarTerm (v: ...
0
votes
0
answers
181
views
How is division ("/" operator) synthesized in verilog?
I have seen some mixed answers for whether or not the division operator "/" could be synthesized for constant values that are not a power of 2 so I went ahead and tried it using Synopsys ...