Skip to content

Instantly share code, notes, and snippets.

View DatMayo's full-sized avatar

Mario Franze DatMayo

  • Individual
  • Merseburg, Germany
View GitHub Profile
def aufgabe1_gerade_zahl():
"""
Aufgabe 1: Finde heraus, wann ein Benutzer eine gerade Zahl eingibt
"""
while True:
try:
zahl = int(input("Bitte geben Sie eine Zahl ein (Programm endet bei gerader Zahl): "))
if zahl % 2 == 0:
print(f"Die eingegebene Zahl {zahl} ist gerade. Programm wird beendet.")
break
@DatMayo
DatMayo / Socket.io with TypeScript and VueJS.md
Created January 15, 2023 09:36
Socket.io with TypeScript and VueJS

This questions where asked to ChatGPT, I saved them to test the answers. There is no guarantee that this will work.


How to use socket.io with typescript in multiple vue components


To use socket.io with TypeScript in multiple Vue components, you can create a service that handles the socket connection and exposes methods for the components to use. Here is an example of how you can set this up:

  1. Install the socket.io-client and @types/socket.io-client packages:

npm install --save socket.io-client

@DatMayo
DatMayo / basicJob.ts
Created December 22, 2020 13:48
[WIP] jobWorker
import { ProcessingType } from "../enums";
import { IItem, IJobItem, IStorage, IVector3 } from "../interfaces";
// import { EventEmitter } from "typed-event-emitter";
export class BasicJob /* extends EventEmitter */ {
private _isLegal: boolean;
private _processorPosition: IVector3;
private _processingTimePerItem: number;
private _processingItemMultiplier: number;
private _maxProcessingStorage: number;
openapi: 3.0.0
info:
description: "Backend Documentation for PLACEHOLDER API"
version: 1.0.0
title: "PLACEHOLDER API"
tags:
- name: account
description: "Login, Register, Update"
paths:
/account/login:
@DatMayo
DatMayo / cloudSettings
Last active March 16, 2022 09:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-03-16T09:06:15.670Z","extensionVersion":"v3.4.3"}