package com.example.backend;
import java.time.LocalDateTime;
import java.util.Objects;
This file contains 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
############################################################################################ | |
# 1. Create the operational table (users) and the cache table (users_session_cache). | |
# Make sure that the cache table uses MariaDB's MEMORY storage engine. | |
############################################################################################ | |
CREATE OR REPLACE TABLE users( | |
id SERIAL PRIMARY KEY, | |
name VARCHAR(50) NOT NULL UNIQUE, | |
session_id VARCHAR(50) | |
) ENGINE=InnoDB; |
This file contains 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
version: '3.8' | |
services: | |
mariadb-server: | |
image: mariadb:latest | |
hostname: mariadb-server | |
environment: | |
MARIADB_ROOT_PASSWORD: RootPassword123! | |
EDITOR: mcedit | |
command: > |
This file contains 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 random | |
import os | |
import subprocess | |
from datetime import datetime, timedelta | |
# Function to generate a random date within a given range | |
def random_date(start, end): | |
return start + timedelta(days=random.randint(0, int((end - start).days))) | |
# Function to execute a given SQL command using MariaDB |
This file contains 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
# Set up the MariaDB repository for version 11.1 to ensure the system uses the correct version and receives updates from the official source. | |
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=11.1 | |
# Install the necessary MariaDB packages along with ColumnStore for fast and scalable analytics and CMAPI for managing ColumnStore nodes. | |
sudo dnf -y install MariaDB MariaDB-columnstore-engine MariaDB-columnstore-cmapi | |
# Automatically start MariaDB and its ColumnStore storage engine when the system boots, ensuring database availability after restarts. | |
sudo systemctl enable mariadb | |
sudo systemctl enable mariadb-columnstore-cmapi |
This file contains 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
version: "3.9" | |
services: | |
mariadb-community: | |
image: alejandrodu/mariadb | |
environment: | |
- MARIADB_CREATE_DATABASE=demo | |
- MARIADB_CREATE_USER=user:Password123! | |
- MARIADB_CREATE_MAXSCALE_USER=maxscale_user:MaxScalePassword123! | |
maxscale: |
This file contains 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
#!/bin/bash | |
# find the mount point with sudo fdisk -l | |
mount /dev/mmcblk0p1 /media/sdcard/ | |
rm /media/sdcard/boot/armbian_first_run.txt.template | |
touch /media/sdcard/boot/armbian_first_run.txt | |
echo "FR_general_delete_this_file_after_completion=1" >> /media/sdcard/boot/armbian_first_run.txt | |
echo "FR_net_change_defaults=1" >> /media/sdcard/boot/armbian_first_run.txt |
This file contains 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 org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.Transaction; | |
import org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator; | |
import org.junit.jupiter.api.Test; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.context.SpringBootTest; | |
@SpringBootTest | |
class ApplicationTests { |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> |
ComboBox<Object> comboBox = new ComboBox<>();
comboBox.addClassName("red-combo-box");
<dom-module id="custom-combo-box-styles" theme-for="vaadin-combo-box">
<template>
<style>
:host(.red-combo-box) [part="text-field"] {
NewerOlder