All Questions

2
answers

Implement cascading methods in JavaScript

In the book JavaScript: The Good Parts , Douglas Crockford explains Cascade's concept of cascading method. According to the author these methods are characterized by changing the state of the object without returning anything. Nested methods re...
asked on 06.12.2014 / 18:30
1
answer

What happens to RAM if a key is pressed on the computer for a long time?

What happens to RAM if a key is pressed on the computer for too long? Example: computer has been turned on and a key is pressed these bytes are being read by the processor and written in memory, right?     
asked on 29.11.2018 / 09:04
3
answers

What is the difference in checking an array with isset and array_key_exists?

In PHP we often have more than one way of doing the same operation. A basic example is in checking for the existence of a given index in array : we can use array_keys_exists . Example: $arr = ['a' => 1, 'b' => 2]; var_dum...
asked on 10.03.2016 / 17:30
4
answers

Validate phone number with optional ninth digit

How do I validate my phone number with the optional ninth digit? in the following formats: DDD + 8 digits = (21) 9876-5432 DDD + 9 digits = (21) 98765-4321     
asked on 19.11.2016 / 05:45
4
answers

Database being changed / Invaded

I do not know if I can ask this question here, otherwise I can ask you to suspend the question, or let me know that I will delete it. For the second time I ran into Bank invaded. Almost all the text fields of all the bank tables have been add...
asked on 05.08.2014 / 16:25
3
answers

Verify Connection Existence with MySQL in PHP

I came across this question recently, how to check if there is an open connection to mysql? Everyone knows that in order to use mysql_real_escape_string need to have a certain connection, so I wanted to check if there is one, if yes then...
asked on 10.04.2014 / 15:49
4
answers

How to handle vectors in a MySQL database?

I have a supermarket carton application where after the end of the sale needs to insert a record with data referring to that sale in a table, this record should include the code of the products bought and the quantity of each. As I'm using a...
asked on 12.12.2013 / 14:13
2
answers

How to use class variable as default value in php functions?

class Teste(){ public variavel; public variavela; function teste($parametro=$this->variavel, $parametro2->$this->variavela){ // code } } I get the following error:    Parse error: syntax error, unexpected '$ this' (T_V...
asked on 09.02.2015 / 20:39
3
answers

Symbol "-" in php [duplicate]

When I used PHPmailer I used (without knowing why) the symbol "->" in $mail->AddAdress(... , for example. Now asking a question in W3schools ( http://www.w3schools.com/php/php_mysql_connect.asp ) I saw this little set "- >" a...
asked on 12.10.2015 / 04:41
3
answers

I need a function to add br under certain conditions [duplicate]

I want a function that adds the <br> tag when the text has no spacing, I made a Fiddle with the problem: link . This function can be done in JavaScript or PHP. <div class="post"> <p>kkkkkkkkkkkkkkkkkkkkkkkkkkkkk...
asked on 29.10.2015 / 20:00