Posts by Patrick Machado • 181 points
20 posts
-
0
votes0
answers35
viewsQ: C++ Screen position gets weird when I try to convert from Getcursorpos to Sendinputs function
I used the function GetCursorPos to pick up positions on the screen I would like the mouse to be able to click to perform a task for me and automate the service. I tested selecting these positions…
-
0
votes1
answer39
viewsQ: Stop a worker and continue the Parallel pool in Matlab
I have a code with a parfor simple in Matlab that calls the Workers. parfor valor= 1:fim [output, out] = Computacao(dado1, dado2, int32(valor)); end within the function that is called have an if for…
-
0
votes0
answers30
viewsQ: How to keep the source in Qt5 when DPI increases
I am having problems when I pass my UI to a user who has a visual windows configuration different from mine. If the user display is at 125 or 150% my UI gets huge fonts in the Labels while the other…
-
1
votes1
answer180
viewsQ: How to pass a double pointer as argument and return it from C++ function
I have a function I need her to be void and that a Double Pole be returned from her by the argument. void cracking::decompose(char input[][100], int size_S, double* &Atm, int* &ID, int…
-
1
votes1
answer100
viewsA: vector<double> using ctypes for DLL in Python
It seems that there is no direct way to solve this using Ctypes, I found that the best way to solve this problem is by changing the . dll It is necessary to put a double pointer on the argument and…
-
0
votes1
answer100
viewsQ: vector<double> using ctypes for DLL in Python
I own a .dll that within it has a function BOLHA that returns a double. The problem is that BOLHA has a vector<double> in the argument. extern "C" minhaDLL_API double…
-
1
votes1
answer70
viewsA: pass a struct using extern C on a . dll c++
It seems we only had to declare one extern "C" of struct in the header of .dll also: extern "C" struct tabela; so far as I understand it converts the struct of .lib original and works correctly the…
-
0
votes1
answer70
viewsQ: pass a struct using extern C on a . dll c++
I have a function that comes from a . lib that returns me a struct tabela GSTV(vector<double> inpA, vector<double> inpB); this struct is defined as follows:: struct tabela {…
-
1
votes1
answer72
viewsQ: How to check if the function would generate an Exit in C++
I have a .lib with some functions. I defined that when the calculation of some function generates values outside the range allowed it to exit(). Now my C++ code that uses this lib need to calculate…
-
0
votes1
answer79
viewsQ: Allocate space to a double vector vector vector
I’m trying to allocate space in memory for a double vector vector vector. I know that for a vector vector I can do vector<vector<double>> Vetor(51, vector<double>(47, 1)) And this…
-
0
votes1
answer40
viewsQ: Google test compare vector C++
I’m building a project and trying to use google test to compare the result of some functions. The problem is that my functions return double vectors and I can only compare double or whole in google…
-
1
votes1
answer466
viewsQ: Shortcut by initial letter Optionmenu in Python Tkinter
I have an Optionmenu in Tkinter in Python which is a large list, when I press the letter G for example it does not direct me to the elements with the letter G and also does not allow the use of…
-
1
votes1
answer308
viewsA: how to remove CMD window after using.system in python
I figured out how to do. I can replace os.system() for: subprocess.Popen([File],shell=True) So it does not lock the code and does not open the CMD window.…
-
2
votes1
answer308
viewsQ: how to remove CMD window after using.system in python
I have a Python 2.7 code that opens a PDF with os.system('meuarquivo.pdf') and it opens right. But when opening the file it also opens an empty CMD window. Is there any way I can close this window…
-
0
votes1
answer2903
viewsQ: Adjust Tkinter window and widjets according to screen resolution
Hi, I’m developing a python GUI with Tkinter. I’m trying to get the widgets setup I set up to fit the monitor resolution. I applied the following code. janela = tk.Tk() lado, cima =…
-
0
votes1
answer32
viewsQ: Compare to remove_if in c++ does not accept char
Hello, I’m trying to use a remove_if in c++ but when it gets to the input part I can’t determine for it to detect if the string I’m pointing has a char. Follows my code:…
-
0
votes2
answers337
viewsQ: detect repeated char in c++ string
Hello, I’m trying to make a code to detect the occurrence of parentheses Na(CO5(Pt Let’s assume something like, I would have to detect the position of the two parentheses that are in the string. I…
-
3
votes3
answers400
viewsQ: How to return 2 vectors of different types in C++
I perform a calculation and my result is saved in a vector<int> and a vector<string> How do I make my function return these two parameters in mine main()? int cracking(string chemform) {…
-
1
votes0
answers57
viewsQ: C code only compiles once and then closes
I have a code that I am writing in C, and then a problem is constantly happening. I don’t know if it has anything to do with memory allocation. I have a function: struct elementodos…
-
3
votes1
answer751
viewsQ: Return of Struct in C
Hello, I’m trying to return a struct from a function when it’s called on main. I did the whole function and set in the end two elements which are calculated in function: int mult[100]; char**…