Chat Popup

const chatCopyHTML = `<div class="chat-copy">
  <p>
    Hi there, when an unexpected hurt shatters your life, it can be easy to
    question God
  </p>
  <p>
    That's why we want you to have Lysa TerKeurst's bestselling devotional
    <em>Seeing Beautiful Again.</em>
  </p>
  <p>
    These short, daily readings will enable you to process your pain and see
    your situation through the eyes of Jesus
  </p>
  <p>Get your copy free with your gift to keep FamilyLife on-air and online.</p>
  <div 

Computers with less than 1 GB on system drive

Import-Module ($Env:SMS_ADMIN_UI_PATH.Substring(0, $Env:SMS_ADMIN_UI_PATH.Length - 5) + '\ConfigurationManager.psd1')
$SiteCode = (Get-WmiObject -Namespace "root\sms" -Class "__NAMESPACE" | Select-Object -ExpandProperty Name).Substring(5, 3)
if ((Get-PSDrive -Name $SiteCode) -isnot [Microsoft.ConfigurationManagement.PowerShell.Provider.CMDriveInfo]) {
    New-PSDrive -Name $SiteCode -PSProvider "AdminUI.PS.Provider\CMSite" -Root ([System.Net.Dns]::GetHostByName(($env:computerName))).Hostname 

1552. Magnetic Force Between Two Balls

In the universe Earth C-137, Rick discovered a special form of magnetic force between two balls if they are put in his new invented basket. Rick has n empty baskets, the ith basket is at position[i], Morty has m balls and needs to distribute the balls into the baskets such that the minimum magnetic force between any two balls is maximum. Rick stated that magnetic force between two different balls at positions x and y is |x - y|. Given the integer array position and the integer m. Return the required force.
/**
 * @param {number[]} position
 * @param {number} m
 * @return {number}
 */
var maxDistance = function(position, m) {
    // Sort the positions of the baskets
    position.sort((a, b) => a - b);

    // Define the low (minimum distance) and high (maximum distance)
    let low = 0, high = position[position.length - 1] - position[0];

    // Binary search for the maximum minimum distance
    while (low < high) {
        let mid = Math.floor((low + high + 1) / 2);

        // Function to check i

Register Windows Update Service

#https://docs.microsoft.com/en-us/windows/desktop/api/wuapicommon/ne-wuapicommon-tagserverselection
enum ServerSelection {
    ssDefault = 0
    ssManagedServer = 1
    ssWindowsUpdate = 2
    ssOthers = 3
}

enum AddServiceFlag {
    asfAllowPendingRegistration = 1
    asfAllowOnlineRegistration = 2
    asfRegisterServiceWithAU = 4
}

# Service	ServiceId
# Unspecified / Default	Windows Update, Microsoft Update, or WSUS
# 00000000-0000-0000-0000-000000000000
# Windows Update	948

Get-MyWindowsVersion

function Get-MyWindowsVersion {
    [CmdletBinding()]
    Param
    (
        $ComputerName = $env:COMPUTERNAME
    )

    $Table = New-Object System.Data.DataTable
    $Table.Columns.AddRange(@("ComputerName", "Windows Edition", "Version", "OS Build"))
    $ProductName = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductName).ProductName
    Try {
        $Version = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ReleaseI

Get-DhcpServerv4ScopeData

function Get-DhcpServerv4ScopeData {
    [CmdletBinding()]
    param (
        [System.Net.IPAddress]$ScopeId
        , [System.Net.IPAddress]$SubnetMask
    )
    $DhcpServers = Get-DhcpServerInDC | Where-Object { $_.DnsName -match "$([regex]::Escape([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name))$" }
    foreach ($DhcpServer In $DhcpServers) {
        try {
            Get-DhcpServerv4Scope -ComputerName $DhcpServer.DnsName | Sort-Object -Property ScopeId 

Reset-ComputerDeployment

function Reset-ComputerDeployment {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [string]
        $ComputerName
    )

    begin {
        function Remove-ComputerDeployment_CMDevice {
            [CmdletBinding()]
            param(
                [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
       

unSkinned copy url

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script
  src="https://code.jquery.com/jquery-1.12.4.js"
  integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU="
  crossorigin="anonymous"></script>
    <style>
        .feedback { 

            display: none;
        }
        
    </style>
</head>
<body>
    <p id="myText">Hello World</p>
<button class="btn" oncl

Variables

//int is a variable for storing interger (whole) numbers. An interger usually requires 4 bytes of memory space
int :intergers
int year = 1993;
int age = 33;

//The double variable type sotres floating point (decimal) numbers. These variables usually require 8 bytes of memory space
double :floating-point numbers
double price = 9.99;
double pi = 3.14159;

//char type variables store individual characters, wrapped in single quotes ' . Characters usually require 1 byte of memory space
char :individu

Input

//Get user input into variable
std::cin >> variableName

モデルと実装の関連を考える

# 親子関係

モデル対モデルの関係が親子関係である場合。  

## 注文>注文明細>商品

「注文明細」は「注文」の固有のデータであるため注文の画面の下に注文明細関連の画面を作成する必要がある。  
「商品」は「注文」や「注文明細」が固有に保持する情報で無いため、個別に登録する画面を作成することになる。  

## 注文>会員

「会員」は「注文」が固有に保持する情報で無いため、個別に登録する画面を作成することになる。  

## 配送>荷物

「荷物」は1つの「配送」にのみ紐づく固有の情報とも思えるが、実際には配送の失敗などで複数の配送に対してアタッチされる可能性がある。  
また、「荷物」は営業所に届いた時点で登録する必要があるため、個別に登録する画面を作成することになる。  

## 配送>車両、ドライバー

「車両」も「ドライバー」も、「配送」情報が出来てからアタッチされる情報であるため、個別に登録する画面を作成することになる。  

## 社員(上司)>社員

同じ「社員」同士が親子関係を持つため、特殊な作りが必要となる。 

Output

//Output string
std::cout >> "string";

//Output variable
std::cout << score << "\n";

Compile and Run

//compile in cmd line as a.out
g++ fileName.cpp

//compile in cmd line and set file name
g++ file.cpp -o fileName

//run in cmd line
./a.out

CPP project setup

#include <iostream>

int main(){

}

Test Snippet

Saved from https://chatgpt.com/c/c5c4928b-23b6-4775-a9ee-3ac4071ac790
<?php

function wp_admin_move_custom_nav() {
    ?>
    <script type="text/javascript">
        jQuery(document).ready(function($) {
            var navLinks = $('#custom-nav-links');
            navLinks.show();
            $('.postbox-container #submitdiv').before(navLinks);

            $('.save-and-nav').on('click', function(e) {
                e.preventDefault();
                var button = $(this);
                var postId = button.data('postid');
                var direction = button

Toast Message - React Toastify

Save this into the utils/index.ts file
import { toast } from "react-toastify";

type ToastType = "success" | "error" | "info" | "warning";
type ToastDuration = 1000 | 1500 | 2000 | 2500 | 3000 | 3500 | 5000;

export const showToast = (
  type: ToastType,
  message: string,
  duration?: ToastDuration
) => {
  toast[type](message, {
    position: "top-right",
    autoClose: duration || 2500,
    hideProgressBar: false,
    closeOnClick: true,
    pauseOnHover: true,
    draggable: true,
  });
};