Posts by Assis Duarte • 106 points
13 posts
-
0
votes1
answer35
viewsA: I would like to know how to apply an edge to the element by means of javascript
You can use javascript’s classList option to add or remove classes, or use the style property. let domingo = document.querySelector("#domingoid"); domingo.style.border = '1px solid blue';…
-
1
votes4
answers1011
viewsA: Replace a string’s letters with their respective alphabet position
By the way your code is, it can be optimized by questions such as map usage, but the main one, never use special characters, especially in variable names, constants and/or functions. Follow an…
-
0
votes4
answers353
viewsA: Doubt with error - comparisons against strings
You can use more "different" forms, for example, in the case, not using strings ("but which does not differentiate much, because the value can be’m' and 'f'"): const MASCULINO = 0; const FEMININO =…
javascriptanswered Assis Duarte 106 -
0
votes3
answers388
viewsA: Change DIV gradient background with Hover on buttons
One of the ways to do this is by script, can use for example a jquery to assist in this, it is simple and easy for those who are starting in studies, your code would look like this: <!DOCTYPE…
-
1
votes1
answer144
viewsA: How to get a specific position of in foreach with PHP
You can check if there is in an array each of these RSS, if not it will add this link, so it is easier to be manipulated later, so you can even display as many and as you want. This is an example…
-
1
votes1
answer24
viewsA: Is there a way to access a Vector programmable?
You can use an external library called Vectorchildfinder. VectorChildFinder vector = new VectorChildFinder(this, R.drawable.meu_vetor, imageView); VectorDrawableCompat.VFullPath path1 =…
-
0
votes1
answer245
viewsA: Error installing sudo-free NPM packages
Use nvim to edit the ~/. bashrc file and add these lines: npm set prefix ~/.npm PATH="$HOME/.npm/bin:$PATH" PATH="./node_modules/.bin:$PATH" After that, run the command: source ~/.bashrc…
-
0
votes2
answers104
viewsA: Select all checkbox separated by groups
Simply put, you can select all checkboxes through their class, thus: $('#select-all-A').click(function(event) { if(!$('.grupoA').prop("checked")){ $('.grupoA').prop("checked",true); }else{…
-
0
votes1
answer114
viewsA: Error after pop up apk in play store
This is not a mistake, it is a "Warning" warning that your app is not a Bundle, according to Google itself: Android App Bundle is the new official publication format for Android, which offers a more…
-
2
votes2
answers371
viewsA: form Ubmit only with Enter key without button does not work
$("#message_text").keyup(function(e){ if(e.keyCode == 13){ $("#message-form").submit() ; } })
-
-1
votes3
answers450
viewsA: Socket.io chat, setting url
In this case, the two cannot be at port 3000, because there will be a port conflict, what I recommend in this case, is to use the port 3001, while the port 3000 is at the front, so you will have to…
-
0
votes2
answers976
viewsA: How to get javascript/jquery ajax array values
On the server side, start with: header('Cache-Control: no-cache, must-revalidate'); header('Content-Type: application/json; charset=utf-8'); This before the $id=1;, and in the script, instead of…
-
0
votes1
answer78
viewsA: Working Volley Android Error
Hello, you need to get Networkresponse to know what kind of error was caused. new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { NetworkResponse error_code =…