Posts by Leandro Brito • 258 points
10 posts
-
0
votes1
answer565
viewsA: Python and pymysql connection
Give a t.commit() after the cursor.execute() import sys sys.path.append('/home/felipe/Documents/Projetos/MegaSena/conection') from conn import conexao class User(): def insere(self): t = conexao()…
-
0
votes1
answer692
viewsA: Place data from a spreadsheet in Excel in the database
Try it this way py.models class Funcionario(models.Model): nome = models.CharField(max_length=255), situacao = models.BooleanField, email = models.CharField(max_length=255) site =…
-
0
votes2
answers289
viewsA: Django create paging using Ajax
Django template language works by making new server-side requests, to load only the result through ajax you will need to create the javascript call and an api that returns the table items in json…
-
0
votes1
answer729
viewsA: What is request.post and what is its function?
Through request.post you send information to an endpoint to be processed and return a replay. Example: import requests API_ENDPOINT = "http://teste.com/api/api_post" data = {'code':'python'} r =…
python-3.xanswered Leandro Brito 258 -
5
votes2
answers477
viewsA: Why is the variable not modified?
To modify a variable you need to set it as global or take it as parameter. variavel = 0 def valores(): global variavel if (variavel == 0): variavel = 100 elif (variavel == 1): variavel = 200 def…
-
2
votes1
answer337
viewsQ: Site . NET with high performance
I will start building a website to purchase tickets and the access forecast to main page is 8000 users per minute. We must use C# . NET and MVC. The database, design standard, ORM and frameworks are…
-
0
votes1
answer110
viewsQ: Pattern design for Webapi project
I need to create a project with Webapi to consume some procedures of a remote SQL database, for example: sp_retornaProdutos(1) turning that into /produtos/1 and returning the result in JSON. I…
-
2
votes1
answer263
viewsQ: Show mobile image when it exists
Hello, I have a CMS own and encoded a feature to allow, in addition to uploading image of default size, a second image mobile that will be shown with media query when the resolution is less than…
-
1
votes4
answers6094
viewsA: Side banner that accompanies the scroll
<!DOCTYPE html> <html> <head> <style> #banner { position: fixed; left: 10px; height: 300px; width: 110px; padding: 10px 5px; …
-
1
votes2
answers1187
viewsA: How to edit data from a Table after postback in ASP.NET?
You need to rebuild your table with this new value which may imply creating it fully in the Behind code. Another option that might make your job easier is to use a gridview, store the datasource in…