Identify media container with extra medias for banner components

select {mediacontainer} from {media} where {mediacontainer} is not null group by {mediacontainer} having count({mediacontainer}) > 4

Airtable - Code to concatenate First and Surname

Saved from https://chat.openai.com/c/f5df1155-d81c-41ba-b6dc-7fa748667568
{First Name} & " " & {Surname}

JWT Token Authentication in ASP.NET Core API Project

Project: EmailCommonService.API
Nuget Package : Microsoft.AspNetCore.Authentication.JwtBearer (6.0.27)

//appsetting.json
  "Jwt": {
    "Key": "ASDDSefI99oSbcayHOH3VdpF86vnXXXX", //Generate random String from https://www.random.org/strings
    "Issuer": "https://localhost:7197/", //Project Property-> Debug-> IIS-->App URL (you can local host url as well)
    "Audience": "https://localhost:7197/"
  }
  
  //Program.cs
  var builder = WebApplication.CreateBuilder(args);
builder.Services.AddContro

custom hook

import React from 'react';
import { AnswersState, addAnswers, selectAnswers } from '../redux/answersSlice';
import { useAppDispatch, useAppSelector } from '../redux/hooks';
import {
    QuoteOptions,
    addCaller,
    addCallerEvent,
    getQuote as reduxGetQuote,
    setQuoteAnswers,
} from '../redux/quoteSlice';
import { netbankTheme } from '../utils/constant';
import { dateReformatyyyyMMdd } from '../utils/valueUtil';
import { GetQuoteResponse } from '../types/quote/GetQuoteRespo

wsl2-wiki

# WSL

## Install and Run jetbrains-tool

`sudo apt install libgtk-3-dev libfuse2 libxi6 libxrender1 libxtst6 mesa-utils libfontconfig libgtk-3-bin`



## Other- Unsure if needed

* libXrender.so.1: cannot open shared object file: No such file or directory

`sudo apt install libxrender1 libxtst6 libxi6`

* Failed to connect to bus: No such file or directory: org.freedesktop.dbus.exceptions.DBusException: Failed to connect to bus: No such file or directory

https://x410.dev/cookbo

Return Type

How do we know that the return type was what it is?
func GetEventByID(id int64) (*Event, error) {
	query := `SELECT * FROM events WHERE id = ?`
	row := db.DB.QueryRow(query, id)

	var event Event
	err := row.Scan(&event.ID, &event.Name, &event.Description, &event.Location, &event.DateTime, &event.UserID)
	if err != nil {
		return nil, err
	}
	return &event, nil
}

global variables

package db

import (
	"database/sql"

	_ "github.com/mattn/go-sqlite3"
)

var DB *sql.DB

func InitDB() {
	var err error
	DB, err = sql.Open("sqlite3", "api.db")
	if err != nil {
		panic("Could not connect to the database.")
	}

	DB.SetMaxOpenConns(10)
	DB.SetMaxIdleConns(5)

	createTables()
}

func createTables() {
	createEventTable := `
        CREATE TABLE IF NOT EXISTS events (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            name TEXT NOT NULL,
            description TEXT NOT 

Create dataframe from .csv ~ retrieve historic data in jupyterlab

retrieve historic data to dataframe in Jupyter notebook
df = pd.read_csv("BTCUSD_Candlestick_1_D_ASK_08.05.2017-16.10.2021.csv")

pandas Dataframe to .csv in jupyter notebook

grab data from yfinance and store permanently for backtesting
dataF.to_csv('HereIAm.csv')

docker wp

version: '3.1'

services:
  wordpress:
    image: wordpress:latest
    ports:
      - 8000:80  # Cambia el puerto local si 8000 ya está en uso
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
    volumes:
      - ./wp_penly:/var/www/html  # Cambia el nombre del volumen
    restart: always

  db:
    image: mysql:5.7
    volumes:
      - ./db_wp_penly:/var/lib/mysql  # Cambi

Open Lock

/**
 * @param {string[]} deadends
 * @param {string} target
 * @return {number}
 */
var openLock = function(deadends, target) {
    // Create a set of deadends for quick lookup
    const deads = new Set(deadends);

    // Initialize the queue with the starting point '0000'
    const queue = ['0000'];

    // Keep track of visited states to avoid cycles
    const visited = new Set(['0000']);

    // Initialize the number of turns
    let turns = 0;

    // Helper function to get all the neighbors

Sales Rep + Broker Sales Query

SELECT rep.RepID, rep.RepName, broker.BrokerID, broker.BrokerName, or_prid, pr_codenum AS PartNumber, bi_id AS BillToID, bi_name AS BillToName, RTRIM(to_billpo) AS CustomerPO, sh_id AS ShipToID, sh_name AS ShipToName, RTRIM(sh_state) AS StateNameShip, RTRIM(bi_state) AS StateNameBill, pr_retail AS RetailPart, pr_descrip AS Description, pr_user1 AS Flavor, p5_name AS Brand, p2_name AS BagClass, p1_name AS BagProtein, to_shipped AS ShipDate, RTRIM(or_qship) AS QuantityShipped, SUM(or_exten) as Ext

2. Extensiones

# Extensiones
```batch
aaron-bond.better-comments
blackboxapp.blackbox
bradlc.vscode-tailwindcss
dart-code.dart-code
dart-code.flutter
dbaeumer.vscode-eslint
digitalbrainstem.javascript-ejs-support
equinusocio.vsc-material-theme
erikphansen.vscode-toggle-column-selection
esbenp.prettier-vscode
exodiusstudios.comment-anchors
file-icons.file-icons
formulahendry.auto-close-tag
gitbook.gitbook-vscode
golang.go
hex-ci.stylelint-plus
mhutchie.git-graph
ms-azuretools.vscode-docker
ms-python.debugpy
ms-

sed search and replace

sed -i 's\FOO\BAR\g' input.txt

MimeMessage

 public ActionResult Index(CreateMailDto createMailDto)
 {
     MimeMessage mimeMessage = new MimeMessage();
     MailboxAddress mailboxAddress = new MailboxAddress("SignalR Rezarvasyon","mesutdemirci.ts@gmail.com");
     mimeMessage.From.Add(mailboxAddress);

     MailboxAddress mailboxAddressTo = new MailboxAddress("User", createMailDto.ReceiverMail);
     mimeMessage.To.Add(mailboxAddressTo);

     var bodyBuilder = new BodyBuilder();
     bodyBuilder.HtmlBody = createMailDto.Body;