CUDA Full Setup on Ubuntu

# CUDA Full Setup on Linux

# Check Your Ubuntu Version
On the shell, you can use one of the two following commmands to get system details:
- `lsb_release -a`
- `cat /etc/os-release` (more information will be displayed)

# Traditional Commands
Of course, before all install workflow, it's good practise to perform
```bash
sudo apt update
sudo apt upgrade
```
to be as up to date as possible.

# Check What's Maybe Already Installed
## Check if `CUDA` is installed
`nvcc --version`
## Check CUDA versi

Javascript function is object

/*
  function in javascript is object and we can store what ever inside 
*/

function x()
{
  console.log('im x')
}

x.$version = '1.3.21'
x.callback = () => { console.log('what ever')}


console.log(x.$version);
x.callback();

background css for each line of paragraph

display: inline;
    background-color: rgba(255, 255, 255, 70%);
    background-repeat: repeat-x;
    background-size: 30px 40px;
    background-position: center center;

Video Youtube responsive

<!-- https://2dispari.com/come-rendere-video-youtube-responsive/ -->
<style>
  .videoWrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 25px;
	height: 0;
}
.videoWrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
</style>

<div class="videoWrapper">
  <iframe src="https://www.youtube.com/embed/XXX" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>

要素が存在しなければエラーをthrowする

const hoge = document.querySelector(".hoge");
// hogeが存在しなければエラーをthowする(エラーがthrowされた時点でreturnする)
if (!hoge) {
  // TypeScriptで hoge? を使用時も同様にエラーを投げる(TypeScriptの場合も、要素がなければ次の処理に移行してしまうため)
  throw new Error("hogeが存在しません");
}

font-size 可変

font-size: clamp(1.8rem, 2.3vw, 5rem);

Testing Javascript Files With Node

const { printValues } = require("./helpers");
const myArray = [5, 4, 3, 2, 1];

const readArrayHandler = (arr) => {
  arr.map((element, index) => {
    printValues(index);
    printValues(element);
  });
};

readArrayHandler(myArray);


exports.printValues = (value) => {
  console.log(value);
};

exports.validateValue = (value) => {
  if (value > 0) {
    return true;
  }
  return false;
};

Telephone link above the nav using Font Awesome

<div class="above-the-nav-container">
    <div class="telephone">
        <i class="icon fa-solid fa-phone"><span class="display-none">&nbsp;</span></i><a href="tel:[company_profile:node:field_company_phone:value]" title="Call Us">[company_profile:node:field_company_phone:value]</a>
    </div>
</div>

<style>
/* Above The Nav */
.above-the-nav .above-the-nav-container {
    display: flex;
    align-items: center;
}
@media screen and (min-width: 64em) {
    .aw-header--sticky.aw-header__sticky.st

Watch Live Now Matrix Widget

Show a message when events are active. User refresh NOT necessary. Great for sites orgs with scheduled livestreams (church services, etc.)
{% assign e = Module.FieldValues.CalendarSource.Events[0] %}

<div id="pp-watch-live">
  <a href="{{Module.FieldValues.VideoLink}}" title="Watch Live Now!">{{Module.FieldValues.Text}}</a>
</div>

<script>
  // run if we have an event
  {% if e.Subject.Size > 0 %}

  // define our consts
  const eStartTime = new Date('{{e.StartDateTime}}');
  const eEndTime = new Date('{{e.EndDateTime}}');
  const liveDIV = document.getElementById('pp-watch-live');

  // compare our times
  setInt

Watch Live Now Matrix Widget

Show a message when events are active. User refresh NOT necessary. Great for sites orgs with scheduled livestreams (church services, etc.)
{% assign e = Module.FieldValues.CalendarSource.Events[0] %}

<div id="pp-watch-live">
  <a href="{{Module.FieldValues.VideoLink}}" title="Watch Live Now!">{{Module.FieldValues.Text}}</a>
</div>

<script>
  // run if we have an event
  {% if e.Subject.Size > 0 %}

  // define our consts
  const eStartTime = new Date('{{e.StartDateTime}}');
  const eEndTime = new Date('{{e.EndDateTime}}');
  const liveDIV = document.getElementById('pp-watch-live');

  // compare our times
  setInt

2331. Evaluate Boolean Binary Tree

You are given the root of a full binary tree with the following properties: Leaf nodes have either the value 0 or 1, where 0 represents False and 1 represents True. Non-leaf nodes have either the value 2 or 3, where 2 represents the boolean OR and 3 represents the boolean AND. The evaluation of a node is as follows: If the node is a leaf node, the evaluation is the value of the node, i.e. True or False. Otherwise, evaluate the node's two children and apply the boolean operation of its value with the children's evaluations. Return the boolean result of evaluating the root node. A full binary tree is a binary tree where each node has either 0 or 2 children. A leaf node is a node that has zero children.
/**
 * Definition for a binary tree node.
 * function TreeNode(val, left, right) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.left = (left===undefined ? null : left)
 *     this.right = (right===undefined ? null : right)
 * }
 */
/**
 * @param {TreeNode} root
 * @return {boolean}
 */
var evaluateTree = function(root) {
    // If the node is a leaf (i.e., its value is 0 or 1), return its value.
    if (root.val === 0 || root.val === 1) {
        return root.val;
    }

    // Evalu

Playwright Commands

# What is Playwright

- OS - Windows, MacOS, Linux | Supports Cl runs
- Free & open source Framework for web automation testing | Created by Microsoft
- Applications - Web browser apps | Mobile web apps | API
- Languages - JavaScript, TypeScript, Java, Python, NET (C#)
- Browsers - all modern engines Chromium, WebKit, and Firefox 

# Features of Playwright
- Free | Open Source
- Auto-wait
- Multi-Browser | Multi-Language | Multi-OS
- Built-in assertions | Less Flaky tests
- Easy Setup and Config

loro

inicio{
"host":"5ACC43243C2B007ED860C1C2",
"porta":"110A7BFE4B3C"
}fim

vitest基本

// vitest モジュールから describe、it、expect 関数をインポート
import { describe, it, expect } from "vitest";

describe("マッチャーをいろいろためす", () => {
  // 足し算が成功するか
  it("足し算が成功するか", () => {
    expect(1 + 2).toBe(3);
  });

  // 0未満だった場合はエラーをthrowする
  it("足し算の結果、和が0未満になっているか", () => {
    const add = (a: number, b: number) => {
      const result = a + b;
      if (result < 0) {
        throw new Error("和が0未満です");
      }
      return result;
    };

    expect(() => add(1, -2)).toThrowError("和が0未満です");
  });

  // 

curl-test-container in kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: curl-debugging-deployment
  labels:
    app: curl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: curl
  template:
    metadata:
      labels:
        app: curl
    spec:
      containers:
        - name: curl
          image: curlimages/curl
          args: ['-L', '-v', '-H', 'Content-Type: application/json', 'http://<yourService>/v1/status/']

Settings ScriptableObject

using FA;
using UnityEditor;
using UnityEngine;

[CreateAssetMenu(fileName = "SettingsSO", menuName = "ScriptableObjects/Settings")]
public class Settings : ScriptableObject
{
    public float timeout = 120f;

    public Settings()
    {
        timeout = 120f;
    }
}


#if UNITY_EDITOR
[CustomEditor(typeof(Settings))]
public class SettingsEditor : Editor
{
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        Settings settings = (Setti