Resultats de text complet:
- django_react
- io Afegim els models de l'app a ''models.py'': <file python models.py> from django.db import models fr... # + altres atributs que es vulguin afegir... </file> <WRAP tip> És important fer un usuari personali... també ''corsheaders'' per a la gestió de l'API: <file python settings.py> AUTH_USER_MODEL = 'biblio.Usu... u-domini.com", # Quan el tinguis en producció ] </file> Afegim els models a ''admin.py'': <file python
- django_lliga
- er a l'equip en el què jugava en aquell moment. <file python models.py> # models Lliga, Equip, Jugador,... etalls = models.TextField(null=True,blank=True) </file> <-- --> Proposta implementació Partit# Els part... l partit. Això es pot implementar com segueix: <file python models.py> class Partit(models.Model): ... vent.EventType.GOL,equip=self.visitant).count() </file> <-- \\ ===== Implementar admin panel ===== Vi
- libgdx_comunicacions
- s en Android cal activar els permisos adequats: <file xml AndroidManifest.xml> <uses-permission and... me="android.permission.ACCESS_NETWORK_STATE" /> </file> Si volem compilar versió HTML: <file xml GdxDefinition.gwt.xml> <inherits name='com.github.czyzby.... e='com.github.czyzby.websocket.GdxWebSocket' /> </file> I el més important, configurar els diferents ''
- integracio_de_django_amb_react
- --> Proposta d'implementació Customer i Account# <file python models.py> class Project(models.Model): ... self): return self.description </file> <-- <WRAP todo> Aquest model no contempla que le... a //INSTALL_APPS// com es mostra a continuació: <file python settings.py> INSTALLED_APPS = [ 'custo... es', 'corsheaders', 'rest_framework', ] </file> També cal que el port localhost 3000 estigui en
- syntax @wiki
- is behavior can be enabled in the [[doku>config]] file. Hint: If DokuWiki is a link, then it's enabled. ... ?php /** * Customization of the english language file * Copy only the strings that needs to be modifie... ats. To mitigate the problem, you can upload your file in different formats for maximum browser compatib... filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would
- java_lectura_escriptura
- egir arxius de text fem servir dues classes: - **File**: representa una ruta al sistema de fitxers, i p... <code java> package FileReadWrite; import java.io.File; import java.io.FileNotFoundException; import jav... tring args[]) { int lineNumber = 1; File text = new File("./Main.java"); Scanner scnr; try { scnr = new Scanner(text);
- android_multimedia
- spai privat caldrà: - Afegir un arxiu ''res/xml/file_paths.xml'' on s'indiquen carpetes i arxius compa... '. - Al codi de l'''Activity'' transformar el ''File'' estàndard a ''Uri'' (recurs compartible) amb el... ail//). ==== Arxius XML ==== <code xml res/xml/file_paths.xml> <?xml version="1.0" encoding="utf-8"?>... ta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xm
- nodejs_selenium
- te, encara que no estiguem treballant en NodeJS: <file text .gitignore> node_modules/ </file> \\ ===== Desenvolupament ===== En aquests tests funcionals, e... <tabbox Versió Linux> === run.sh per a PHP === <file bash run.sh> #!/bin/bash # directori del script r... rc # engeguem el PHP server php -S 0.0.0.0:8000 </file> === run.sh per a Cordova === <file bash run.sh>
- django_docker
- ckerfile permet crear la imatge del contenidor. <file Dockerfile Dockerfile> # We Use an official Pytho... ","manage.py"] CMD ["runserver","0.0.0.0:8000"] </file> Fixeu-vos en què la darrera instrucció equival ... da en producció juntament amb la base de dades: <file yaml docker-compose.yml> version: '3.1' services... volumes: - ./db.sqlite3:/code/db.sqlite3 </file> Per posar-ho en marxa primer cal crear un arxiu
- ids-maltrail
- }} quick start instal·lació For Ubuntu/Debian <file bash Instal·lació-mailtrail-debian> sudo apt-get ... do python3 sensor.py & sudo python3 server.py & </file> Exemple de detecció {{:maltrail2.jpg?400|}} d... rything is up and running execute the following <file bash comanda-ping> ping -c 1 136.161.101.53 cat /var/log/maltrail/$(date +"%Y-%m-%d").log </file> Per realitzar el bloqueig dependrà de la classi
- fastapi
- cés "/api/index" que ens retornarà el missatge. <file python main.py> from fastapi import FastAPI app =... ndex(): return {"message": "Hola FastAPI!"} </file> <code> uvicorn main:app --reload </code> <WRAP... àmiques de les peticions directament de la URL: <file python main.py> @app.get("/student/{id}") async def student_info(id:UUID): ..... ..... </file> ====Query parameters==== Son paràmetres del ti
- django_frontend
- rls.py de //mysite//. Afegeix a mysite/urls.py: <file python mysite/urls.py> ... from django.urls impor... ath('polls/', include("polls.urls")), ... ] </file> I afegiu l'arxiu ''urls.py'' amb el contingut: <file python polls/urls.py> from django.urls import pat... urlpatterns = [ path('', views.index ), ] </file> Ara teniu disponible la //view// index des de 2
- android_bluetooth
- s'enregistrarà al sistema d'arxius del mòbil). <file xml dialog_ble_conn.xml> <?xml version="1.0" enco... pat="@tools:sample/avatars" /> </LinearLayout> </file> \\ ==== BLEconnDialog ==== <file kotlin BLEconnDialog.kt> class BLEconnDialog( context: Context... ConnectionCancelled() fun onReceivedImage(file: File) } // Views private lateinit v
- docker_nodejs
- la imatge: {{:wiki:projecteapi.png?nolink&200|}} <file Creació_Servei index.js> const express = require(... le.log('Servidor escoltant en el port: ',3000); </file> <file Creació_Routes index.routes.js> const {Router} = require('express'); const router = Router(); c... ts',mostrarpacients); module.exports = router; </file> <file Creació_Controladors index.controllers.js>
- django
- la nova app afegint aquestes línies als arxius: <file pyhton settings.py> # ... INSTALLED_APPS = [ "myapp.apps.MyappConfig", # ... </file> I activar els models a l'admin panel a: <file python admin.py> from django.contrib import admin from ... r(MyModel1) admin.site.register(MyModel2) # ... </file> Comprovem que no tenim errors en els models:
