Posts by Denis Bernardo • 1,770 points
20 posts
-
1
votes3
answers24684
viewsA: How to browse an object in Javascript?
You can make use of Object.Keys, for example: Object.keys(obj).forEach((key) => { console.log(key); //column01... console.log(obj[key]); //Coluna 01... });
javascriptanswered Denis Bernardo 1,770 -
17
votes3
answers4038
viewsQ: What is the definition of verbose code? And why is it interesting to reduce it?
I have recently heard about verbose code reduction (next to the term Boiler Plate code), and also by studying ES6 by falling into Arrow-functions. Would you like a clearer definition of what verbose…
-
3
votes2
answers672
viewsQ: Remove comma out of square brackets - Regex
I am trying to remove the comma that is located outside the brackets of the following excerpt: 2||Azul||Cor||["#1983ff", "#1983ff"],3||Amarelo||Cor||["#fff73d"] I need the comeback to be that way:…
-
2
votes2
answers2659
viewsQ: Getting "is not a Function" error for a declared function
I was writing my js, when I came across the following mistake: Uncaught TypeError: xyz is not a function Released from the code (illustrated simply): (function () { function abc() { var xyz = xyz();…
javascriptasked Denis Bernardo 1,770 -
3
votes2
answers2659
viewsA: Getting "is not a Function" error for a declared function
After a while of cracking my head (believe me), I realized that I’m actually overwriting the function by using the same name for the variable: var xyz = xyz(); Changing the variable name in this…
javascriptanswered Denis Bernardo 1,770 -
3
votes2
answers309
viewsA: How to use REST to validate XML receiving via POST
My dear, in this case you don’t have a cake recipe, the ideal is that you go to the Symfony documentation (https://symfony.com/doc/current/index.html) and take a look at what the framework makes…
-
1
votes2
answers797
viewsA: Open modal window with php function via JS
I believe you will need one AJAX. When you click on the modal button, do a GET via AJAX, returning the contents of the Commands.php page (which in this case would be the html form), with this…
-
1
votes1
answer1145
viewsQ: Sass - how to compile the minified file?
I use Sass to help in the development, but I would like to optimize the final result of the generated css, would have some way to generate the file . css already minified? I use the following…
-
1
votes3
answers5147
viewsA: Angularjs vs Jquery input mask
I recommend using the Angular UI Ex: <input type="number" step="any" ng-model="item.valor" class="form-control" ng-disabled="{{item.ano < @Model.Confo.ano}}" ui-mask="9.999,99">…
-
2
votes2
answers162
viewsQ: Semantically, should I choose ul or article when displaying products?
I am marking the products listed on the home, I am using HTML5 to structure the pages, my intention is to define a semantic content. Because then I came across the following possibilities of…
-
0
votes2
answers88
viewsA: Cross-browser conflict at window width
Apply these rules to your css, I believe it will work as intended: @media only screen and (max-width: 800px) #upBar { top: 0; } #wrapper > header { position: fixed; top: 0; z-index: 9; }…
-
7
votes2
answers1209
viewsQ: Use <Section> tag inside a <aside>
My appointment is as follows: <aside> <div class="last-news"> Conteudo </div> <div class="social"> Conteudo </div> <div class="links"> Conteudo </div>…
-
10
votes5
answers16498
viewsQ: How can we not apply opacity to a child element?
I have a div with applied opacity, but this div has child element. I don’t want to apply opacity to those child elements, I would have some way of solving that? Example: http://jsfiddle.net/qSsC3/1/…
-
3
votes1
answer98
viewsA: Use ":last-Child:after" in Internet Explorer 8
You can make this css statement through Jquery: $('#results .chart-scale li:last-child:after').css('background-color','transparent');…
-
5
votes3
answers7499
viewsA: How to fill in a numerical field as in internet banking (right to left)?
Try using this function to set the coin mask: function MascaraMoeda(objTextBox, SeparadorMilesimo, SeparadorDecimal, e){ var sep = 0; var key = ''; var i = j = 0; var len = len2 = 0; var strCheck =…
-
32
votes5
answers5370
viewsQ: How to apply ! CSS import via jQuery?
I’m trying to apply style to my element and define its importance in this way: $('div').css('height','50px!important'); But it doesn’t work, which would be the right way?…
-
17
votes5
answers5370
viewsA: How to apply ! CSS import via jQuery?
It is not working because Jquery does not recognize the ! Mportant statement. Simply put, you can do it this way: $('div').attr('style', 'width: 50px!important'); This should solve, but will…
-
13
votes4
answers13879
viewsQ: How to detect if an HTML element is empty?
How can I detect if an HTML element is empty with jQuery? I need to make a condition if the element is empty.
-
5
votes1
answer430
viewsQ: How to determine the final distance of an element from the footer?
In the case in question would be a sidebar, which from a certain height of scrolling from the top, receives position:Fixed, but as the scroll continues it is hidden behind the footer of the site.…
-
5
votes2
answers1129
viewsA: How to check for errors in an XML
You can create a simple function to check if XML is valid. <?php function is_valid_xml ( $xml ) { libxml_use_internal_errors( true ); $doc = new DOMDocument('1.0', 'utf-8'); $doc->loadXML(…