All Questions

3
answers

How to solve foreign key error 150 in migration with laravel?

I'm having trouble creating the foreign key in migration. I'm working with PHP, LARAVEL 5.3 and MYSQL. You are giving me the following error: Below is my code: Table Migration of the categs class CreateCategsTable extends Migr...
asked on 28.07.2017 / 12:49
2
answers

GPS remains on after closing Activity

I'm using it in my application, GPS and Google Direction. It's working, but I've noticed the following. After I get back from the activity where the map is, the GPS icon on the smartphone does not come out, it looks like it's still consuming the...
asked on 18.07.2017 / 02:04
2
answers

Returning a case sensitive record

I have a constraint in the bank that is all with its capitalized name. How do I count find it using UPPER ? Because I want to pass where a lowercase name to return. This my query is not working. select count(*) fr...
asked on 31.08.2017 / 20:17
2
answers

Regular expression AWK print inside brackets

look, inside my.txt file has the following description: Flags: X - disabled, E - established 0 E name="peer1_cymru" instance=default remote-address=38.xx.xx.xx remote-as=65555 tcp-md5-key="WUf4f8" nexthop-choice=default multihop=ye...
asked on 07.07.2017 / 17:46
3
answers

How to leave the first capital letter?

I have the function, and it works perfectly: $.fn.capitalize = function() { function isTRChar(key) { var trchar = [231, 246, 252, 287, 305, 351]; for (var i = 0; i < trchar.length; i++) { if (trchar[i] == key) return true;...
asked on 27.07.2017 / 19:46
2
answers

How to generate multiple columns in a query from just one column?

I need a Query that returns 2 columns added (input and output) from the "accounting" column of the "tbl_sef" table. The value of the "accounting" column will be in the "input" column when the "cfop" column is less than 5000. And it will be in th...
asked on 16.08.2017 / 18:47
1
answer

How to treat ids with php?

while ($row = mysqli_fetch_array($result)) { echo "<li class='list-inline-item'><a href='news.php?id=" .$row['id']. "'>". $row['titulo'] ."</a></li>"; echo "<br>"; } I...
asked on 21.07.2017 / 01:57
2
answers

Real difference between Call and Apply methods

What is the difference between the call and apply methods? I could not identify the difference in which one separates the arguments and the other generates a vector for the arguments: function scope() { console.log(this,...
asked on 14.04.2018 / 22:06
3
answers

Clicking the link will also work

I always have this doubt, just look: I have a menu, with ul and li: <ul> <li><a href="/inicio">Inicio</a></li> <li><a href="/sobre">Sobre</a></li> <li><a href="/con...
asked on 14.07.2017 / 15:05
1
answer

How to set contents in position 0 with field disabled?

I need, when my component receives a text (it will receive through a query), the text is "set" at the beginning of the field, because in many cases the text is long and the beginning is omitted. The detail that is complicating the solution is th...
asked on 25.08.2017 / 18:07