Posts by Vinicius Cainelli • 318 points
14 posts
-
0
votes2
answers198
viewsA: Problems with multiple IF conditions - Javascript
Suggestion. I created two other small methods to improve the organization.. verificaGenero() and verificaFaixaEtaria() function verificar() { //Pegando o ano atual var data = new Date() var ano =…
-
-1
votes3
answers37
viewsA: Improving jquery code
You wouldn’t need Javascript for this, you can solve only with HTML and CSS: HTML <a href="#" class="active">meu link</a> <a href="#" class="active2">meu link 2</a> CSS…
-
1
votes1
answer48
viewsA: How to put a layout for the search results of an input search that is inside echo?
You need to get that div inside the while <div class='col-12 col-md-6 col-lg-3 mb-3 mb-md-3'>
-
1
votes1
answer168
viewsA: Production vs Development - WEBPACK
The way development is used - as the name suggests - for development reasons. You have source maps of your code and greater ease when debugging, and also your code is not minified, which decreases…
-
3
votes2
answers2417
viewsA: How to remove repeated characters from a string?
Basically the regex you need is this: replace(/(.)(?=.*\1)/g, "") Your code can look like this: let longest = (s1, s2) => { var s1 = `xyaabbbccccdefww`; var s2 = `yestheyarehere`; let res2 =…
-
1
votes3
answers736
viewsA: jQuery - Field with maximum 4 digits and complete with 0 left
In the if, removes the remaining zeros, compares only with a zero num === 0 There in Isis, you replaced by this: // Transforma o valor do input num array, e automáticamente coloca um zero pros…
jqueryanswered Vinicius Cainelli 318 -
0
votes3
answers1353
viewsA: File link for viewing / downloading / printing
To open directly, just create a link <a href="/path/arquivo.pdf">Abrir</a> To print, use window.print();, there is no way to send directly to printer. In the case of the download, it is…
htmlanswered Vinicius Cainelli 318 -
1
votes1
answer204
viewsA: CSS does not load on mobile version when installing free SSL certificate
You are using the absolute path of the . css, . js files. And so the browser accuses that it has http mixed content with https Use relative paths. <link rel="stylesheet"…
-
6
votes4
answers25119
viewsA: How to discard all commited changes?
Lists all commits you’ve ever made: git log --stat You’ll list your last commits, then you choose an ID, where you want to go back: * 518ce00 * ec3be16 * df9b821 * 8db3a02 * 698f520 * 19ccc39 Then…
gitanswered Vinicius Cainelli 318 -
1
votes1
answer128
viewsA: Responsive Utilities from Bootstrap 4
Whoops? Come on, if you downloaded the bootstrap 4 through of that link, you already have all styles of Responsive Utilities. If you want to migrate from 3 to 4, some classes have changed their…
-
1
votes1
answer231
viewsA: How to simulate a radio type input to the screen reader?
You can only do it with CSS, you don’t even need JS, and you can keep the radio inputs using a label for each input, so it doesn’t affect accessibility. Try it here: HTML <ul…
-
0
votes1
answer1036
viewsA: Image with CSS - image and title manipulation
Instead of adding the img tag to the html body, put it as the body background, like this: body { background-image: url("img/imagemtopo.png"); }
-
1
votes1
answer130
viewsA: Error in reference : Variable was not defined
Just reverse the order of the script calls, and call jQuery before all. Thus: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script…
javascriptanswered Vinicius Cainelli 318 -
-1
votes1
answer66
viewsA: I’m having a problem where I really don’t know how to do an event that hears an action on the Laravel
One way you can do this is to create a scheduled task using crontab A formula similar to that: 10 0 * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1 Basically, the…