Posts by Leila • 1,276 points
65 posts
-
3
votes1
answer56
views -
1
votes1
answer246
viewsQ: Dropdown with dynamic options in Django form
I have an expense form that has a field to select the category, but I need the options to be obtained from the database. These days this is mine forms.py: from django import forms from .models…
-
-1
votes1
answer136
viewsQ: When running two Django projects at the same time, one of the two users is dropped
I am working on two projects that share the same database, and so the same users, but they are two different projects on different servers. The point is that when accessing both at the same time…
-
0
votes1
answer61
viewsQ: Insert direct tuple with SQL in a Django view
I’m using Django in two projects (let’s call Project1 and Project2) that relate and share the same database, but because they are different projects, they do not share the same apps. Now I need to…
-
0
votes0
answers25
viewsQ: Set a Datefields Arrayfield
I need to store several dates in a Django model (I’m using version 2.1), I was able to create several fields, thus: date1 = models.DateField(null=True, blank=True, verbose_name="Data da parcela 1")…
-
0
votes0
answers69
views -
1
votes0
answers51
viewsQ: Javascript Datepicker calendar displaying wrong year
I am working with Django and using a datepicker to select the date in a form field: <h3>Data de recebimento</h3> {{ form.creation_date }} <script> $(function () {…
-
1
votes1
answer806
viewsQ: Error including app urls in project.py urls
I’m at the beginning of a project with Django 2.2.1, creating the first apps and making the links between the pages. In the project’s urls.py, including the Accounts urls worked (with the…
-
1
votes1
answer106
viewsQ: Place the fields of a Django form on the same line
I have a form in Django and in the template I display the fields to be filled: <div id="interval" class="form-inline form-group"> <div class="two wide field"> {% for price in prices %}…
-
0
votes1
answer183
viewsQ: How to create a view with more than one form in Django
I have model, form and template for units, and in this same template I need to add a region form (these are exams). How can I add this form in the view so it can be edited in the drive template? py…
-
2
votes1
answer448
viewsQ: Pass variable javascript to Django Form
I have a Django form with this "Linked Exam" field that works as follows: The user clicks on Select Exam, goes to another window in which selects an existing exam, and with it returns to the…
-
1
votes1
answer523
viewsQ: Return to a page with completed form
I’m using Django and I have to implement the following flow: The user fills in the information of a new exam, clicks on attach an old exam, goes to the exam search screen, selects the desired exam…
-
1
votes0
answers126
viewsQ: Nuget Package Manager Console Not Available
I was using the console normally just now, then a command would not finish and closed the window. But now I can’t open another console window. I believe that the command is not yet running, because…
-
0
votes1
answer139
viewsQ: Unit tests with Nunit in function with Jsonresult type return
I’m trying to do unit testing in the following function (there are more ifs, but I believe this is enough to illustrate), using Nunit. The problem is that I am unable to treat the return of the…
-
1
votes0
answers48
viewsQ: Filter results from a Bootgrid table
The project uses the Bootgrid to create tables, and although it hasn’t been updated for a while, I can’t switch to another :/ Thus, I need to implement a filter based on the value of a range slider.…
-
0
votes1
answer112
viewsQ: Create new directory according to string
I have a function that saves an image in a default directory, for all companies, and I tried to change this to save in a directory according to this string companyFolderwhich I have created. Yet you…
-
1
votes0
answers92
views -
0
votes1
answer295
viewsQ: What is the difference between Train Test Split and Holdout?
From what I have already researched, both divide the set into two subsets of training and testing. There is some difference between the two?
-
1
votes1
answer193
viewsQ: Random Forest with very high accuracy
I’m working with this dataset And I applied Forest Random to create a price forecast model, but the accuracy of the model is getting too high, so I’m suspicious if something is wrong. Apparently…
-
2
votes2
answers3831
viewsQ: Dataframe Pandas - Calculate column based on other
I have a dataframe in the following format: colunas = [ 'COMEDY', 'CRIME', 'Classe Prevista' ] precisao_df = pd.DataFrame(columns=colunas) precisao_df['COMEDY'] = y_pred_proba[:,0]…
-
1
votes1
answer299
viewsQ: Bag of words in Python
I have a news dataset and I want to separate them between two classes. For this I thought about using Bag of words, but I’m not getting it with Sklearn. I tried the following: #Bag of words from…
-
1
votes1
answer1971
viewsQ: Import and manipulate json in Python
I am trying to import a . json file with the following structure: short_description:She left her husband. He killed their children. Just another day in America. headline:There Were 2 Mass Shootings…
-
3
votes1
answer408
views -
2
votes1
answer1151
viewsQ: What is English variable in English?
I’m doing a job on Prolog and when trying to make a query it says there are "Singleton variables". For example, a part of the code: s([Policia_X, Policia_Y, Ladrao_X, Ladrao_Y]) :-…
-
1
votes1
answer276
viewsQ: How to represent a matrix in Prolog?
I am doing a work on Prolog that consists basically of a search problem, there is a scenario in a two-dimensional environment and one must trace the path that one character must follow to get to the…
-
11
votes3
answers514
viewsA: What is the purpose of the software development sequence steps?
Requirement As the term says, it is what is required, what is desired to be done. For example, a customer needs an online chat app and looks for a development company to implement it. At this stage,…
-
2
votes3
answers5610
viewsQ: Function that checks whether a vector is in ascending order
I’m doing an exercise that says: Critique the code of the following function, which promises to decide whether the vector v[0.. n-1] is in ascending order. int verifica (int v[], int n) { //n é o…
-
2
votes1
answer63
viewsA: String marking and value return
Well, there are some errors in the code, like scanf("%d", &loja1); Because being vector is already a pointer to int, then put the & causes the variable to be of the type **int, then the…
-
1
votes1
answer1293
viewsQ: Read from txt file to char vector
I have a file dados.txt with (fictitious) Cpfs in the following format: 382031758-71 647900189-01 460754503-73 696170135-72 And so on, being in total 500 cpfs. I’m trying to read each and put in…
-
0
votes1
answer204
viewsA: Detect digit repetition in Java
Well, I’ve come up with a solution that may not be very efficient, but at least it doesn’t use vector. Since it has only 10 possible digits, you could have 10 variables (which sounds strange and it…
-
0
votes1
answer34
viewsA: How to verify that the limit of a vector has not been exceeded?
If the vector has static size (I’m going to assume yes, since there is a limit), you set the size at some point, right? For example, I will consider the following: #define MAXTAM 100 Having this…
-
1
votes2
answers12278
viewsA: C: Change color of letters (multiple colors on one screen)
An easy way to do this in C is to use the ANSI code of the colors. At first you create a constant to store the ANSI for each color: #define ANSI_COLOR_RED "\x1b[31m" //cores em ANSI utilizadas…
-
0
votes1
answer166
viewsQ: Treat functions that return multiple Python values
For example, I have a function mergeSort(alist)that has return return count, blist i.e., returns an integer that is the inversion counter and a list of values. When passing a list 5 4 3 1 2 5 and…
-
0
votes1
answer166
viewsA: Treat functions that return multiple Python values
While writing the question occurred to me something very simple, I tested and it worked so I decided to continue the question and leave the answer in case someone has the same doubt. Considering the…
-
2
votes2
answers684
viewsQ: How to detect line breaking in Python input?
I need to read test cases of the following format: 3 1 2 3 4 52 2 1 87 10 51 32 1 36 21 34 32 12 34 45 200 (... 200 numeros separados por espaço) and so on, where the first number indicates the…
-
0
votes2
answers1690
viewsQ: Change Python string
I’m making a program to sort the numbers entered (I can’t just use a sort algorithm), searching saw that it is not possible to change strings in python, is there any way to do this? Or maybe use…
-
1
votes1
answer51
viewsA: Needing Help in Vector C Exercises
Just putting v[i] in print, you cannot print because you are not indicating which is the index i. To print all you must make a loop the same way you did to read, but with a printf instead of scanf:…
-
1
votes1
answer591
viewsQ: Struct declaration and initialization outside the main function in C
I’m playing a little game in C that has the card structure: typedef struct { int numero; int cor; } TipoCarta; A method to put the values in the chart: void inicializaCarta(TipoCarta *carta, int…
-
0
votes1
answer130
viewsQ: C++ program stops responding when calling a function a second time
I’m doing a simplified game in the style of Pokémon, but is stopping to answer when calling Bootpokemon for the second time, I’m not finding the problem because it works normally with the first and…
-
1
votes0
answers241
views -
2
votes1
answer97
viewsA: Error in my data structure [STACK]
Where are you making a mistake? I circled here, used E to stack, typed an hour and a phone number (both integer), then put to list and were there. Here appeared two messages: unknown escape sequence…
-
1
votes0
answers673
viewsQ: How to use a Figma layout in Android Studio?
I have a project in Figma with some screens, for example the image below: Figma generates the XML or SVG code of each component, such as the "screen": <!-- layout/*.xml --> <RelativeLayout…
-
0
votes1
answer56
viewsQ: How to use Rncryptor and Firebase?
I’ve been researching ways to encrypt the user data of an Android application that uses Firebase. In this article Rncryptor is recommended, but without details of the implementation. I found this…
-
1
votes1
answer472
viewsQ: Create new Ode in Firebase
I’m developing an Android chat room app using Firebase. The current structure is as follows (being Assedio, Beauty etc rooms): To date, user data is being stored with the Firebase standard,…
-
2
votes0
answers695
viewsQ: How does data encryption work in Firebase?
I am developing an Android messaging application using Firebase and I realized that it will be necessary to protect the user data and the messages exchanged by them, because at the moment it is…
-
0
votes2
answers275
viewsQ: How to create a configuration screen in an Android app that appears only at the time of user registration?
I’m developing an app android with Firebase authentication, I need to put a screen in which the user will define a "nickname", but it must be immutable. So, this screen needs to appear right after…
-
0
votes1
answer85
viewsQ: How to get gender from a Google user in an app using Firebase?
I am developing a native Android app and the way of authentication is through the Google profile. I would like to get the gender of each user, at the time of signup, to check whether it is male or…
-
3
votes3
answers132
viewsQ: Is there a "description" language of UML?
This may be a really silly question, but I did my research and I didn’t find anything in the sense that I was thinking. I’m studying UML in college, and although it’s just dragging the components to…
-
10
votes3
answers21607
viewsA: What are the concepts of cohesion and coupling?
I know the topic is a little old, and it’s been answered, but my teacher spent an exercise asking difference between cohesion and coupling, and then gave the following answer. As I found well…
-
2
votes0
answers1558
viewsQ: Is there a collaborative online tool for Use Case Diagram and Sequence Diagram?
I have to do a college group work consisting of making use and sequence case diagrams. In order not to have to keep downloading files, editing and re-sending to other members of the group, there is…