All Questions

3
answers

Prime numbers in javascript

I've been surfing the internet, but I can not find an algorithm to search for prime numbers. var cantidad = 100,j=2; for(var i=2;i<cantidad;i++) { for(;j<cantidad;j++) { if(j%i==0 && (i==j || i==1)) {...
asked on 29.08.2017 / 18:42
2
answers

What is the use of Invocable in java?

Until now I only know that it is an interface that has the following methods: invokeMethod () invokeFunction () getInterface () But I do not understand what each of them is for and exactly where the Invocable interface is...
asked on 14.02.2017 / 06:17
3
answers

Error with PHP when saving data in mysql [closed]

I am trying to save mysql the data that you enter in the form but the php is giving me errors like this: Parse error: syntax error, unexpected '[' in C:\wamp\www\Tarea2\index.php on line 5 Here the code: <?php if(isset($_POST['btn...
asked on 16.09.2016 / 04:51
2
answers

Difference when capturing the text

What is the difference when using .text and .innerHTML to get the text? window.addEventListener('DOMContentLoaded',() => { var pattern = /^joya[0-9]/, getting = document.getElementsByTagName('*'), elements = [...
asked on 25.09.2017 / 12:32
3
answers

What is the difference between char name [] and char * name in C?

Someone can explain to me what is the difference between: char* name = "Gerardo"; or char name[] = "Gerardo"; I would like to know the differences in terms of memory or performance.     
asked on 09.09.2016 / 19:14
5
answers

Alternatives to Eclipse to develop in J2EE [closed]

Some time ago I am looking for a solid alternative to Eclipse to develop on J2EE, since at certain moments Eclipse is somewhat "erratic" (failures, corruption, ...) especially when you try to work with a J2EE server How can Wildfly be? To be...
asked on 10.12.2015 / 15:40
2
answers

C / C ++ - Pointers (Heap and Stack)

A few weeks ago I did a question about pointers . Now I have another that I believe involves the Heap and the Stack. The code is as follows: int main() { int *x; int *y; int w; x = new int(); w = 85; *x = w; y =...
asked on 15.01.2018 / 15:23
3
answers

Divide each element of an array

I have this array promedio = [220,230]; and to each I need to divide it by var cantidad = 4;     
asked on 09.06.2017 / 16:38
4
answers

How to validate a field in html5 without reloading the page?

I have a form and in this I have two INPUTS , these are required so I use the HTML5 REQUIRED property but it only works if I put a BUTTON strong> and this makes my page recharge when doing submit but I do not send it directly but I use A...
asked on 10.02.2017 / 03:33
3
answers

Differences between JQuery invocations

Some time ago I was wondering the following question: What is the difference between: $(document.body) $('body') If you could justify me, it would be very helpful.     
asked on 06.06.2017 / 22:27