All Questions

1
answer

NavigationBar background color

I have the following NavigationView <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="330dp" android:layout_height="match_parent" android:layout_gravity="st...
asked on 09.05.2018 / 17:45
1
answer

Qt Parse of a Json (object within an array)

I have the next json { "Perfiles": [{ "Nombre":"Default", "E/S": { "EntradaHr": 6.45, "SalidaHr": 12.15 } }] } And the following code #include <QJsonDocument> #include <...
asked on 04.05.2018 / 00:50
1
answer

SQL duplicate management

It turns out that I have to make a query in which I get returned several duplicate records, except for a field that is counters. The question in itself is that I need to collect the record with the highest value of counters. Right now the sen...
asked on 07.05.2018 / 10:47
3
answers

Validate JPG or PNG PHP image

Well the point is that I do not know how to validate the following, in the database I capture the url of an image and then I show it with a echo in php, what I try to do is validate the image either jpg or png to then export it in an exce...
asked on 07.05.2018 / 05:09
2
answers

Count number of SQL records in the same field

It is possible to count how many records there are in a query, I want them to appear as one more column since the query should throw a single row. SELECT dep.nombre as departamento, sum(cap.total_mosquitos) as total_mosquito...
asked on 04.05.2018 / 15:06
1
answer

Error in sentence usanto query ()

I'm doing an internal query and I want to get a field ( idperiodo which is integer ), there should only be one record with the field Active that's why I use limit 1 . I have this code: public function buscar_campo() { try {...
asked on 06.05.2018 / 15:37
3
answers

laravel 5.5 I need to include a variable inside a json type array

I need to include $ token within the $ user array where I save my query, I'm using the laravel 5.5 framework protected function respondWithToken($token,$documento){ $user = User::select('id','nombre','email')->where('documento', $docum...
asked on 09.05.2018 / 19:39
1
answer

copy php file

I have this copy function $srcfile='C:\xampp\htdocs\imagenes\M1001.jpg'; $dstfile='C:\xampp\htdocs\imagenes-copiadas\M1001.jpg'; mkdir(dirname($dstfile), 0777, true); copy($srcfile, $dstfile); I need the name M1001.jpg to be a variable call...
asked on 26.05.2018 / 08:49
1
answer

Execute on unprepared sentences

This is a question of concept consultation. The prepared statements protect the sql injection query. $sth = $dbh->prepare('SELECT name, colour, calories FROM fruit WHERE calories < :calories AND colour = :colour'); $sth->bindParam...
asked on 07.05.2018 / 03:33
1
answer

The NULL field does not return

Good day, I would like you to help me with this problem, this is my query: SELECT Nombre, Cedula, sum(HorasTrabajo) as HorasTrabajo FROM reportebeteitiva group by Cedula WITH ROLLUP; Result in: _____...
asked on 28.05.2018 / 15:31