Posts by Lennon S. Bueno • 2,182 points
88 posts
-
0
votes0
answers20
viewsQ: What’s the difference between the setup and date on Vue?
I recently came across a new property setup and I’m not really understanding her difference to the traditional data : setup () { } : data () { return { } }…
-
0
votes2
answers147
viewsA: Change the style/theme of the site and store it in Localstorage
Supplemented the question nowadays we can use css variables and change with javascript, example: function trocarCor () { document.body.style.setProperty('--color-primary', 'green') } :root {…
-
0
votes3
answers201
viewsA: How to change colors dynamically with Javascript and pure CSS?
In the research process I realized that it would not be possible to change the class directly at runtime, and it is necessary to address the problem otherwise. A cool solution is using various css…
-
-3
votes3
answers201
viewsQ: How to change colors dynamically with Javascript and pure CSS?
My goal is to create dynamic themes where I can change the colors of the classes with js, for example after a request in the database. The example I’ll give is, a class that defines the primary…
-
10
votes3
answers300
viewsQ: How to perform a condition in the array to verify that multiple elements exist at the same time?
I have the following array as an example: var a = ['view', 'edit', 'insert'] And I need the following condition: a.includes('view') // esperado: true, resultado: true a.includes('view', 'teste') //…
javascriptasked Lennon S. Bueno 2,182 -
1
votes2
answers76
viewsA: Difference between element.class{} and element . class{}
When it has space it looks for the child of the element with the class x, when it lacks space css looks for the element with the class x Example: div.x { color: red; } div .x { color: blue; }…
-
2
votes1
answer159
viewsA: How to format dates in Adonisjs?
You should format the date using Lucid models and not Migration. For this in the model do the following: class User extends Model { static get dates () { return super.dates.concat(['data_emissao'])…
-
0
votes0
answers214
viewsQ: How to change the Adonisjs hash to md5?
Hello, I am developing an api on top of a legacy project used by other systems, and I intend to perform an authentication using md5 instead of bcrypt to compare the password only. There is already a…
-
1
votes2
answers133
viewsQ: How to group and filter fields with JS
I’m trying to get the following result using lodash: [ { "idpai": 1, "pai": "joao", "mae": "maria", "filhos": [ {"id": 1, "nome": "joaozinho"}, {"id": 2, "nome": "pedrinho"} ] } ] with the following…
javascriptasked Lennon S. Bueno 2,182 -
0
votes0
answers141
viewsQ: Card Flip css/js effect does not work in safari
I have a simple code I developed, from a card flip effect, example below. Works on google quiet, but I found that in safari has a bug when the card turns, I searched on, I found some prefixes for…
-
2
votes1
answer119
viewsQ: How to rotate a 90º IMG occupying 100% of the element?
I have the following image for example: The black line is the container of the page(mobile) and the red one the image, In example 1 is what I have today, and the 2 the result I’m trying to get, I’m…
cssasked Lennon S. Bueno 2,182 -
0
votes1
answer273
viewsQ: How to prioritize the device wifi connection even without internet?
I have an application (Android/iOS) that runs on a local wifi network (which has no internet). Because this wifi network does not have internet, the devices prioritize 3G/ 4G, and so my application…
-
7
votes2
answers1741
viewsQ: How is the 'Two way data Binding' process with pure JS?
Today’s Java framework is popular, such as React, Vue and Angular. They work with Two-Way Data Binding which is a hand in the wheel for the developer. How is this process done? Is there any simple…
javascriptasked Lennon S. Bueno 2,182 -
2
votes3
answers1199
viewsA: How to make these radio buttons checkbox style, and change the value of a text depending on the choice?
I understood that you would like to leave a checkbox with the functionality of a radio, but I advise the reverse, leave a radio with the appearance of checkbox I built a solution using only css but…
-
0
votes0
answers83
viewsQ: How to assign the result of Connection.query to a global variable?
I’m learning to use the module mysql and I came across a situation of not being able to assign the result to a global variable, follow my code: let data = 0 connection.query(query, (err, rows,…
-
2
votes1
answer795
viewsQ: How do I detect the button click (html) on Tchromium Cef4delphi?
I have the Tchromium Cef4delphi component loading a web page, and on that web page I have a button. It is possible to detect the click of this button on the web page (html) and open for example a…
-
3
votes1
answer178
viewsQ: Nth-Child selection in a table with even columns
Hello I want to get the following result with css: I know with :nth-child: odd and :nth-child: even selects the odd and odd pairs, but in the way I want it would be something like this: No, yes,…
cssasked Lennon S. Bueno 2,182 -
4
votes3
answers6016
viewsQ: Convert JSON to EXCEL
I carry out a consultation ajax that returns me a Json with object array, how can I transform this json in excel? Example of my json: [ {idcancelamento: "383", idcliente: "2409", emailcancelamento:…
-
1
votes1
answer45
viewsQ: How to add a new position to the object based on other fields
Good morning gentlemen, I have the following object array: [{ key:"-Kw05MQXBFh8uUxDml-v", datainicio:"2017-10-09", dataprevisao:"2017-10-13", descricao:"teste", etapa:"A testar", numero:"56789",…
-
1
votes3
answers3621
viewsA: How to readjust the image to the size of the div
#conteudo{ width:600px; height:600px; float:left; background-color:#ff1; display: initial; margin: auto; z-index: 6; overflow: hidden; } <html> <body> <div id='conteudo'> <img…
-
0
votes2
answers97
viewsA: 100% modal with CSS
You get it with the property checked as in the example below: *{ box-sizing: border-box; } .modal{ position: fixed; width: 100%; height: 100%; background-color: rgba(0,0,0,.7); top: 0px; left: 0px;…
-
2
votes1
answer1733
viewsA: How to create a Multi-level Dropdown menu using HTML?
Follow the example you mentioned working, don’t forget to import the js bootstrap, and jquery besides css. .dropdown-submenu { position: relative; } .dropdown-submenu>.dropdown-menu { top: 0;…
-
1
votes3
answers892
viewsA: I can’t get one div stuck on the other
Look, as already said display inline-block has a spacing that even zeroing all the margins still continues with spaces. How can I solve this with the elements still being inline-block? Simple. just…
-
0
votes2
answers557
viewsA: firebase hosting does not understand my school domain.sjc.br
Contacting Google reply that the suffix .sjc.br is not on the list https://publicsuffix.org/list/public_suffix_list.dat that they use as a basis…
-
0
votes1
answer59
viewsQ: vuejs vuex firebase
with a problem to mount my next firebase reference export default { firebase () { return { gastos: db.ref(`user/${this.uid}/shop/`), } }, computed: { uid () { return this.$store.getters.getUser.uid…
-
0
votes2
answers557
viewsQ: firebase hosting does not understand my school domain.sjc.br
Recently a new domain category appeared in Brazil sjc.br so I went and bought escola.sjc.br but when I try to link this domain to firebase hosting it just understands how sjc.br my doubt is whether…
-
1
votes4
answers1660
viewsQ: Function js to run at a given time
Gentlemen, I have a doubt, there is some method that for example performs at a certain time? I would like when it was 0h the page would update automatically, then save some cookie to inform that…
-
0
votes2
answers206
viewsQ: Difficulty accessing json
I have the following json: { "destination_addresses": [ "Rua B, 1 - Coqueiro,Belém - PA, 66670-350, Belém - PA, 66670-350, Brasil" ], "origin_addresses": [ "Pref. José Walter, Fortaleza - CE,…
-
2
votes2
answers1804
viewsQ: Sort list with Vue
Ba late gentlemen, I’m beginner with Vi and I’m creating a list, but I’m having a hard time understanding how I will sort list by clicking on the column title follow example: new Vue({ el: "#lista",…
-
0
votes2
answers162
viewsA: Skip path that CSS "traverses"
To answer your question you can yes. But complementing, the code below .a .c { blablabla; } will take any element with the class c inside a independent of the hierarchy, i.e. <div class="a">…
-
0
votes2
answers1164
viewsQ: How to know when an item is at the top of the page
I am developing a one page website with several sections (about, contact, services for example) And a fixed menu, the idea is as the user scrolls the page the fixed menu would change the active…
-
7
votes3
answers20457
viewsA: Round image mask with CSS
I’d do it this way: img{ background-color: #ddd; border-radius: 100%; height: 200px; object-fit: cover; width: 200px; } <img src="https://i.stack.imgur.com/atUuf.png" alt="" /> This for…
-
1
votes3
answers71
viewsA: Difference between Immediate Child and First-Child?
Simple, Immediate Child selects all corresponding children first-child selects the first corresponding child Following your example if you only have one element p there will be no difference because…
-
0
votes0
answers31
viewsQ: Ajax jquery error requesting rss
I’m trying to get the G1 RSS which comes in XML but error No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.…
-
1
votes1
answer594
viewsA: Problem with tag select in form
Observing your code what is missing is the attribute value us option's tag select. A basic example of how to get the value selected with javascript is this: var el =…
-
1
votes2
answers2765
viewsA: How to start closed Accordion
Try remove the class in of the following element <div id="collapseOne" class="panel-collapse collapse">
-
0
votes5
answers4689
viewsA: How to change the content of an img src?
The background-image does not change the attribute src tag img. If you want you will need JS. Observing your code you can do so: <head> <title>Woman</title> <style> body{…
-
1
votes2
answers24725
viewsA: How to make a div occupy the whole page?
When you set height in percentage it is based on the parent elements, ie, html and body as Anderson spoke in the comments. see an example: body, html{ height: 100%; } body{ background-color: blue; }…
-
1
votes1
answer93
viewsA: How to position Ivs in Tumblr style
Run the code and see in the entire page: *{ margin: 0px; padding: 0px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #columns { column-width: 320px;…
-
1
votes1
answer89
viewsA: How to replace * selector in production
Universal selectors as *, [disabled], [type=“text”], etc. are very expensive for the browser to match, as each element in the DOM must be checked. Universal selector is often used for box-sizing and…
-
0
votes3
answers361
viewsA: How to define the opacity of an element from within a div larger than the div itself
What is happening is this, your element div1 this with opacity 0.5 or whatever is inside it will get opaque, if you want a transparent background the best option is to use colors in the format rgba…
cssanswered Lennon S. Bueno 2,182 -
0
votes3
answers1787
viewsA: How to validate empty html fields
You can use the minlength="3" for example. <input type="text" required minlength="3"> Or else pattern=".{3,}" <input pattern=".{3,}" required title="3 characters minimum"> Note that the…
-
2
votes3
answers3438
viewsA: Select with color palettes
I developed a homemade "solution" of course that needs to improve but see if it helps. var cores = document.querySelectorAll("label[for^='cor']"); for(i = 0; i < cores.length; i++) {…
-
0
votes2
answers937
viewsA: I can’t align the logo with the menu icon
The first thing you need to understand is how the elements organize in the browser, there are various forms and alignment techniques. Let me show you an example with display: table : <header…
-
1
votes1
answer1352
viewsA: Placing (Arrows) an arrow at the base of my active button
Creating a triangle is very easy, basically we use the edge of an empty element looks at this article http://www.maujor.com/tutorial/borderplay.php I’ll leave an example and try to implement in your…
-
2
votes2
answers286
viewsQ: format value with javascript
I have the following variable: var teste = "006BC953F26DAC56C51D61"; and I’d like when to display it to be like this: console.log(teste); //006B-C953F-26DA-C56C5-1D61 I’m in trouble because it…
-
1
votes2
answers2781
viewsQ: How to limit the size(kb) of a photo with JS?
I have the following question, it is possible to limit on the client side with JS(or jquery) the size(kb) of the photo? I would like to limit in 500kb at most using the input type="file" <input…
-
6
votes3
answers42294
viewsQ: Select option from a select
I have the following HTML: <select id="faturamento-mes-referencia"> <option value="1">Janeiro</option> <option value="2">Fevereiro</option> <option…
-
1
votes3
answers3579
viewsQ: How many days is the current month with Javascript?
I would like to know how many days is the current month with Javascript, for example with PHP, I would do so: Date('t'); Very simple with PHP, but with Javascript there is some easy way? obs. I use…
javascriptasked Lennon S. Bueno 2,182 -
3
votes1
answer1123
viewsQ: Add value with Angularjs no ng-repeat
I have the following code: <li ng-repeat="gasto in gastos"> R${{ gasto.valor }} - {{ gasto.descricao }} </li> This prints on the screen the expenses and the description, but I would like…