Programmierung: Unterschied zwischen den Versionen

Aus Wiki_2020
Wezi (Diskussion | Beiträge)
Wezi (Diskussion | Beiträge)
 
(39 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=== Zeug ===
(needs to be sorted)
* ''Berechnunmg Taupunkt etc'' http://www.caps.ou.edu/ARPS/arpsbrowser/arps5.2.4browser/html_code/adas/mthermo.f90.html
*https://crontab-generator.org/
*''Grafische Darstellung Cloud'' https://www.highcharts.com/demo <br>


=== Onlinetools ===
*[https://www.onlinegdb.com/ Online Programming IDE/Debugger für unterschiedliche Programmiersprachen]
=== Circuitpython ===
*[https://learn.adafruit.com/welcome-to-circuitpython/overview Circuitpyton @adafruit ]<br>
*[https://docs.circuitpython.org/en/latest/docs/index.html Docs]
*[https://code.circuitpython.org online Programming IDE]


=== Python ===
=== Python ===
  * ''notes and tips for updating from Python 2 to Python 3'' https://pymotw.com/3/porting_notes.html
https://realpython.com/lessons/sphinx-basics-python/
* https://docs.python.org/3.1/library/index.html#library-index
Sphinx
* https://py-tutorial-de.readthedocs.io/de/latest/index.html
* Venv
* https://www.w3schools.com/python/default.asp
- erstellen:
* https://www.python-kurs.eu/python3_kurs.php
  '''python3 -m venv sphinx-env'''
* https://www.python-kurs.eu/python3_skript_ausfuehren.php Python3 Tutorial
- aktivieren
* https://binged.it/2YE2G96  Pyton QT Raspberry
'''source sphinx-env/bin/activate'''
* ''SELF Explained'' https://pythontips.com/2013/08/07/the-self-variable-in-python-explained/
- deaktivieren
=== tkinter ===
'''deactivate'''
  * ''Grafik mit tkinter'' https://pythonbasics.org/tkinter/
*[https://sphinx-tutorial.readthedocs.io/start/ Sphinx Tutorial]
* http://effbot.org/tkinterbook/tkinter-index.htm#class-reference
 
* https://tkdocs.com
* [https://realpython.com/python-comments-guide/ Python Comments Guide]
* https://pythonbasics.org/tkinter_scale/
* [http://pythontutor.com/visualize.html#mode=display Online Python Tutor]
* ''Raspi GUI TKinter '' https://docs.python.org/3/library/tkinter.html#a-simple-hello-world-program
* [https://www.techbeamers.com/python-format-string-list-dict/#simple-example print() Formatierung]
* [https://pymotw.com/3/porting_notes.html notes and tips for updating from Python 2 to Python 3]
* https://docs.python.org/3.1/library/index.html#library-index
* https://py-tutorial-de.readthedocs.io/de/latest/index.html
* https://www.w3schools.com/python/default.asp
* https://www.python-kurs.eu/python3_kurs.php
* [https://www.python-kurs.eu/python3_skript_ausfuehren.php Python3 Tutorial]
* [https://binged.it/2YE2G96  Pyton QT Raspberry]
* [https://pythontips.com/2013/08/07/the-self-variable-in-python-explained/ SELF Explained]
* [https://pythonbuch.com/objekte.html ''Objekte & self'' ]
* https://en.wikibooks.org/wiki/A_Beginner's_Python_Tutorial
* https://pythonspot.com
* https://realpython.com/python3-object-oriented-programming/#what-is-object-oriented-programming-oop
==== Codeexamples ====
#An example of a class
class Shape:
    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.description = "This shape has not been described yet"
        self.author = "Nobody has claimed to make this shape yet"
    def area(self):
        return self.x * self.y
    def perimeter(self):
        return 2 * self.x + 2 * self.y
    def describe(self, text):
        self.description = text
    def authorName(self, text):
        self.author = text
    def scaleSize(self, scale):
        self.x = self.x * scale
        self.y = self.y * scale
#create 3 objekts of shape       
    rectangle = Shape(100, 45) 
    long_rectangle = Shape(120,10)
    fat_rectangle = Shape(130,120)
#finding the area of your rectangle:
    print(rectangle.area())
  #finding the perimeter of your rectangle:
    print(rectangle.perimeter())
#describing the rectangle
    rectangle.describe("A wide rectangle, more than twice\
    as wide as it is tall")
#making the rectangle 50% smaller
    rectangle.scaleSize(0.5)
#re-printing the new area of the rectangle
    print(rectangle.area())
 
=== Tkinter ===
* https://tcl.tk/man/tcl8.6/contents.htm
* https://tkdocs.com/tutorial/intro.html#audience
* ''Grafik mit tkinter'' https://pythonbasics.org/tkinter/
* http://effbot.org/tkinterbook/tkinter-index.htm#class-reference
* https://tkdocs.com
* https://pythonbasics.org/tkinter_scale/
* ''Raspi GUI TKinter '' https://docs.python.org/3/library/tkinter.html#a-simple-hello-world-program


=== Diverse ===
=== Diverse ===
Zeile 25: Zeile 92:


=== C ===
=== C ===
 
''' Tutorials, allg. Wissen zu C  '''
* [http://www.geeksforgeeks.org/c/ A computer science portal for geeks ]
*[https://www.heise.de/hintergrund/Einfuehrung-in-die-Programmiersprache-C-9871116.html?seite=all Einfuehrung in die Programmiersprache C]
* [https://de.wikibooks.org/wiki/C-Programmierung:_Eigene_Header C-Programmierung Wikibooks]
* [https://de.wikibooks.org/wiki/C-Programmierung:_Eigene_Header C-Programmierung Wikibooks]
* [https://www.proggen.org/doku.php?id=c:start C-Programmierung allgemein]
* [https://www.proggen.org/doku.php?id=c:start C-Programmierung allgemein]
* [http://pic-projekte.de/wordpress/?cat=15 PIC C XC8 Tutorial]
* [http://pic-projekte.de/wordpress/?cat=15 PIC C XC8 Tutorial]
* [http://www.c4learn.com/c-programming/c-pointer-array-structure/ C-programmierung]
* [https://web.archive.org/web/20190210001158/http://www.c4learn.com/c-programming C-programmierung]
* [https://en.wikipedia.org/wiki/Circular_buffer Ringpuffer]
* [https://en.wikipedia.org/wiki/Circular_buffer Ringpuffer]
* [http://www.zentut.com/c-tutorial/ C-Tutorial]
* [http://www.zentut.com/c-tutorial/ C-Tutorial]
* [http://www.c-howto.de/tutorial.html Das C Tutorial (deutsch)]
* [http://www.c-howto.de/tutorial.html Das C Tutorial (deutsch)]
* [http://microchip.wikidot.com/tls2101:start Fundamentals of the C Programming Language]
* [http://microchip.wikidot.com/tls2101:start Fundamentals of the C Programming Language]
'''Arduino IDE'''
* [https://learn.adafruit.com/using-the-adafruit-unified-sensor-driver unified Sensor Driver]
*'''Pi pico'''
# [https://stackoverflow.com/questions/71327860/raspberry-pi-pico-locks-up-when-i-try-to-use-interrupts?xworks-target=blank interrupt 1]
# [https://gammon.com.au/interrupts?xworks-target=blank interrupt 2]
*'''Pointers'''
# [https://www.proggen.org/doku.php?id=c:type:struct struct&pointer]
# [https://www.programiz.com/c-programming/c-structures-pointers Pointer 2 Structs]
# [https://www.logiqbit.com/arduino-pointers-how-to-use-pointers-in-your-sketches Arduino Pointers]
# [https://www.programiz.com/c-programming/c-pointers Pointers]
#include <stdio.h>
#include <stdlib.h>
int main(void) {
  int x = 5; // Integervariable
  int *ptr ; // Pointer für Int variable
  ptr = &x;  // auf Adresse von x referenzieren
  printf("x ist %d \n",x);
  printf("Die Adresse von x ist %p \n",ptr);
  printf("Der Wert x ist %d \n",*ptr); 
  return EXIT_SUCCESS;
}
/* ptr1.c */
#include <stdio.h>
#include <stdlib.h>
struct menu
{
  int item;
  char titel[5];
};
int main(void) {
int n=2;
struct menu *ptr;
ptr = (struct menu*) malloc(n * sizeof(struct menu));
printf("Die Adresse von x ist %p \n",ptr);
char i1[] = "test_1";
ptr->item = 8;
//ptr->titel = i1;
(ptr+n)->item = 10;
//int x = 5; // Integervariable
  // int *ptr ; // Pointer für Int variable
  // ptr = &x;  // auf Adresse von x referenzieren
  // printf("x ist %d \n",x);
  // printf("size of struct is %u \n",sizeof(struct menu));
printf("Der Wert x ist %d \n",ptr->item);
printf("Der Wert x ist %d \n",(ptr+n)->item);
  // printf("Der Wert x ist %d \n",menu.item);
  return EXIT_SUCCESS;
}
/* ptr1.c */
#include <stdio.h>
#include <stdlib.h>
struct menu
{
  int item;
  char titel[5];
};
int main(void) {
int n=2;
struct menu *ptr;
ptr = (struct menu*) malloc(n * sizeof(struct menu));
printf("Die Adresse von x ist %p \n",ptr);
char array[5] = "tast";
char (*arptr)[5]; // pointer 2 array
arptr = &array;  // pointer referenzieren
ptr->item = 8;
//ptr->titel = &arptr;
(ptr+n)->item = 10;
//int x = 5; // Integervariable
// int *ptr ; // Pointer für Int variable
// ptr = &x;  // auf Adresse von x referenzieren
// printf("x ist %d \n",x);
printf("i1 is %s \n",array);
printf("Der item[0] ist %d \n",ptr->item);
printf("Der item[1] ist %d \n",(ptr+n)->item);
printf("Die Adresse von aptr ist %p \n",&arptr);
printf("Die Wert an Adresse von aptr ist %s \n",*arptr);
return EXIT_SUCCESS;
}
*'''Menu'''
# [https://www.mikrocontroller.net/topic/104156 Menue C]
# [https://cboard.cprogramming.com/c-programming/99735-embedded-menu-system-2.html Embedded Menuesystem]
* [http://www.geeksforgeeks.org/c/ A computer science portal for geeks ]


=== MYSQL ===
=== MYSQL ===


*[https://einfachdatenbank.de/ Back-/Frontend Python & MYSQL]
*[https://sql-tutorial.de/home/start.php SQL Tutorial]
  Escape  
  Escape  
  Sequence    Character Represented by Sequence
  Sequence    Character Represented by Sequence

Aktuelle Version vom 10. Dezember 2024, 10:39 Uhr

Zeug

(needs to be sorted)

Onlinetools

Circuitpython

Python

https://realpython.com/lessons/sphinx-basics-python/ Sphinx

  • Venv

- erstellen:

python3 -m venv sphinx-env

- aktivieren

source sphinx-env/bin/activate

- deaktivieren

deactivate

Codeexamples

#An example of a class
class Shape:
   def __init__(self, x, y):
       self.x = x
       self.y = y
       self.description = "This shape has not been described yet"
       self.author = "Nobody has claimed to make this shape yet"
   def area(self):
       return self.x * self.y
   def perimeter(self):
       return 2 * self.x + 2 * self.y
   def describe(self, text):
       self.description = text
   def authorName(self, text):
       self.author = text
   def scaleSize(self, scale):
       self.x = self.x * scale
       self.y = self.y * scale
#create 3 objekts of shape        
    rectangle = Shape(100, 45)  
    long_rectangle = Shape(120,10)
    fat_rectangle = Shape(130,120)
#finding the area of your rectangle:
    print(rectangle.area())
#finding the perimeter of your rectangle:
    print(rectangle.perimeter())
#describing the rectangle
    rectangle.describe("A wide rectangle, more than twice\
    as wide as it is tall")
#making the rectangle 50% smaller
    rectangle.scaleSize(0.5)
#re-printing the new area of the rectangle
    print(rectangle.area())

Tkinter

Diverse

C

Tutorials, allg. Wissen zu C

Arduino IDE

  • Pi pico
  1. interrupt 1
  2. interrupt 2
  • Pointers
  1. struct&pointer
  2. Pointer 2 Structs
  3. Arduino Pointers
  4. Pointers
#include <stdio.h>
#include <stdlib.h>
int main(void) {
  int x = 5; // Integervariable
  int *ptr ; // Pointer für Int variable
  ptr = &x;  // auf Adresse von x referenzieren
  printf("x ist %d \n",x);
  printf("Die Adresse von x ist %p \n",ptr);
  printf("Der Wert x ist %d \n",*ptr);   
  return EXIT_SUCCESS;
}
/* ptr1.c */
#include <stdio.h>
#include <stdlib.h>
struct menu
{
  int item;
  char titel[5];
};
int main(void) {
int n=2;
struct menu *ptr;
ptr = (struct menu*) malloc(n * sizeof(struct menu));
printf("Die Adresse von x ist %p \n",ptr);
char i1[] = "test_1";
ptr->item = 8;
//ptr->titel = i1;
(ptr+n)->item = 10;
//int x = 5; // Integervariable
 // int *ptr ; // Pointer für Int variable
 // ptr = &x;  // auf Adresse von x referenzieren
 // printf("x ist %d \n",x);
 // printf("size of struct is %u \n",sizeof(struct menu));
printf("Der Wert x ist %d \n",ptr->item);
printf("Der Wert x ist %d \n",(ptr+n)->item);
 // printf("Der Wert x ist %d \n",menu.item);
 return EXIT_SUCCESS;
}
/* ptr1.c */
#include <stdio.h>
#include <stdlib.h>
struct menu
{
  int item;
  char titel[5];
};
int main(void) {
int n=2;
struct menu *ptr;
ptr = (struct menu*) malloc(n * sizeof(struct menu));
printf("Die Adresse von x ist %p \n",ptr);
char array[5] = "tast";
char (*arptr)[5]; // pointer 2 array
arptr = &array;   // pointer referenzieren
ptr->item = 8;
//ptr->titel = &arptr;
(ptr+n)->item = 10;
//int x = 5; // Integervariable
// int *ptr ; // Pointer für Int variable
// ptr = &x;  // auf Adresse von x referenzieren
// printf("x ist %d \n",x);
printf("i1 is %s \n",array);
printf("Der item[0] ist %d \n",ptr->item);
printf("Der item[1] ist %d \n",(ptr+n)->item);
printf("Die Adresse von aptr ist %p \n",&arptr);
printf("Die Wert an Adresse von aptr ist %s \n",*arptr);
return EXIT_SUCCESS;
}


  • Menu
  1. Menue C
  2. Embedded Menuesystem

MYSQL

Escape 
Sequence    Character Represented by Sequence
  \0         An ASCII NUL (0x00) character.
  \'         A single quote (“'”) character.
  \"         A double quote (“"”) character.
  \b         A backspace character.
  \n         A newline (linefeed) character.
  \r         A carriage return character.
  \t         A tab character.
  \Z         ASCII 26 (Control+Z).
  \\         A backslash (“\”) character.
  \%         A “%” character. 
  \_         A “_” character.