Posts by Douglas dos Santos • 1,019 points
20 posts
-
2
votes0
answers91
viewsQ: Monitor Linux hard disk
Hello I would like to know if it is possible to perform a certain action(run a shell script file for example) when the server exceeds a certain percentage of storage. *Command used to view the…
-
5
votes3
answers1134
viewsQ: How to access the $Cope variable?
I wonder how I can access the contents of the variable scope in Angularjs? Theoretically I did everything "correct", ie declaring the variable in controller and assigning values in it: var app =…
-
5
votes1
answer711
viewsQ: Multer file upload callback - Nodejs
Hello anyone ever used multer(express/nodejs module) to upload files? If so, how did you manage to capture the events of callbacks (onFileUploadStart and onFileUploadComplete)? Theoretically I am…
-
9
votes2
answers3515
viewsQ: Remove more than one item from an array
It is possible to remove more than one item from an array at a time. Follows the code: var teste = [6,4,5]; //meu objectivo é remover os itens 4, 5 por ex //removendo o item 4 teste.splice(1, 1)…
-
4
votes3
answers3898
viewsQ: How to 'break' a text at each character range - Javascript
I would like to know how to 'break' (split function) a text every 8 characters in javascript for example: var teste = '1234567898' teste.split({a cada 8 caracteres}) //retorna ['12345678', '898'];…
-
10
votes1
answer470
viewsQ: What is the difference between using the class method and the Javascript prototype?
Hello I would like to know if there is any difference between the normal method( created in class ) and the prototype. I am thinking of a high-scale type: various objects (instances) of a certain…
javascriptasked Douglas dos Santos 1,019 -
6
votes4
answers1452
viewsQ: Is there an event that captures mundanes the size of an HTML element?
I wonder if there is an event that captures changes in the size of an HTML element. For example, a div with 5000px height 4800px and the onresize() javascript does not fire. Is there an event that…
-
4
votes3
answers4578
viewsQ: Create a comic balloon-like div
How can I create a div with the appearance of a comic balloon (I don’t know if this is the best expression). Goal: Reality: *Please ignore fonts and colors in question, the focus is tip of the div.…
-
4
votes5
answers7871
viewsA: Add onclick event to created element with createelement
You must use the following code; //CRIA O ELEMENTO var botao = document.createElement('button'); //ADICIONA O ONCLICK botao.onclick = function () { alert('HUE BR'); };…
javascriptanswered Douglas dos Santos 1,019 -
7
votes5
answers5323
viewsQ: How to center a div with position:Fixed?
I wonder if it is possible to centralize a div with the position:fixed ? Currently I tried to centralize using the margin:0 auto but it didn’t work... unfortunately as the width of my div Fixed will…
-
2
votes1
answer116
viewsQ: How to inactivate the empty area of a div?
I have a div on add mouse events but wanted the mouse hit only to work where content existed and ignore the po ex margins. Follow the image( the yellow area is the area I want to 'inactivate' since…
-
0
votes1
answer792
viewsQ: How to customize og tags (Open Graph) on the post page - Wordpress
I am creating a template from scratch for Wordpress, but would like to change the content of og tags according to the content of the post, ie set image title and description Thank you in advance…
-
3
votes1
answer144
viewsQ: How to detect which swf was loaded
I wonder if it is possible to detect when swf is loaded: Follow the code: <object id="teste" name="teste" type="application/x-shockwave-flash" data="120x600.swf" width="550" height="400"…
-
5
votes2
answers226
viewsQ: Vertical alignment in a div with position:Bsolute
would like to know if it is possible to carry out the vertical-align in a div with Absolute position? Follow the code to analyze: .teste { background: #F00; width: 500px; height: 100px; display:…
-
5
votes2
answers2689
viewsQ: How to access an element within another HTML element with pure Javascript
I would like to know how to access an element within another element through id using pure Javascript. Currently use getElementsByTagName('a') but as in my project I will have several elements of…
-
2
votes3
answers4201
viewsA: Fire an event using pure Javascript
Following the advice of Mr Wakim, I checked the documentation and found that the event is not created alone, that is to say it is necessary before firing it create it, it was like this: var atual =…
-
2
votes3
answers4201
viewsQ: Fire an event using pure Javascript
I would like to know how to dispatch an event using Javascript. I tried using the following code: var atual = document.getElementById('teste'); atual.addEventListener('mouseover', function(){…
-
5
votes3
answers3244
viewsQ: Calling a method from a Javascript class (OOP)
Good staff would like to know if it is possible to access a method of a class(javascript) without knowing if the variable by instance it. function SDK(dynamicUrl) { var data = 'DATA'; var atual =…
-
2
votes2
answers38
viewsQ: Can I have different Transitions on the same tag?
Hello folks would like to know if I can have more than one Transition on the same tag? Why do I implement Transitions for the properties but it doesn’t work? *Or this is because I haven’t set the…
-
6
votes3
answers13356
viewsQ: How to fix the position of an element inside a div with scroll( With css )
It is possible to fix an element( div, img, p ) in a div with scroll and with position:relative and using only css? *Currently reposition the div using the function $('elemento').scroll() and…