All Questions

4
answers

How to change the appearance of an object when clicking?

I'm doing a minimalist memory game, to practice HTML and CSS code, but as a good beginner, I can not find how when the user clicks on a letter (not the effect: hover) it shows the back. In other words, I have the following object: Stylized...
asked on 27.04.2017 / 02:54
4
answers

Compare elements of an arrangement

How can I compare a variable with each and every element of an array var saludo = ["hi", "hola", "buenos dias", "buen dia"]; if(otraVariableX == saludo[]) { alert("Hola!!!"); } only the if works for me if I specify the position...
asked on 02.05.2017 / 21:51
3
answers

Events "keypress" "keydown" "keyup"

I want a certain function to be executed when I press a key, whatever. But let it run once (at the moment you press it). I expected to do this with "keydown" but behaves the same "keypress" addEvent(document, "keypress", function (e) {...
asked on 30.06.2017 / 22:40
3
answers

Cycle problem for JavaScript

I have the following code: leaderboard.length is defined from the server and in my case it is 12 var l = leaderboard.length; var i = 0; for ( ; i < l; i++) { var o = (i + 1) + ". " + name; } This will show me the positi...
asked on 19.04.2017 / 16:27
3
answers

Variable functions in javascript

In PHP we have the variable functions , which basically allow us to do this among other things class Bar { function __construct($foo) { $this->{'funcion' . $foo}(); } private function funcionHola() { e...
asked on 03.02.2018 / 04:50
3
answers

Not working properly .gitignore when versioning an Android project

I still can not have a .gitignore file that can help my code versioned in git for an Android project, if I modify a class or something very simple modifications are made in unnecessary files like tests. Annex my .gitignore too. *.iml .gr...
asked on 26.10.2017 / 17:11
2
answers

Change a variable within a function each time you call it

This program must cause two bots to attack each other, first one then the other, and I made an attack function but I do not know how to make it general for when I call it the first time the variables that are inside the function correspond to th...
asked on 07.10.2018 / 17:53
1
answer

What is the difference between cookies and sessionStorage / localStorage?

I understand the difference between localStorage and sessionStorage, but what is the difference between cookies vs local / session? Which has more security, advantages, etc.? Which one is better to use? Greetings and thanks.     
asked on 21.09.2018 / 19:23
2
answers

Get email from a varchar field (in the BD) and then update

I have the following data recorded in my column: As you can see, it's a varchar and one I can record whatever I want, the idea is to create an application in php , that only take me inside the varchar the email , and then update t...
asked on 11.09.2018 / 20:03
2
answers

Why can not Convert.ToDateTime convert string for the month of March? ("01-Mar-2017")

From the reading of an Excel spreadsheet I receive the following information: "01-Mar-2017" "Aug 1, 2017" "01-Jun-2017" "0" To validate this data I do: (I configure the cultural info to transform the date, I already tried "en-US"...
asked on 24.10.2017 / 19:44