Posts by axell-brendow • 605 points
22 posts
-
0
votes1
answer470
viewsA: Quicksort in double chained list
Try to change: if (esq < j) for: if (j > esq) and comparacoes += quicksort(esq, j); for: comparacoes += quicksort(esq, j + 1); // A direita da próxima partição deve ser o índice posterior ao…
-
1
votes2
answers520
viewsA: Create . jar of a multi-package project, without IDE and on the command line
I discovered the problem after carefully analyzing the solution of this link. From what I saw, the big problem was adding the bin folder inside the . jar. There are two simpler ways, on the command…
-
1
votes2
answers520
viewsQ: Create . jar of a multi-package project, without IDE and on the command line
When doing a search for the websites of Stack Overflow, I realized that all topics only teach how to create the file . jar of a single class or even teach how to create the . jar of an entire…
-
1
votes1
answer146
viewsQ: Difference between commit done on the github website and on the command line
Problem Different contributors to the same account in the repository. Historic When I created the repository, I uploaded some files from the github site itself and the commits were registered as…
-
7
votes2
answers595
viewsQ: "Operator" square brackets [] when creating the arrangement in C
Whenever I look for what the operator clasps [] makes, even in the tables that show all operators in C, appears that it serves to access an element of an arrangement. However, it is not always that…
-
2
votes1
answer124
viewsA: Delayed expansion in loop body is using /f option
I searched Stackoverflow in English and found a post saying that it is simply not accepted delayed Expansion in the body of the for, so I decided to use the suggestion given by the user in one of…
batchanswered axell-brendow 605 -
2
votes1
answer124
viewsQ: Delayed expansion in loop body is using /f option
I reduced the code to be brief: @echo off setlocal EnableDelayedExpansion set /a n_tokens=2 for /f "tokens=!n_tokens! delims=\" %%s in ("Program\Executable") do ( echo %%s ) pause > nul I know…
batchasked axell-brendow 605 -
10
votes5
answers80372
viewsA: How to "round" a float in Python?
Very simple: def arredondar(num): return float( '%g' % ( num ) ) print(arredondar(0.1 + 0.2) The way out: 0.3.
-
2
votes1
answer1551
viewsQ: Get self variables from another class and custom event
Read only comments in English, the question of self is in comments in the code, now the events will be down there. class LOL: class Champions: class MasterYi: def __init__(self): #YiAttributes…
-
1
votes3
answers861
viewsA: Time Count For Move (Threads)
I came back in the code and I realized I just changed the function void player() that worked exactly the way I wanted it to, so it went like this: static void player() { Console.Write("Player1…
-
1
votes3
answers861
viewsQ: Time Count For Move (Threads)
What you need to answer the question is comments in the code: using System; using System.Threading.Tasks; class Program { static void Main(string[] args) { player1.Start(); t.Start(); while…
-
0
votes4
answers1177
viewsA: How not to repeat terms on printf
#include <stdio.h> int main(){ int a[5] = { 110, 2, 99, 99, 106 }, b[7] = { 2, 7, 8, 9, 110, 99 }, i = 0, j = 0, N99 = 0; char numrepet[5] = {NULL, NULL, NULL, NULL, NULL}; for (i = 0; i <…
canswered axell-brendow 605 -
2
votes4
answers3497
viewsA: How to prevent the user to enter numbers for a given data?
Only Put This On Keyreleased Event: char[] text = txt.getText().toCharArray(); if (txt.getText().length() > 0){ for (int i = 0; i < text.length; i++){ if (text[i] >= '0' && text[i]…
-
-4
votes2
answers216
viewsA: Loop End Error (Bug delete with char*)
I solved it in a simple way: instead of char* n I’ll use string* n. Ready, the delete non-Boat I managed to resolve the void DimDim() Now she’s like this void DimDim(__int8 pos, int* numeros) And to…
-
-3
votes2
answers216
viewsQ: Loop End Error (Bug delete with char*)
1 - I have this code (Gave An Abridged, Type -1, And Then 'n' To Exit The Loop And Make The Mistake): #include <iostream> #include <cstdlib> #include <cstdio> #undef max using…
-
3
votes3
answers4136
viewsA: Program does not read scanf
Actually the problem is in the first and second scanf, when you press ENTER there in the first scanf the string is read and sent to variable but the ' n'(ENTER) is in Buffer (The string too, but…
canswered axell-brendow 605 -
2
votes1
answer691
viewsQ: Get titles from open windows
I have a C++ program that arrives in a certain part that I need to check if a window is open, if it runs a part of the code. How could I take the windows open and do this check? I found a link that…
-
1
votes1
answer463
viewsQ: setTimeout Does not Wait The Time
I Have This Code: <html> <form method="POST"> <textarea name="txt" value="" rows="5" cols="100"></textarea> <br></br> <input type="button" name=""…
-
4
votes3
answers1363
viewsQ: "Decode error - output not utf-8" in Sublime Text
I’ve looked at several websites, several questions (including in stackoverflow itself) I did a lot of research and I couldn’t get this error out of Sublime Text 2 yet: [Decode error - output not…
-
4
votes1
answer612
viewsQ: Connect and disconnect Internet?
I would make two . exe basic, one would be to disconnect the Internet and open one program and the other would be to just connect to the Internet. The part of opening the program I know, now…
-
2
votes1
answer63
viewsQ: Get an X-size from a Picturebox?
I have a Picture Box, and in some part of the code I edit the horizontal size (x) of it, then further down in the code, I need to edit only the vertical size (y). I want the size of (x) to remain…
-
0
votes2
answers112
viewsQ: Reactivate form to closure of other
I have a form main and from this form I click on a button and open another form, So when I open this other form I disable the main one, so that’s okay, so I wanted when the user closes the second…