Posts by Killdary Aguiar de Santana • 718 points
30 posts
-
2
votes1
answer83
viewsA: I would like if someone can identify my error in this code in python:
Well your code could be improved in several ways, but let’s just focus on how to make it correct. The problem is due to several repetitions that your code has(for j in d:), you go through the list…
pythonanswered Killdary Aguiar de Santana 718 -
1
votes1
answer321
viewsA: DROP permission of tables in SQL Server databases
Good the command EXEC sp_MSForEachTable It’s an undocumented Sqlserver trial. It is very good when you come across an activity, where you need to execute a command on all tables. This precedent…
-
1
votes2
answers268
viewsA: Pass controller data to EJS
You’re just passing the content heuristic_values in the rendering of ejs and not the variable itself, if you want to access a variable in your view you must specify its name as follows:…
-
1
votes1
answer29
viewsA: Mysql condition for unit of measure specific value
In your case just make use of a condition with the IF in your select that will work, the IF should see the unit of measure to do the multiplication. SELECT SUM(IF(UNIDADE='TON', i_prod_quant*1000,…
mysqlanswered Killdary Aguiar de Santana 718 -
1
votes1
answer1993
viewsA: how to resolve Missing 2 required positional argument python
Win your code presents some indentation flaws, I do not know if it was failure to pass the question but let’s go. Failure indicates that your method calculo is not receiving two parameters and it…
-
1
votes1
answer632
viewsA: Pandas: Convert Dataframes to Image
To convert the dataframe to image you must use the matplotlib, there is a function called imshow module matplotlib.pyplot where is passed the Feature(x_i) of the dataframe you want to mount the…
-
1
votes2
answers98
viewsA: Layout ratio difference between Form1.Cs[Design] and . exe
You are using windows Forms so I advise you to use the Anchor property to fix its proportions and distances relative to the form border, if you put the Anchor as top in all your input fields they…
-
1
votes1
answer329
viewsA: Problem with multiplication of matrices in python
Your code doesn’t print anything so you’re thinking it does nothing, I made some modifications to your code: Your method does not receive any parameter pass the matrices by parameter def mult(mat1,…
python-3.xanswered Killdary Aguiar de Santana 718 -
1
votes1
answer75
viewsA: Problem with checking existing person in Python chained queue
Alex by the way you seem to be passing an object with the attribute nome empty so it does not exist and you are making a comparison elif pesquisar_pessoa.nome == "". Just fix the third line of the…
pythonanswered Killdary Aguiar de Santana 718 -
1
votes2
answers90
viewsA: Change Directory and run command
Basically you want to list the files within a folder and perform an action for the command? So you don’t need to run a shell to run the python command just make python run the file listing and check…
pythonanswered Killdary Aguiar de Santana 718 -
0
votes5
answers192
viewsA: Code executes a line that should be conditional
Your if and is correct, but the else it does not receive any parameter or boolean expression, as it is a consequence of if, where the literal translation would be: if totalf is non-zero print XXXX,…
-
0
votes1
answer397
viewsA: How to run python code by anaconda prompt with php?
I believe your problem is quite similar in running a prompt that is not the default Windows prompt, you can run the prompt similar to powershell running in the example below, replace it with the…
-
0
votes2
answers457
viewsA: Pool exercise in python
Good afternoon Yancruz32, For you to calculate the percentage of each bettor just add up all the bets and split each person’s bet by the total amount, so you get the participation percentage per…
pythonanswered Killdary Aguiar de Santana 718 -
0
votes1
answer57
viewsA: Dynamically create div
It seems to me that you are adding Divs with the same ids, and when you run your method to changeFields it changes only the ids that are #selectBoolean, #selectVinculo, #selectColor, #selectFX. You…
-
0
votes2
answers228
viewsA: Can I create a Foreign Key between 3 tables?
Friend depends on the structure you are creating and relationships can change: In case your structure has an actor per series and movie you can add a foreign key in Movies and series to Actors:…
sqlanswered Killdary Aguiar de Santana 718 -
0
votes1
answer40
viewsA: Doubt - SQL Server - Using Union
From what you explained you want to take the data as many Active as inactive, you can give an active CGC subquery and perform a inner join in Inactive, the problem is that it will return all…
-
0
votes1
answer422
viewsA: X-axis customization in matplotlib
It seems that you are mounting the X axis in the date column, but most of your dates are the same as what changes is your time column. The data is out of order, sort the data by date and time, then…
-
2
votes1
answer46
viewsA: Edit a list that is inside another list
Good afternoon, Your question was not clear enough, but by the tags and the type of data in the list I will assume python algorithm with a string list. There are several ways you can turn your…
-
3
votes3
answers4131
viewsA: Join columns in python?
Good afternoon Helena, You can format the string in any format you want using the str.format() which in this case is a method already contained in the string type. In this case you can use it as…
-
0
votes1
answer45
viewsA: Iterate over an array and save to a Dict
Good morning, Your answer is almost correct, for your script to work you should put the unique only in row not in array[row,], also there is a row identifier, you can create a dictionary for each…
pythonanswered Killdary Aguiar de Santana 718 -
1
votes2
answers1403
viewsA: Transform a char vector into a vector of int in C
You can use the sscanf is a user-friendly method and present in stdio.h. char myarray[5] = {'-', '1', '2', '3', '\0'}; int i; sscanf(myarray, "%d", &i); There are also other options like atoi…
-
3
votes1
answer705
viewsA: How to extract information from an HTTP header with Python?
Good morning buddy, Your problem briefly is that you want to count how many occurrences of this pattern you had in your messages, one way you do this check is by using REGEX. Suppose your headers…
-
6
votes2
answers291
viewsA: Perform another action during a await Task.Delay
Good morning, So you informed you need a new thread to carry out the 10 minute action. In this case you have two simple possibilities to use: Task: you create a new Task library…
-
1
votes1
answer2222
viewsA: import package in Spyder, Python
Good night, Your problem is not affected by the version of your Ubuntu, the fact that should be seen is which interpreter your Spyder is using. Most distros come with python by default, I never…
-
3
votes1
answer106
viewsA: How to return a Mysql query with specific characters within each cell?
Good night, my friend, To perform this action just use the command SUBSTR(str, pos, len) from Mysql itself, in this command you must place the string and the desired start and end positions. Ex:…
-
1
votes3
answers347
viewsA: Import csv as float
Good morning, Friend when analyzing your command it is correct, your problem may be in your file .csv, the pandas infer the dtype automatically based on imported content, although much of your csv’s…
-
4
votes2
answers2474
viewsA: error to import pandas library and numpy
Good morning, my friend, By what you are reporting the problem is not in pycharm but in the interpreter of the project. You must go on : File(File) -> Settings(Settings) -> Project(project)…
-
2
votes1
answer255
viewsA: Mysql - Update on every Row
Good morning, @Pabloabreu from what I read in the comments of your question you want to update in the table users with data from your table shop, for this you want to perform an update with select:…
-
4
votes1
answer68
viewsA: DELETE statement does not delete by php but by phpmyadmin the instruction works
When you put the single quotes the SQL command starts to consider the value as a VARCHAR, if the type of the tuples is different from VARCHAR or a DATE, an INT for example, the quotation marks…
-
0
votes2
answers90
viewsA: UPDATE in a query with multiple entries
Good morning, you are doing the update and select separately, to perform all the updates at the same time you could perform the update and select in a single query UPDATE Pedidos SET…