Posts by Lucas Emanuel • 685 points
25 posts
-
3
votes1
answer117
viewsA: How to limit the number of decimals in Dart?
One of the ways to set the number of decimals is by using the toStringAsFixed, how it converts a decimal value into string (text), in it you should pass the fractionDigits defining how many decimal…
dartanswered Lucas Emanuel 685 -
1
votes2
answers376
viewsQ: How to rename a remote and same local branch from the remote?
Which command should be used to rename a branch and update its name branch local?
gitasked Lucas Emanuel 685 -
0
votes6
answers2057
viewsA: Modify the title of a browser tab with Javascript
To manipulate a page you use the property document.title. To modify you only need to assign a new value to this property as follows: document.title = text; Code with solution.…
javascriptanswered Lucas Emanuel 685 -
0
votes1
answer276
viewsQ: How to join specific commits using git rebase -i?
How do you join commits Clearing index using the git rebase -i skipping the commit Removing . env? I know that the squash joins commits, but like skipping a specific commit? I have the following…
gitasked Lucas Emanuel 685 -
6
votes1
answer186
viewsA: Function Random returns numbers larger than those defined
The function Math.random() returns a pseudo-random number in the range [0, 1[ MDN - Math.Andom This interval corresponds to the same 0 <= Math.random() < 1, i.e., this function returns from…
javascriptanswered Lucas Emanuel 685 -
3
votes1
answer778
viewsA: What is the difference between "querySelector" and "querySelectorAll"?
First of all querySelector and querySelectorAll are different. The querySelector returns the first element within the document and querySelectorAll returns a list of elements present in the…
javascriptanswered Lucas Emanuel 685 -
0
votes2
answers106
viewsA: How do I get a variable in another method?
You can pass the variable to the function cadastrarDisciplina by means of a parameter. "a parameter is a value, coming from a variable or a more complex expression, which can be passed to a…
-
0
votes1
answer42
viewsA: View path cannot be displayed in Yii
The route in Yii is set by default to be called as follows controlador/ação or modulo/controlador/ação. In this your first example: http://localhost/basic/web/index.php?r=site%2Flogin The route is…
-
0
votes1
answer52
viewsA: remove [] from the array list
Checks whether the result of mysqli_fetch_assoc has more than one element, if you have more than one element does the flow that was already happening, if not, assigns the first and only element in…
-
2
votes2
answers154
viewsA: how to put php in html
Hello, if you just want to imprint something you don’t need to use heredoc, may conventionally use single quotes. <!DOCTYPE html> <html lang="en"> <head> <meta…
-
5
votes2
answers297
viewsA: Can you use if for the addresses of an array?
If you want to apply a if at a time use a same loop. for($i = 0; $i < 4; $i++) { if($array[$i] >= 100) { ... } }
phpanswered Lucas Emanuel 685 -
-2
votes2
answers65
viewsQ: What term use 'date' or 'create_at'?
Contextualizing: I have the following table and store the creation date in the attribute date. +------------+ | Operation | +------------+ | id | | amount | | type | | date | | product_id |…
-
10
votes1
answer1792
viewsQ: What’s the difference between "Big O", "Big Theta" and "Big Omega"?
What use are each of these "Big O", "Big Theta" and "Big Omega" and when to use each to describe the complexity of an algorithm?
-
1
votes2
answers65
viewsA: Syntax invalidates 2 degree equation
Are missing parentheses closing in these lines: X1 = ((-B)+(Delta**(1/2)) AQUI ')' /(2*A) X2 = ((-B)-(Delta**(1/2)) AQUI ')' /(2*A) The corrected code looks like this: A = float(input("Qual o valor…
-
1
votes1
answer29
viewsA: Incorrect Collum for a specifier for Collum 'code'
the problem I see in your code is on this line: codigo VARCHAR(30) NOT NULL AUTO_INCREMENT For the value to be incremented it cannot be of the text type. For primary keys it is commonly used of the…
mysqlanswered Lucas Emanuel 685 -
1
votes3
answers229
viewsA: Fatal error: Uncaught Error: Call to Undefined Function mb_substr_count()
There’s the command php -m listing the modules installed. The command below will search between the modules the mbstring and return some result if it is already installed: php -m | grep mbstring If…
-
3
votes1
answer88
viewsQ: Can you store a throw in a variable?
I have the following code snippet: try { throw new BadRequestHttpException("Error in Register of your Company"); } catch (BadRequestHttpException $e) { throw $e } I want to know if it is possible…
-
0
votes1
answer222
viewsA: How to add an object inside stdClass() and print the json
Hello, to add a value is simple, but you do not add directly in json, notice that in your code is creating an object and the variable $saida is receiving this converted object in json, what we need…
-
1
votes1
answer289
viewsQ: Vue is not rendering table with v-for, how to solve?
My code is not rendering the list produtos defined by Vue. When I remove the template <pd> out of the table it renders, I looked for solutions and saw that in the very document of vuejs there…
-
1
votes2
answers487
viewsA: Closing a loop, with enter
To solve the problem the way it just needs to remove the space between the quotes. In your code your if is comparing the input with a string of a character that is the space " ". When you press…
-
1
votes2
answers719
viewsA: python: Attributeerror: 'int' Object has no attribute 'Count'
You can solve by creating a variable that stores the amount of times the numbers from 1 to 13 appear. number_sequence = [ 16, 19, 1, 3, 8, 11, 18, 21, 13, 9, 24, 5, 23, 10, 6, 22, 19, 25, 3, 2, 21,…
pythonanswered Lucas Emanuel 685 -
1
votes3
answers1730
viewsA: Change date format from "yyyy-mm-dd" to "dd/mm/yyyy"
strtotime - Interprets any date/time description [...] in Unix timestamp The strtotime turns any string into an integer (the Unix timestamp). The Function date format a time by returning a string…
-
2
votes2
answers112
viewsA: Create an "inventory" in php
An easy way to traverse an array is to use foreach $itens=array('ameixa' => 2, 'abacate'=>3, 'mamão' =>1, 'maçã' =>3); echo'<table style="align:center;" border="1">'; //Um exemplo:…
phpanswered Lucas Emanuel 685 -
1
votes2
answers98
viewsA: Conversion of Dateinterval to int in PHP
I believe this doubt can be easily resolved. In this code snippet you are using the object interval to compare with an interim. if($interval->y >= 1) { if($interval == 1) $time_message =…
phpanswered Lucas Emanuel 685 -
1
votes4
answers686
viewsA: How to display the elements of an array where they are arrays?
There is a repeating structure known for iterating arrays or objects that is the foreach. Example of how it is used: $array = Array("maça","banana","uva"); foreach ($array as $elemento) { echo…
phpanswered Lucas Emanuel 685