This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Text Slide Hover Effect</title> | |
<style> | |
/* Container styling */ | |
.hover-slide { | |
position: relative; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { app } = require('@azure/functions'); | |
app.http('list-todos', { | |
methods: ['GET', 'POST'], | |
authLevel: 'anonymous', | |
handler: async (request, context) => { | |
context.log(`Http function processed request for url "${request.url}"`); | |
const name = request.query.get('name') || await request.text() || 'world'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Principles of Clean Code for Techstarter Projects | |
0 Consistent Naming Conventions | |
All function names and variables should be written in English. In Python, use snake_case for naming, while in JavaScript, use camelCase. | |
1 Consistent Indentation (2 or 4 spaces) | |
Use 4 spaces for indentation in Python and either 2 or 4 spaces for JavaScript. Pick one and stick with it. | |
2 Use Meaningful Variable and Function Names | |
Choose descriptive names for variables, functions, and classes. For example, use "userAge" instead of "x" or "a". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { randomUUID } from 'crypto' | |
import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; | |
import { PutCommand, DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb"; | |
const client = new DynamoDBClient({}); | |
const docClient = DynamoDBDocumentClient.from(client); | |
const TABLE_NAME = "Techstarter" | |
const addToDB = async (entry) => { | |
const command = new PutCommand({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; | |
import { DynamoDBDocumentClient, ScanCommand } from "@aws-sdk/lib-dynamodb"; | |
const client = new DynamoDBClient({}); | |
const docClient = DynamoDBDocumentClient.from(client); | |
const TABLE_NAME = "Techstarter" | |
const scanOperation = async () => { | |
const command = new ScanCommand({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* style.css */ | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
margin: 0; | |
background-color: #f0f0f0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// script.js | |
document.addEventListener("DOMContentLoaded", function() { | |
var character = document.getElementById("character"); | |
var container = document.getElementById("container"); | |
// Aktuelle Position des Charakters | |
var position = { | |
left: 0, | |
top: 0 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Newsletter Subscribe Form', () => { | |
beforeEach(() => { | |
cy.visit('http://localhost:3000') | |
}) | |
it('allows users to subscribe to the email list', () => { | |
const email = "[email protected]" | |
cy.getByData("email-input").type(email) | |
cy.getByData("submit-button").click() | |
cy.getByData("success-message").contains(email) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Selenium Tests | |
on: | |
push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.App { | |
text-align: center; | |
} | |
.box { | |
position: absolute; | |
cursor: move; | |
color: black; | |
background-color: white; | |
max-width: 215px; |