All Questions

4
answers

I can not use boundary (\ b) to validate a word that begins with "@"

In the case of / \ b @ MYVAR \ b / i, I can not use boundary, See: link I need to validate a string that contains a @MYVAR (Example) word. Are there any restrictions on this character? What would be an alternative? I tested javascript an...
asked on 12.07.2017 / 23:23
3
answers

Change field type MySQL

I wonder if it is possible to change the data type of a column in Mysql. For example: I have a USUARIO table with the SITUACAO column, in varchar and need to change to bit . I thought about doing something like: UPDA...
asked on 08.10.2015 / 14:52
2
answers

What is the HTTP verb that I use for logout?

I have a logout endpoint to make the current user token invalid. With this I had a question: Which HTTP verb should I use to log out?     
asked on 13.07.2017 / 18:19
2
answers

Performative difference of Any () and Count ()

When I need to check whether a collection has elements which of the two methods will be faster, .Count() =! 0 or .Any() ? I've heard that .Count() may be faster in some cases. But by checking the source code , the metho...
asked on 11.08.2015 / 18:33
5
answers

What is the best practice to know if a row exists in a SELECT in MySQL?

For example, when we are going to check if a user is already registered in the table, we do not need any data return by the query, just check if the number of rows is greater than 0 ( num_rows > 0 ). In the scripts and frameworks...
asked on 09.07.2015 / 22:36
2
answers

How to remove img tags from a text?

I need to remove all img tags from text in javascript. So the pictures do not come. Note: The text is random. How to do it: Vestibulum varius lectus a ante euismod <img src="teste2.jpg"> cursus. Nam sed semper augue, a laoreet purus....
asked on 28.04.2017 / 16:07
5
answers

In the ORDER BY of a SELECT exchange point by point

I have a table in MYSQL (you can see here link ), where the price is commas and not points: 2.33 11.00 When I will give an order by: ORDER BY preco ASC The system understands that it is a string and puts the 11.00 in front, how to do...
asked on 11.10.2016 / 21:14
3
answers

What is the purpose of the "header ()" function?

In my question about HTTP protocol I understand that HTTP requests have a format that is described by the protocol itself. However, in PHP there is a function that sends data to HTTP which is the header() function and I did not quite...
asked on 07.01.2017 / 18:59
2
answers

Query that returns if the child inherited the surname of the father and / or mother

I have a scenario that I need to sort my records where: Did the child inherit the surname of the father and / or his mother? Notice in the picture that if one of the child's last names exists in the parent's name the PAI? field ge...
asked on 19.04.2017 / 21:40
3
answers

How can I make a copy of an array without reference?

I would like to know how to make a copy of an array without the reference. Example of what I'd like to do: var a = [1,2,3,4]; var b = a; a[0] = 3; b[0] = "nao me copie!" console.log(a[0]) //mostrar 3 console.log(b[0]) //mostrar frase nao m...
asked on 25.08.2015 / 08:43