All Questions

1
answer

Return in a ListView information of 2 models filtered by the authenticated user

Hi, I'm new to django and would like to know how I can return the information of an authenticated user of 2 models in a ListView This is my code: models.py from django.contrib.auth.models import User class ModelOne1(models.Model):...
asked on 20.08.2018 / 15:35
3
answers

Open files downloaded from PHP

I'm trying to open files with this function. For files *.pdf and *.txt works fine, but if the file is *.doc or *.odt when downloading and opening it, strange characters appear. $filepath = '/var/download/prueba.doc'...
asked on 04.09.2018 / 14:45
2
answers

Problem with accents when compiling HTML in R-Markdown

I have the following problem: When creating a graph, working from R-Markdown, and when changing the title and in this a special character is included as accents, ñ, etc. I have to change the enconding and place the following instructio...
asked on 30.08.2018 / 14:56
1
answer

Laravel 5.6: Get sum of a field from a table using sum and where

I have the following code: $tiendas=Tienda::with('factura.cuenta.cuentapago.pago') ->where('cuenta.id_tcuenta','=','1') ->join('ventas.factura', 'tienda.id', '=', 'factura.id_tienda')...
asked on 03.09.2018 / 21:24
1
answer

change the image the index of a stakedWidget using a QcomboBox

Good evening I have the following code: from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic from PyQt5.QtCore import Qt from tabla import tabla_style class Principal(QMainWindow): def __init__(self): QMainW...
asked on 02.09.2018 / 02:30
2
answers

how can I show the data of my delegation column only once without showing it in my table

I show the code where I make my query by delegations, and I show them in a table, what I want is that the delegations field does not show them in the table since the data are the same, that is, the same delegation, so I want it to appear on the...
asked on 02.09.2018 / 04:47
1
answer

Function to concatenate html and jquery table data

I have a table in html with a checkbox in each row what I need is that when selecting the checkbox I take the value of a cell <table> <thead> <th>Seleccionar</th> <th>ejemplo</th>...
asked on 09.08.2018 / 18:37
4
answers

How to get the user id logged in wordpress

I'm doing a php script and I need to get the user id, I have this code: <?php include_once 'wp-load.php'; echo get_current_user_id(); ?> But it returns 0. It's clear that the script I'm doing outside the Wordpress environm...
asked on 04.09.2018 / 00:40
1
answer

PHP: Upload an image to a database

At this moment I am working on a project in PHP. I am basically new and I have many doubts, among which is the following: How do I upload an image to a database using long_blob ? Note that I have two buttons, one to send data to a ta...
asked on 06.08.2018 / 16:51
1
answer

Is there any other way to make a Bubble Sort without defining it?

In Python3, when you search how to make a bubble sort, find something like this def bubbleSort(alist): for passnum in range(len(alist)-1,0,-1): for i in range(passnum): if alist[i]>alist[i+1]: temp =...
asked on 31.07.2018 / 17:26