Resultats de text complet:
- 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);
- 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
- 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
- python_web
- **) precedida per un **decorator (app.route)**: <file python web.py> #... codi previ... @app.route('/h... o(): return 'Hello again!' #...mes codi... </file> ==== Mètodes [GET,POST,+] ==== A més, cal tenir... nt exemple, utilitzant ''request.form['nom']'': <file python web.py> # si no especifiquem res al decora... .form["nom"] return "Salut, {}".format(nom) </file> ==== Exercici ==== <WRAP todo> * Crea un form
- materialize
- a de quedar aproximadament així: <WRAP prewrap> <file html index.html> <meta http-equiv="Content-Secu... <meta name="color-scheme" content="light dark"> </file> </WRAP> Engega-ho en el browser i assegura't qu... ina, hauria de quedar algo així: <WRAP prewrap> <file html index.html> <!-- Scripts --> <script s... ></script> <script src="js/init.js"></script> </file> </WRAP> A ''init.js'' li afegirem el codi que t
- django_api
- s ''Question'' en format JSON d'aquesta manera: <file python views.py> from django.http import JsonResp... "questions":list(qs) }, safe=False) </file> Recorda que abans caldrà que implementis un //e... emple a ''/get_questions'' dins de ''urls.py'': <file python urls.py> from django.urls import path fro... , views.get_questions, name='get_questions'), ] </file> I podrem obtenir les dades des del //browser//
- 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... rxiu ''uploads.ini'' amb les dades següents:<code>file_uploads = On memory_limit = 500M upload_max_files... Wordpress. - Afegeix l'arxiu ''uploads.ini'': <file php uploads.ini>file_uploads = On memory_limit =
- 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
- php
- ru): * [[https://www.php.net/manual/es/function.file.php|file()]] : carrega tot un fitxer en un array (cada línia serà un element) * [[https://www.php.net/manual/es/function.file-put-contents.php|file_put_contents()]] : guarda les dades en un arxiu. * [[https://www.php.net/manual
- docker_flask
- 'un exemple amb el //framework// web [[Flask]]: <file yaml docker-compose.yml> version: "3" services: ... "5000:5000" redis: image: "redis:alpine" </file> <file Dockerfile Dockerfile> # syntax=docker/dockerfile:1 FROM python:3.7-alpine WORKDIR /code ENV FL... s.txt EXPOSE 5000 COPY . . CMD ["flask", "run"] </file> <file python app.py> import time import redis
- webscraping_apache
- se64 image if download: image_file_name_to_save = nom_directori + "/" + image.split("/")[-1] print(image_file_name_to_save) image_file = open(image_file_name_to_save, "wb") image_file.write(downloaded_image.content)
- unity_ar
- ent sigui Android. Per això el que farem serà: File -> Build Settings -> Android -> Switch Platform ... t settings. Per treure aquesta finestra farem: File -> Build Settings -> Player Settings Se'ns obr... alvem l'escena per aplicar tots els canvis. File -> Save I a continuació el Build File -> Build Settings -> Build Com a nom li podem posar "De
- android_spinner
- ple, per fer un selector de números del 0 al 5: <file xml strings.xml> <resources> <string-array na... <item>5</item> </string-array> </resources> </file> Es pot crear un Spinner de forma programàtica amb el seu ''Adapter'' d'aquesta manera: <file java> Spinner spinner = new Spinner(this); ArrayA... ple_spinner_item); spinner.setAdapter(adapter); </file> \\ ==== A partir de dades dinàmiques ==== Per