Posts by Phil • 327 points
21 posts
-
0
votes1
answer326
viewsQ: Pass view parameters to Django form creator
I have the following application where it is supposed to be possible to edit the details of a selected room. In the file that handles the view I query the database of the selected room for editing…
-
0
votes1
answer49
viewsQ: Load a variable from another funtion
I have the following question which I could not solve through research. I have a function that within it I create a variable to perform a count, and later I need the final value of that count in…
-
1
votes1
answer46
viewsQ: Check if a certain value is in the vector
I created the vector fragil that will accept various inputs from the user, inputs that will (or will not) be the position of other elements in another matrix. I used the following function to create…
-
4
votes1
answer117
viewsQ: Resize a vector in Matlab
Good afternoon. Here’s the following, I used the following function to create an empty array that later stores certain values requested from the user: fragil = zeros(1, 10); %criaçao do vetor idF =…
-
2
votes1
answer64
viewsQ: Illegalargumentexception when adding components to Jframe
I’m doing a project of the game Sokoban, and I got to the part where I created 2 Jbuttons to select the level. Now when I try to run a program, it’s a mistake. I created both buttons and action in a…
-
0
votes1
answer187
viewsQ: SQL server error to create table
I tried to create several tables in SQL but 2 of them gave the same error: "Msg 1767, Level 16, State 0, Line 72 Foreign key 'Fk__movimento__codem__3118447e' References invalid table "emprestimo".…
-
-1
votes1
answer45
viewsQ: Error in code by classes
Good.I have now started to study java programming that includes several classes in which one flame another. But I’m facing a mistake I can’t understand. I looked for codes with similar effect and I…
-
2
votes1
answer59
viewsQ: Optical illusion parallel lines
I have the following exercise that asks me to draw an optical illusion like the following: But I’m not finding a simple way to make the code so that it does this progression where it goes one square…
-
0
votes1
answer80
viewsA: Error while running void start()
I managed to solve it seems that the problem is in the file itself,IE, creating a new project and copying the same codes will be all right.
-
0
votes1
answer80
viewsQ: Error while running void start()
Good, I was doing some coding of the proposed exercises. When I went to execute the following error: java.lang.IllegalStateException: Toolkit not initialized at…
-
1
votes1
answer252
viewsQ: Input in javafx
I have the following program that draws an illusion of Pogendorff but I need that before he runs ask the number of rectangles and by chance of lines. That is, the N_BARS be put by input provided for…
-
2
votes1
answer197
viewsQ: Problem drawing chess board with objects
An exercise asks you to use basic objects of the type Rectangle, Polygon, Elipse... I used cycles for but only part of the board appears correct. I leave below the code: import javafx.application.*;…
-
0
votes1
answer249
viewsQ: Doesn’t Index work on Arrays?
I have the following code that holds an array of 7 values, each for each day of the week. then I have to create a function that sums these 7 values (successfully concluded), tells what is the…
-
0
votes2
answers418
viewsA: Error . class expected
I ended up being able to solve in a very simple way. But it was based on the first problem I posed. Ended up like this and runs without problems: System.out.println("Indique um número entre 1 e…
-
0
votes2
answers418
viewsQ: Error . class expected
The program is supposed to ask for a number between 1 and 12. (I haven’t gotten to the part of certifying that it’s between 1 and 12 but this is the easiest.However I’m supposed to write the code…
-
0
votes1
answer44
viewsQ: Prevent repetition of an element in a part of the code
I have the following exercise that asks me to define an interval and sum all the even values of that interval showing which numbers are summed between them, like: Min=10 Max=15 10+12+14=36. However.…
-
0
votes1
answer1247
viewsQ: How to make an asterisk triangle in java
I want to get the following output: n:4 + ++ +++ ++++ That is, I insert an "n" and I will get a kind of triangle in which the base corresponds to a number of asterisks that is requested by input. I…
-
3
votes1
answer26
viewsQ: I don’t understand an ordination resolution
The teacher asked for the next exercise: "Write a program that receives three scores (integer numbers); sort these scores using if instructions and write the three in ascending order on the screen."…
-
2
votes1
answer956
viewsQ: Creating a conversion table from Fahrenheit to Celsius degrees
Write a program that given two temperatures in Fahrenheit degrees (integer values) produces a table with all values in this interval of half degree Fahrenheit. For example, the execution of the…
-
1
votes2
answers61
viewsQ: Why do even numbers not have the same output as odd numbers?
I made a program that asks the user for a number that will serve maximum value. And then the program shows which even and odd numbers from 0 to that number. I used printf to have an output like: Os…
-
0
votes1
answer109
viewsQ: How do I calculate the percentage of the right number of answers?
Good, I think I have already achieved what I wanted to thank everyone my only doubt is whether a new number is generated every time the user enters a new guess,here is the new code: System . out .…