Posts by Curi • 463 points
28 posts
-
1
votes0
answers22
viewsQ: Structuring data from DB
Hello fellow developers, I have a query that brings geographical areas that are contained in larger units of area; these larger units are received via params (id) and may be one or more, without…
-
0
votes1
answer72
viewsQ: Does not load video tag [ HTML ]
I can’t upload video to my React application. I’m using Chrome but I also tested it in Safari. It only generates a white screen. The tag is recognized because when I use Controls it enables. But the…
-
0
votes0
answers12
viewsQ: Standalonesearchbox launching error - React-google-maps
my React application is returning error Uncaught Typeerror: Component.unregisterAllEvents is not a Function for the Standalonesearchbox of the React-google-maps. I’ve tried everything, even going…
-
-1
votes1
answer31
viewsQ: Strategy for big queries
I’m working on an application that features a map and needs to render hundreds of thousands of markers. The data for rendering is in the database and the query is costly. There is also the challenge…
-
-1
votes1
answer149
viewsA: Laravel route with error 404
I solved the personal problem. In case I needed to call the command php Artisan optimize to reset the cache of settings, routes and files. Success! D
-
-1
votes1
answer149
viewsQ: Laravel route with error 404
I am working on an implementation with React and Node (services), but the API is in Laravel. To bring information from the database I needed to create a route, in a preconfigured group. But when I…
-
0
votes0
answers57
viewsQ: How to undo a Migration that has reference (References)?
I have a Migration that adds a reference to a column (foreign key), but at the time I run db:migrate:undo He doesn’t break up the relationship at the bank. After some tests the migrations continue…
-
1
votes1
answer524
viewsQ: Integrating Google Maps with React JS
Personal talk, I’m having trouble integrating Google maps into React. I saw many people with this doubt, although the documentation of the api is quite complete, most of the examples I saw are…
-
1
votes1
answer62
viewsQ: I fell in a Callbackhell?
My class is consuming a weather webservice through the method _interceptaClima(). Notice that I’m treating the answer through callbacks. The problem is that in the method calculaDesafio(), where I…
-
1
votes0
answers36
viewsQ: Difficulty to complete slide animation
Speaks friends, I am trying to make a slide using animations with the opacity property. I want the first photo to be the starting point and not suffer from the effect of animation, then I set None…
-
0
votes0
answers62
viewsQ: Selectedindex does not work
I am validating a small form and can’t do it using the property selectedIndex. Code that is not working: const movimento_loja = window.document.getElementById('movi') function camposPreenchidos() {…
-
4
votes1
answer80
viewsQ: Using the Strategy standard when it affects other parts of the system
... serves to define a family of algorithms, encapsulate each of them and make them interchangeable. Strategy allows the algorithm to vary regardless of the clients using it. Okay, I get it. But…
-
1
votes1
answer37
viewsQ: How to adjust an image to the exact length of the screen?
I’m completely new to HTML, and I’m trying to use an image at the top of the site as a sort of header (I want it to occupy the entire screen extension). Follows my code: #topo { width: 100%; }…
-
0
votes1
answer45
viewsQ: Construction and Class Abstraction
I am developing a small project that takes care of organizing and controlling the daily sales of a retail seller. Basically the user will impute their sales and kpi’s and the application will try to…
-
-2
votes1
answer69
viewsQ: Filtering information from . JSON
I have the following script: import json import requests def clima_semana(): requisicao = requests.get('http://api.openweathermap.org/data/2.5/forecast?q=Rio de…
-
3
votes1
answer179
viewsQ: Printing tabular form lists with generators
I have a list that represents 5 one-month periods with 31 days, and each period contains daily target values for a retail seller. Only for elucidation purposes would the empty structure be like…
-
5
votes2
answers46
viewsQ: Interpretation of Dive into Python on exceptions
Here is an excerpt from page 47 of the book 'Dive Into Python' about exceptions: "...You don’t need to Handle an Exception in the Function that raises it. If one Function doesn’t Handle it, the…
-
3
votes1
answer98
viewsQ: Why when ordering a list with Sort(), returns None?
The following script sorts a dictionary: d = {'a': 10, 'g': 15, 'c': 67, 'z': 90, 'e': 144} ordenada = list(d.keys()) # gera uma lista das chaves do dicionário (protegida por uma tupla)…
-
0
votes1
answer66
viewsQ: Custom menu
I’m creating a simple script with a def I printed out a custom menu. The first parameter is the header, followed by the number of items accessible by the menu and finally a third parameter that is…
-
0
votes1
answer93
viewsQ: Basic closures
Sirs, I’ve been studying Python for about four months and now I’m entering the most complex concepts of language. I’m having a little trouble assimilating decoradores but I understood that first I…
-
1
votes2
answers113
viewsQ: Encapsulation of functions
Below is an example of using a function passed as a parameter to another function: def gera_nums(): lista = [] for c in range(0, randint(1, 15)): lista.append(randint(0, 100)) return lista def…
-
2
votes1
answer76
viewsQ: Correct use of lambda with filter()
Here is a practical example of a script that simulates a seller’s sales days and extracts only the days when the seller hit the day’s quota. The list represents the month (I entered only 3 days for…
-
-2
votes1
answer73
viewsQ: Code does not work [PYTHON]
I wrote a simple script that captures student grades through an auxiliary list and then plays everything within a larger list, including the average of students that is calculated during the code. I…
-
1
votes3
answers127
viewsQ: Code does not work as expected
My code should read name and weight using an auxiliary list and throwing the data to a main list. In the end, it generates a result of the highest and lowest weight with the name of the people who…
-
0
votes1
answer59
viewsQ: Doubt about the replace() method
The replace() method is a method of the str class, correct? Follows a code that 'rotates' perfectly where the object is an integer (or at least in my interpretation). Or in the case of interpolation…
-
0
votes1
answer118
viewsQ: Object Orientation (SUPER HELP)
Here is a question that will require a more complete answer, will it happen? Note this script that simulates a person’s behavior. Class is Person and methods are the possible behaviors. Someone can…
-
-1
votes1
answer58
viewsQ: Error in string formatting
I’m trying to personalize the spacing used in one string formatted, center to be very visual between the lines. The program is returning me value error. Follows the code: def titulo(msg): tam =…
-
0
votes1
answer108
viewsQ: Function statement within Python FUNCTION
I’m trying to declare a function that shows a line below the result of another function. This line adapts to the size of the returned result in the 'main' function. Follow the code and error message…