Posts by Costamilam • 9,556 points
509 posts
-
1
votes0
answers25
viewsQ: What is the difference between HPACK and QPACK?
Many changes came with HTTP 3, one of which is the use of QPACK instead of HPACK (introduced in HTTP 2) for compression of headers What’s the difference between them?
-
0
votes0
answers70
viewsQ: Offline web push notifiion
I’m creating a list to, and in it, I want to be able to create pre-programmed notifications. The application persists all data in Local Storage, IE, you do not have to use a push notification server…
-
3
votes1
answer209
viewsQ: Does the operating system automatically cache PWA application icons?
I’m creating a PWA and one of the questions I have is if I need to cache all the icons that are in the manifest. Use a generator, to create all icons of different sizes and other files, the result…
-
0
votes2
answers149
viewsA: how to create a "Store list"?
Yes, I also do this in an application, but you need to save the index in Local Storage: let i = localStorage.getItem('index') || 0; for(; i<10; i++) { localStorage.setItem('modeloProduto'+i,…
-
20
votes2
answers1150
viewsA: What is a microfrontend?
What would be Microfrontend? Summarizing well and knowing what web Components are, each component of the UI, can be a separate project, with its own dependencies, structure and team of developers…
terminologyanswered Costamilam 9,556 -
2
votes2
answers599
viewsA: Site made for seniors? Is there any good practice to build pages for seniors?
Adding a few more important items, not commented on in the previous answer... There are some things that can be avoided because an elderly person might not understand, such as foreignness and icons,…
-
0
votes1
answer24
viewsA: When dealing with delete/update, should I unsubscribe in Async Pipe mode?
Of documentation angular: "The async pipe subscribes to an Observable or Promise and Returns the Latest value it has Emitted. When a new value is Emitted, the async pipe Marks the Component to be…
angularanswered Costamilam 9,556 -
2
votes2
answers87
viewsA: Change ngModel connection
I would use an array and access the attributes in the inputs by the index, to change just change the index <input [(ngModel)]="pessoa[index].nome"> <input…
-
15
votes2
answers189
viewsQ: Are HTTP headers case sensitive or case insensitive?
Two headers with the same name but one in upper case and the other in lower case, by default, are considered the same? What HTTP does, unite them, ignore some or send both? An application that waits…
-
1
votes1
answer174
viewsA: Assigning a CSS style to a specific element within a div
In doing .flexbox-container :hover you will apply to any element within .flexbox-container, you need to specify which type of element should receive the effect, use .flexbox-container…
-
3
votes2
answers264
viewsA: How does PHP handle type declaration?
Searching the PHP source code, more specifically in the archive Zend/zend_execute.c, there is a function zend_verify_internal_return_type, which verifies what is the return of a PHP function, and…
-
0
votes2
answers1504
viewsA: Object array in JAVA
You have a break; inside the loop, this causes the loop to be stopped in the first iteration and added only cc[0], remove this break to add to all array contents But why fill an array with the same…
-
0
votes2
answers840
viewsA: Object-oriented programming exercise in Python
Why all methods receive x and change the property tamanho_lado? If there is a method mudar_val_lado, all amendments should be made solely and exclusively by him A function retorna_val_lado should…
-
5
votes2
answers2558
viewsA: HTTP status for registered user
This response is both an opposition and a complement to previous answer. The official specifications of HTTP are succinct and little exemplified, giving room for multiple interpretations, I will…
-
-2
votes4
answers1595
viewsA: Leaving div height equal to width using css only
If you know the container width in the unit of measurement vw, just use this value divided by 4 in the children, for example, if the container is the maximum screen size, the height will be 25vw, if…
cssanswered Costamilam 9,556 -
3
votes1
answer333
viewsA: Is using Jquery still advantageous today?
It depends on the context, not in general, but on static websites that you want to add some animation plugins might be (it doesn’t mean that it always goes) ES6, in my view, has nothing to do with…
-
0
votes1
answer137
viewsQ: How do I know if pwa has already been installed on another domain?
I have the same application running in 2 different domains, one is examplo.com and the other exemplo2.com In this application has a button on which the user can click to download the application,…
-
1
votes0
answers29
viewsQ: What are the implications of loading the content of a web application after the main upload?
I’m thinking about creating a dynamic institutional page (which is usually static), where texts are saved in the bank and can be changed by an administrator. Soon, my index.html would be just a few…
-
3
votes3
answers8005
viewsA: Problem when pushing on Github
This occurs when your local version (on your machine) is "delayed" compared to your remote version (in your case, which is on Github). Imagine the following scenario: You create a file teste.html…
-
2
votes1
answer31
viewsQ: Firefox and Edge do not apply margin to the element
I have tested in Chromium browsers and operates, it worked, but in firefox and edge has this problem Use the Materializecss I have an element <main> which contains the main content of the…
-
19
votes1
answer228
viewsQ: When and why to use range 1xx status?
The range 1xx of HTTP response status codes are informative, the description of the Wikipedia, translated from rfc2068: "Request received, continuing the process. This status code class indicates a…
-
2
votes2
answers449
viewsA: Questions about block scope in Javascript
A block scope is that within blocks of code for, if else, try catch among others: let foo = undefined; try { let foo = 'foo'; throw new Error(); } catch(e) { //foo === undefined console.log(foo); }…
-
0
votes1
answer628
viewsA: scroll bar changes content setting
You can decrease the size of the containner when the scroll bar does not appear, and increase when it appears: .scroll{ overflow: hidden; width: calc(100% - 5px); } .scroll:hover{ overflow-y:…
-
2
votes2
answers172
viewsA: Is it worth 'shuffle' ID that will be passed via URL?
More or less, if the security of your application consists in hiding from the user what it can move, it will be as safe as now, the difference is that the ID will be "messy" It may even be harder to…
-
7
votes2
answers767
viewsA: How do HTTP response status codes work?
To understand what the status code is, you first need to know what HTTP is: An application usually has two parts, one that runs on the client side (browser, native app, etc.) and one that runs on…
-
0
votes2
answers64
viewsA: How to parse a string with double space separator on the left of a character?
//A string inicial $data = "Titulo Valor Desc item1 10 Descrição aqui novo aqui AB Mensagem Label text_1 Descrição..."; //Divide a string pelas quebras de linha $rows = explode("\n", $data); //Array…
phpanswered Costamilam 9,556 -
0
votes3
answers891
viewsA: How to validate form fields using pure Javascript
No need for JS to do form validation, a good HTML and CSS is enough I’ll leave just one example for base use body, form { width: 100vw; height: 100vh; margin: 0; } form { display: flex;…
javascriptanswered Costamilam 9,556 -
1
votes2
answers511
viewsA: Java IMC, helps with an error
The variable calculo does not exist in the method toString. You need to create it and set the value according to the data @Override public String toString(){ double calculo; calculo = this.peso /…
-
2
votes1
answer32
viewsA: Javascript displays no value on screen
Missing parentheses in the onclick, needs them to call the function funcaoJogo = function() { document.getElementById('tela').innerText = document.getElementById('inputValor').value; alert("Bem…
-
4
votes1
answer1005
viewsQ: How to use HTTP2 on the Apache server
Today on my server I use HTTP 1.1, if I want to upgrade to version 2 What should I do? I need to install something on the server? Since the syntax is the same as version 1.1, it will not influence…
-
1
votes1
answer58
viewsA: Click the Actions button of each Row of the table every 2 seconds
//Indice para guardar em qual linha estamos, //começa pelo 2 porque a primeira linha é do cabeçalho let index = 2; //Timer que será executado depois de 2s setTimeout(function click() { //Pega o…
-
1
votes1
answer46
viewsA: Training with Javascript - colors
I believe you’re trying to do something like this: <h1 id="colorchange">ESTAMOS FAZENDO TESTE DE CORES COM JAVASCRIPT!</h1> <input type="text" name="Cor" id="whatcolor"><br…
javascriptanswered Costamilam 9,556 -
4
votes3
answers601
viewsA: Is a Switch within an Else possible?
Your switch is wrong, so you can use one between switch should use a structure like this: switch (true) { case (this.value >= 4 && this.value <= 9): rank.text('D'); break; case…
-
0
votes1
answer238
viewsA: Searching and subtracting dates
This query compares to the property (dateToPost) is less than or equal ($lte) the current date (new Date()) Tweet.find({isPosted: false, dateToPost: { $lte: new Date() }}, () => { ... }); There…
-
2
votes1
answer1654
viewsA: What is the function of the populate method in Mongoose?
It is an alternative for the operator $lookup Picture the scenario: const mongoose = require('mongoose'); const Schema = mongoose.Schema; const pessoaSchema = Schema({ _id: Schema.Types.ObjectId,…
-
0
votes2
answers59
viewsA: Help me work this code
A very simple way: Creates a boolean variable with the value as true, it will be used to validate whether to continue running the loop instead of using the break you just change the variable to…
javascriptanswered Costamilam 9,556 -
2
votes1
answer199
viewsA: How to access data sent by PUT (ajax) in php?
If you are receiving the data in the backend in JSON format, you should use the function json_decode and not parse_str: public static function update($param){ $teste =…
-
0
votes3
answers164
viewsA: I can’t find the button with the querySelector
Yes, it is incorrect to access a property that is neither id nor class used [propriedade="valor"], same as for the classes. When using the selector .tabindex you are looking for an element with…
-
3
votes2
answers260
viewsA: How do I edit a JSON within my database?
You can do direct by SQL through the functions for the type JSON: UPDATE myTable SET myColumn = JSON_SET( myColumn, '$.3.vendas', 10, '$.1.vendas', 10, '$.3.status', 0, '$.1.status', 0 ); Remember…
-
2
votes1
answer45
viewsA: Why can’t I recover the amount of record that corresponds to the date range?
The problem is what you’re doing ->get()->count();, to count it is not necessary to call the function get only the count: $quantidade_week = DB::table('serviceorders')…
-
4
votes3
answers1067
viewsA: Enter a number and display the next 100 even numbers
The $_GET is a global variable Seper that contains the values of query string of the URL Query String are all characters after interjection ("?") What probably happens is that you are passing this…
phpanswered Costamilam 9,556 -
1
votes1
answer30
viewsA: send confirmation message to the database
Your logic is incorrect, what you want is more or less that: <?php $validarenvio = isset($_GET['s']) ? $_GET['s'] : null; if ($validarenvio == '1') { ?> <div class=" alert alert-success"…
phpanswered Costamilam 9,556 -
0
votes2
answers53
viewsA: Create object from an array
const original = { "17": [{ "data": "2019-03-01", "ofetas": "22.65", "decisoes": "6" }, { "data": "2019-03-03", "ofetas": "55.33", "decisoes": "3" }, { "data": "2019-03-05", "ofetas": "30.45",…
javascriptanswered Costamilam 9,556 -
0
votes2
answers27
viewsA: I need to make an automated selection
//Elementos const select = document.querySelector('select'); const options = document.querySelectorAll('option'); //Cria um número randômico entre 0 e 1 //Multiplica pela quantidade de opções…
-
0
votes1
answer500
viewsA: Variable value in the middle of an html LINK
There are several ways one of them is to use the function replace: const link = document.querySelector('a'); link.href = link.href.replace('NUMERO', '123451234'); console.log(link); <a…
-
0
votes0
answers41
viewsQ: How do I control a split form?
I have a system that has a lot of <input>necessary to assemble a requisition, they are divided into 4 parts (components), each part having one or more subparts (subcomponents) I don’t want to…
-
1
votes2
answers425
viewsA: How to convert JSON to array to column chart in google Charts?
Use the function map to traverse the array, passing a function that receives the value of the indexes and returns the new value const data = [ { "Pais": "Qatar", "Valor": 683900 }, { "Pais":…
-
0
votes1
answer195
viewsA: Move image while hovering over it
//variável que verificará se o mouse está sobre a imagem let hover = false; //Função que moverá a imagem function move(element) { //Muda as propriedades top e left da imagem element.style.top =…
-
2
votes1
answer1014
viewsA: Error with php Fatal error class: Uncaught Error: Call to Undefined Function run_search()
This error means that there is no function run_search, what exists is the function run_search within the class buscaAnimes, lacked to add the $this->: //Pega a id passada pelo usuario e atribui…
-
3
votes1
answer40
viewsA: Doubt about CSS in inheritance
When you set the property background, in fact you are setting a list of properties with the following values: background-image: none background-position: 0% 0% background-size: auto auto…
cssanswered Costamilam 9,556