Samstag, 31. August 2024

nj

 

Download deiner Datei

m

 

Download Python-Skript Python-Skript herunterladen

ko

 

Python-Code herunterladen

fr

 

Code herunterladen Code herunterladen

ub

 

Mein Online-Code-Editor

ji

 

Mein Code-Editor
const { ipcRenderer } = require('electron'); require.config({ paths: { 'vs': 'https://cdn.jsdelivr.net/npm/monaco-editor@0.38.0/min/vs' } }); require(['vs/editor/editor.main'], function () { monaco.editor.create(document.getElementById('container'), { value: '// Dein Code hier', language: 'javascript', theme: 'vs-dark' }); ipcRenderer.on('download-code', (event, args) => { // Handle code download logic }); }); const { app, BrowserWindow } = require('electron'); function createWindow () { const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, contextIsolation: false, // This might need adjustments based on security needs preload: path.join(__dirname, 'preload.js') // Optional preload script } }); win.loadFile('index.html'); } app.whenReady().then(createWindow); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } });

hh

 

from flask import Flask, request, jsonify import sqlite3 app = Flask(__name__) def get_db_connection(): conn = sqlite3.connect('riddle.db') conn.row_factory = sqlite3.Row return conn @app.route('/', methods=['GET', 'POST']) def index(): if request.method == 'POST': solution = request.json['solution'] conn = get_db_connection() correct_solution = conn.execute('SELECT solution FROM riddles').fetchone()[0] conn.close() if solution == correct_solution: return jsonify({'message': 'Richtig!'}) else: return jsonify({'message': 'Leider falsch.'}) return render_template('index.html') if __name__ == '__main__': app.run(debug=True)

nj

  Download deiner Datei