docker container stop postgres
docker container rm postgres
docker volume create postgres-volume
docker run --name postgres `
-e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password `
-p 5432:5432 `
-v postgres-volume:/var/lib/postgresql/data `
Electron lets you detect the system-level change events via the powerMonitor
module.
The snippet below shows how to receive screen lock/unlock and sleep/awake events of your screen.
const {app, BrowserWindow, powerMonitor} = require('electron')
const path = require('node:path')
SaaS services are a typical example of multi-tenant applications. With multi-tenancy, it's possible to build scalable and cost-effective services by sharing resources accross several customers (tenants). The multi-tenant architecture assumes data isolation and fine-grained security controls to ensure that one tenant's data stays private or only accessible by other tenants under certain conditions.
Let's take an example of a Shopify-like company where merchants can easily launch their own eCommerce website and start selling products/services online.

"Movies Recommendations"
client.sql(
"SELECT id, title, overview, vote_average " +
"FROM movie WHERE vote_average >= 7 " +
"AND genres @> \'[{\"name\": \"Science Fiction\"}]\'" +
"AND 1 - (overview_vector <=> :prompt_vector::vector) >= 0.7 " +
"ORDER BY overview_vector <=> :prompt_vector::vector LIMIT 3")
.param("prompt_vector", promptEmbedding.toString())
Create a custom Docker network:
docker network create custom-network
Start YugabyteDB:
rm -r ~/yb_docker_data
mkdir ~/yb_docker_data
orders = jdbcTemplate.query(
"SELECT * FROM pizza_order WHERE id = ? and location = ?::store_location",
(prepStmt) -> {
prepStmt.setInt(1, id);
prepStmt.setString(2, location);
},
new OrderRowMapper());
- Stop all the K3s processes:
sudo kill $(ps aux | grep 'k3s' | awk '{print $2}')
- Create the
k3s_uninstall.sh
script with the following content and execute it:#!/bin/sh set -x systemctl stop k3s
systemctl disable k3s
StringBuilder queryString = "insert into test (id, f1) values ";
// add placeholder for values
for (int counter = 0; counter <= 100; counter += 1)
queryString.append("(?, ?),");
// replace the trailing ',' with a ';'
queryString.replace(queryString.length() - 1, queryString.length(), ";");
/******************************************************************************* | |
Chinook Database - Version 1.4 | |
Script: Chinook_PostgreSql.sql | |
Description: Creates and populates the Chinook database. | |
DB Server: PostgreSql | |
Author: Luis Rocha | |
License: http://www.codeplex.com/ChinookDatabase/license | |
********************************************************************************/ |