Resultats de text complet:
- 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
- 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);
- 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>
- 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
- 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
- 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
- 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, ''build.gradle'' general de
- 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
- django_test
- panell d'administració de la nostra app Django: <file python tests.py> from django.test import TestCase... tTrue de "login" per no provocar un test fallit </file> Els tests es poden posar en marxa amb: (env) ... tests, cal posar-ho en la **funció ''setUp''**: <file python tests.py> from django.test import TestCase... ssertTrue( "Log out" in str(response.content) ) </file> \\ ===== Utilitzant una DB de test ===== De ve
- 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> Cada cop que modifiquem el model de dades del p
- 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>
- android_threads
- tualment per executar un //thread// és aquesta: <file java> ExecutorService executor = Executors.newSin... } }); } }); </file> \\ ===== Executar operacions amb retard al UI... //thread// de mes amunt per poder-la executar. <file java MainActivity.java> String error = ""; //... Trace(); } return result; } </file> Per poder-se connectar a internet, cal [[https:
- dockerfile
- sió elemental del ''Dockerfile'' seria aquesta: <file Dockerfile Dockerfile> # imatge base. "scratch" =... xa un servei en primer plànol CMD ["/bin/bash"] </file> Els fitxers que posarem a la carpeta ''src'' lo... com posar variables d'entorn com ''PATH'', etc. <file bash /etc/bash.bashrc> echo "Benvingut al docker ... de bash." echo "Mes comandes ...coming soon..." </file> Comprova que ens apareix el missatge si reconst