Snippets Collections
function serve_404_for_specific_post_types($template) {
    if (is_singular(array('client', 'testimonial'))) { /* here is add posttype slug */ 
        global $wp_query;
        $wp_query->set_404();
        status_header(404);
        // You can either load your theme's 404 template or specify a custom 404 template
        return get_404_template();
    }
    return $template;
}
add_filter('template_include', 'serve_404_for_specific_post_types');
한글 포함시키는 범위
32-126,44032-55203,12593-12643,8200-9900
.swiper-slide:nth-child(even) figure {
    display: flex;
    flex-direction: column-reverse;
}
.elementor-9707 .elementor-element.elementor-element-4690301 .elementor-image-carousel-caption{
        border: 1px solid #000000;
        padding: 18px;
}
.slider-img img{
    margin-top: 20px;
}
- examples (root)
  - category
    - project
      - example
  - category
    - project
      - example
      - example
      - example
    - project
      - example
      - example
  - category
    - project
      - example
    - project
      - example
      - example
{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "frameworksBackend": {
      "region": "us-central1"
    }
  }
}
{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "frameworksBackend": {
      "region": "us-central1"
    }
  }
}
{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "frameworksBackend": {
      "region": "us-central1"
    }
  }
}
const taskForm = document.querySelector("#task-form");
const taskInput = document.querySelector("#task");
const collection = document.querySelector(".collection");
const clearTaskBtn = document.querySelector(".clear-tasks");

taskForm.addEventListener("submit", function (event) {
  event.preventDefault();

  const inputValue = taskInput.value;
  //agar ye input value mujood na ho

  if (!inputValue) {
    alert("please fill the input field");
    return;
  }

  /*
create this type of element in dom

<li class="collection-item">
                  List Item
                  <a href="#" class="delete-item secondary-content">
                    <i class="fa fa-remove"></i>
                  </a>
                </li>
  */

  const liElement = document.createElement("li");
  liElement.className = "collection-item";
  liElement.innerHTML = `${inputValue}
  <a href="#" class="delete-item secondary-content">
    <i class="fa fa-remove"></i>
  </a>`;

  collection.appendChild(liElement);

  taskInput.value = "";

  //   console.log(liElement);

  saveAllTasksOnLocalStorage();
});

/*

Flexibility
appendChild: Only a single DOM node.
append: Multiple DOM nodes and text strings.


Return Value:
appendChild returns the appended node.
append does not return anything.

*/

clearTaskBtn.addEventListener("click", function (event) {
  event.preventDefault();

  if (confirm("Are you sure ?")) {
    collection.innerHTML = "";
    localStorage.removeItem("tasks");
  }
});

collection.addEventListener("click", function (event) {
  event.preventDefault();
  const currentElement = event.target;

  if (currentElement.className === "fa fa-remove") {
    // if (currentElement.classList.includes("fa fa-remove")) {
    if (confirm("Are you sure ?")) {
      currentElement.parentElement.parentElement.remove();
      saveAllTasksOnLocalStorage();
    }
  }
});

//localstorage vs session storage

// session storage will expire on closing the chrome tab

// sessionStorage.setItem("something",true);
// sessionStorage.getItem("something");

//localstorage

// session storage will not expire on closing the chrome tab

// localStorage.setItem("something",true);
// localStorage.getItem("something");

//we cannot save object/array on localstorage

// so there is a way to save it

// JSON.stringify() (during the localStorage.setItem)
// JSON.parse() (during the localStorage.getItem)

// localStorage.setItem(
//   "tasks",
//   JSON.stringify(["taskOne", "TaskTwo", "TaskThree"])
// );

// const getTasks = JSON.parse(localStorage.getItem("tasks"));

// console.log(getTasks, "getTasks");

function saveAllTasksOnLocalStorage() {
  const selectAllCollectionItems =
    document.querySelectorAll(".collection-item");
  // console.log(selectAllCollectionItems, "selectAllCollectionItems");

  let tasks = [];
  selectAllCollectionItems.forEach(function (singleCollectionItem) {
    tasks.push(singleCollectionItem.innerText);
  });

  localStorage.setItem("tasks", JSON.stringify(tasks));
}

document.addEventListener("DOMContentLoaded", function (event) {
  //after reading the all html from dom
  //jab apki html load hojaegi ye event ka function chalega

  const getTasks = JSON.parse(localStorage.getItem("tasks"));

  // console.log(getTasks, "getTasks");

  getTasks.forEach(function (singleTask) {
    // console.log(singleTask, "singleTask");

    const liElement = document.createElement("li");
    liElement.className = "collection-item";
    liElement.innerHTML = `${singleTask}
  <a href="#" class="delete-item secondary-content">
    <i class="fa fa-remove"></i>
  </a>`;

    collection.appendChild(liElement);
  });
});
echo "# hello" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/shmulisarmy/hello.git
git push -u origin main
<!DOCTYPE+html>
<html+lang="en">
<head>
++++<meta+charset="UTF-8">
++++<meta+http-equiv="X-UA-Compatible"+content="IE=edge">
++++<meta+name="viewport"+content="width=device-width,+initial-scale=1.0">
++++<title>How+To+Create+a+Search+Bar+in+HTML</title>
++++<link+rel="preconnect"+href="https://fonts.googleapis.com">
++++<link+rel="preconnect"+href="https://fonts.gstatic.com"+crossorigin>
++++<link+href="https://fonts.googleapis.com/css2?family=Poppins:wght@200&display=swap"+rel="stylesheet">
++++<link+rel="stylesheet"+type="text/css"+href="style.css">
</head>
<body>
++++
</body>
</html>
Get-ChildItem -Path C:\ -Recurse -File -ErrorAction SilentlyContinue |
    Where-Object { $_.Length -gt 100MB } |
    Sort-Object Length -Descending |
    Select-Object @{Name='FullName'; Expression={$_.FullName}},
                  @{Name='Size'; Expression={
                      if ($_.Length -ge 1GB) {
                          [math]::Round($_.Length / 1GB, 2) + ' GB'
                      } elseif ($_.Length -ge 1MB) {
                          [math]::Round($_.Length / 1MB, 2) + ' MB'
                      } else {
                          [math]::Round($_.Length / 1KB, 2) + ' KB'
                      }
                  }} |
    Format-Table -AutoSize


FullName                                           Size 
--------                                           ----------
C:\some\path\to\largefile1.ext                      123.45 MB
C:\another\path\to\largefile2.ext                   110.98 MB
Get-ChildItem -Path C:\ -Recurse -File -ErrorAction SilentlyContinue |
    Where-Object { $_.Length -gt 100MB } |
    Sort-Object Length -Descending |
    Select-Object @{Name='FullName'; Expression={$_.FullName}},
                  @{Name='Size (MB)'; Expression={[math]::Round($_.Length / 1MB, 2)}} |
    Format-Table -AutoSize

FullName                                           Size (MB)
--------                                           ----------
C:\some\path\to\largefile1.ext                      123.45
C:\another\path\to\largefile2.ext                   110.98
const fs = require('fs');
const path = require('path');

function getFolderSize(folder) {
  let totalSize = 0;

  function calculateFolderSize(folderPath) {
    const files = fs.readdirSync(folderPath);
    files.forEach(file => {
      const filePath = path.join(folderPath, file);
      const stats = fs.statSync(filePath);
      if (stats.isDirectory()) {
        calculateFolderSize(filePath);
      } else {
        totalSize += stats.size;
      }
    });
  }

  calculateFolderSize(folder);
  return totalSize;
}

const folderPath = path.resolve(__dirname, 'node_modules');
const folderSize = getFolderSize(folderPath);
console.log(`Size of node_modules: ${(folderSize / 1024 / 1024).toFixed(2)} MB`);
Get-ChildItem -Path C:\ -Recurse -File -ErrorAction SilentlyContinue | Where-Object { $_.Length -gt 100MB } | Sort-Object Length -Descending | Select-Object FullName, Length | Format-Table -AutoSize
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
import csv

# File path to the CSV file
file_path = r'C:\Users\User\Desktop\DBL Data Challenge\archive\Tweets.csv'

# Initialize sentiment analyzer
analyzer = SentimentIntensityAnalyzer()

# Function to analyze sentiment
def analyze_sentiment(text):
    sentiment = analyzer.polarity_scores(text)
    compound_score = sentiment['compound']
    if compound_score >= 0.05:
        return 4  # Positive
    elif compound_score <= 0:
        return 0  # Negative
    else:
        return 2  # Neutral

# Mapping from sentiment text to numeric labels
sentiment_mapping = {
    'positive': 4,
    'negative': 0,
    'neutral': 2
}

# Lists to store labels and texts
labels = []
texts = []

# Open the CSV file and read its contents
encodings = ['utf-8', 'latin1', 'iso-8859-1']
for encoding in encodings:
    try:
        with open(file_path, 'r', encoding=encoding) as file:
            reader = csv.DictReader(file)
            # Read each line in the file
            for row in reader:
                # Extract label and text
                label_text = row['airline_sentiment'].strip().lower()
                text = row['text'].strip('"')
                # Convert label text to numeric value
                if label_text in sentiment_mapping:
                    labels.append(sentiment_mapping[label_text])
                    texts.append(text)
        break
    except UnicodeDecodeError:
        print(f"Failed to read with encoding {encoding}. Trying next encoding.")
    except Exception as e:
        print(f"An error occurred: {e}")
        break

# Apply sentiment analysis to each text in the list
predicted_sentiments = [analyze_sentiment(text) for text in texts]

# Evaluate performance
accuracy = accuracy_score(labels, predicted_sentiments)
precision = precision_score(labels, predicted_sentiments, average='weighted')
recall = recall_score(labels, predicted_sentiments, average='weighted')
f1 = f1_score(labels, predicted_sentiments, average='weighted')

print("Accuracy:", accuracy)
print("Precision:", precision)
print("Recall:", recall)
print("F1 Score:", f1)
Attracting attention in the crowded NFT space requires creativity and innovation. Our marketing services are designed to help you build buzz around your digital collectibles through compelling storytelling, interactive experiences, and strategic distribution channels. Let us help you captivate audiences and drive demand for your NFTs with our proven NFT Marketing Services.
import csv
import random
import math
 
def loadcsv(filename):
	lines = csv.reader(open(filename, "r"));
	dataset = list(lines)
	for i in range(len(dataset)):
       #converting strings into numbers for processing
		dataset[i] = [float(x) for x in dataset[i]]
        
	return dataset
 
def splitdataset(dataset, splitratio):
    #67% training size
	trainsize = int(len(dataset) * splitratio);
	trainset = []
	copy = list(dataset);    
	while len(trainset) < trainsize:
#generate indices for the dataset list randomly to pick ele for training data
		index = random.randrange(len(copy));       
		trainset.append(copy.pop(index))    
	return [trainset, copy]
 
def separatebyclass(dataset):
	separated = {} #dictionary of classes 1 and 0 
#creates a dictionary of classes 1 and 0 where the values are 
#the instances belonging to each class
	for i in range(len(dataset)):
		vector = dataset[i]
		if (vector[-1] not in separated):
			separated[vector[-1]] = []
		separated[vector[-1]].append(vector)
	return separated
 
def mean(numbers):
	return sum(numbers)/float(len(numbers))
 
def stdev(numbers):
	avg = mean(numbers)
	variance = sum([pow(x-avg,2) for x in numbers])/float(len(numbers)-1)
	return math.sqrt(variance)
 
def summarize(dataset): #creates a dictionary of classes
	summaries = [(mean(attribute), stdev(attribute)) for attribute in zip(*dataset)];
	del summaries[-1] #excluding labels +ve or -ve
	return summaries
 
def summarizebyclass(dataset):
	separated = separatebyclass(dataset); 
    #print(separated)
	summaries = {}
	for classvalue, instances in separated.items(): 
#for key,value in dic.items()
#summaries is a dic of tuples(mean,std) for each class value        
		summaries[classvalue] = summarize(instances) #summarize is used to cal to mean and std
	return summaries
 
def calculateprobability(x, mean, stdev):
	exponent = math.exp(-(math.pow(x-mean,2)/(2*math.pow(stdev,2))))
	return (1 / (math.sqrt(2*math.pi) * stdev)) * exponent
 
def calculateclassprobabilities(summaries, inputvector):
	probabilities = {} # probabilities contains the all prob of all class of test data
	for classvalue, classsummaries in summaries.items():#class and attribute information as mean and sd
		probabilities[classvalue] = 1
		for i in range(len(classsummaries)):
			mean, stdev = classsummaries[i] #take mean and sd of every attribute for class 0 and 1 seperaely
			x = inputvector[i] #testvector's first attribute
			probabilities[classvalue] *= calculateprobability(x, mean, stdev);#use normal dist
	return probabilities
			
def predict(summaries, inputvector): #training and test data is passed
	probabilities = calculateclassprobabilities(summaries, inputvector)
	bestLabel, bestProb = None, -1
	for classvalue, probability in probabilities.items():#assigns that class which has he highest prob
		if bestLabel is None or probability > bestProb:
			bestProb = probability
			bestLabel = classvalue
	return bestLabel
 
def getpredictions(summaries, testset):
	predictions = []
	for i in range(len(testset)):
		result = predict(summaries, testset[i])
		predictions.append(result)
	return predictions
 
def getaccuracy(testset, predictions):
	correct = 0
	for i in range(len(testset)):
		if testset[i][-1] == predictions[i]:
			correct += 1
	return (correct/float(len(testset))) * 100.0
 
def main():
	filename = 'naivedata.csv'
	splitratio = 0.67
	dataset = loadcsv(filename);
     
	trainingset, testset = splitdataset(dataset, splitratio)
	print('Split {0} rows into train={1} and test={2} rows'.format(len(dataset), len(trainingset), len(testset)))
	# prepare model
	summaries = summarizebyclass(trainingset);    
	#print(summaries)
    # test model
	predictions = getpredictions(summaries, testset) #find the predictions of test data with the training data
	accuracy = getaccuracy(testset, predictions)
	print('Accuracy of the classifier is : {0}%'.format(accuracy))
 
main()
data=pandas.read_csv('filename.tsv',sep='\t')
function search_field_placeholder_text_update(){
	return 'Custom Search Text';
}
add_filter( 'sptp_search_placeholder_text', 'search_field_placeholder_text_update' );
import { useRef } from 'react';
import { useQuery } from 'react-query';
import axios from 'axios';

const fetchData = async (param1, param2) => {
  const { data } = await axios.get(`/api/data?param1=${param1}&param2=${param2}`);
  return data;
};

export const useDataQuery = (initialParam1, initialParam2) => {
  const param1Ref = useRef(initialParam1);
  const param2Ref = useRef(initialParam2);

  const { data, error, isLoading, refetch } = useQuery(
    ['dataKey', param1Ref.current, param2Ref.current],
    () => fetchData(param1Ref.current, param2Ref.current),
    {
      enabled: false, // Başlangıçta otomatik olarak fetch etmesini engeller
    }
  );

  const updateParamsAndRefetch = (newParam1, newParam2) => {
    param1Ref.current = newParam1;
    param2Ref.current = newParam2;
    refetch();
  };

  return { data, error, isLoading, updateParamsAndRefetch };
};
#include <bits/stdc++.h>
using namespace std;
 int main()
 {
     int n;
     cout<<"Enter size of array: ";
     cin>>n;
     int arr[n];
     cout<<"Enter the elements in array: ";
     for(int i=0;i<n;i++)
     {
         cin>>arr[i];
     }
     cout<<"Selection sort"<<endl;
     for(int i=0;i<n-1;i++)
     {
         int min=i;
         for(int j=i+1;j<n;j++)
         {
          if(arr[j] < arr[min])
          {
              swap(arr[i],arr[j]);
          }
         }
     }
     cout<<"Sorted array: ";
     for(int i=0;i<n;i++)
     {
         cout<<arr[i]<<" ";
     }
     
 }
 
//Browser Right click disable 
  useEffect(() => {
    const handleContextMenu = (event) => {
      event.preventDefault();
    };

    const handleKeyDown = (event) => {
      // F12 key
      if (event.keyCode === 123) {
        event.preventDefault();
      }
      // Ctrl+Shift+I (Chrome DevTools)
      if (event.ctrlKey && event.shiftKey && event.keyCode === 73) {
        event.preventDefault();
      }
      // Ctrl+Shift+J (Chrome DevTools)
      if (event.ctrlKey && event.shiftKey && event.keyCode === 74) {
        event.preventDefault();
      }
      // Ctrl+U (View Source)
      if (event.ctrlKey && event.keyCode === 85) {
        event.preventDefault();
      }
    };

    document.addEventListener("contextmenu", handleContextMenu);
    document.addEventListener("keydown", handleKeyDown);

    return () => {
      document.removeEventListener("contextmenu", handleContextMenu);
      document.removeEventListener("keydown", handleKeyDown);
    };
  }, []);
//-------------------------------------------------------------
{
  "manifest_version": 3,
  "name": "Hello Extensions",
  "description": "Base Level Extension",
  "version": "1.0",
  "action": {
    "default_popup": "hello.html",
    "default_icon": "hello_extensions.png"
  }
}
KMeans(n_clusters=2)
OpenLogic
Get free technical support until June 30, 2024
Amanda Lewis
Brenna Washington
Claire Peters
Daniella Villalba, PhD
Dave Farley
Dave Stanke
Dustin Smith
Eric Maxwell
Frank Xu
Gene Kim
James Brookbank
Jeffrey P. Winer, PhD
Jessie Frazelle
Jez Humble
John Speed Mayers
Kevin Storer, PhD
Lolly Chessie
Nathen Harvey
Nicole Forsgren, PhD
Steve McGhee
Todd Kulesza
Ancoris is a leading Google Cloud Services Provider, headquartered in the UK, which helps customers innovate and transform through the use of Google Cloud. We have extensive experience in Google Cloud technologies helping enterprises integrate AI-native solutions into their business through expertise in Data & AI, Application and Infrastructure Modernisation, Workspace and Maps, and were recognised as a Rising Star for Data, Analytics, and Machine Learning in 2022 ISG Provider™ Lens for Google Cloud Partner Ecosystem.
404
Not Found
The resource requested could not be found on this server!
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
  name: example-argocd
  labels:
    example: basic
spec: {}
Install on Kubernetes
1.	Install Operator Lifecycle Manager (OLM), a tool to help manage the Operators running on your cluster.
$ curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.28.0/install.sh | bash -s v0.28.0
Copy to Clipboard
2.	Install the operator by running the following command:What happens when I execute this command?
$ kubectl create -f https://operatorhub.io/install/argocd-operator.yaml
Copy to Clipboard
This Operator will be installed in the "operators" namespace and will be usable from all namespaces in the cluster.
3.	After install, watch your operator come up using next command.
$ kubectl get csv -n operators
Configure a Sonar Server locally


apt install unzip
adduser sonarqube
wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.4.0.54424.zip
unzip *
chmod -R 755 /home/sonarqube/sonarqube-9.4.0.54424
chown -R sonarqube:sonarqube /home/sonarqube/sonarqube-9.4.0.54424
cd sonarqube-9.4.0.54424/bin/linux-x86-64/
./sonar.sh start
Install Jenkins.
Pre-Requisites:

Java (JDK)
Run the below commands to install Java and Jenkins
Install Java

sudo apt update
sudo apt install openjdk-11-jre
Verify Java is Installed

java -version
Now, you can proceed with installing Jenkins

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
**Note: ** By default, Jenkins will not be accessible to the external world due to the inbound traffic restriction by AWS. Open port 8080 in the inbound traffic rules as show below.

EC2 > Instances > Click on
In the bottom tabs -> Click on Security
Security groups
Add inbound traffic rules as shown in the image (you can just allow TCP 8080 as well, in my case, I allowed All traffic).
<div class="team-content">
                                <?php
                                    $content = apply_filters( 'the_content', get_the_content() );
                                    $first_paragraph = substr($content, 0, strpos($content, "</p>"));
                                    echo $first_paragraph;

                                    // check if $content has more than one paragrah and if it does get content after first </p>
                                    if (substr_count($content, '<p>') > 1) {
                                        $remaining_paragraphs = substr($content, strpos($content, "</p>") + 4); ?>
                                        <div class="more-content" style="display: none;">
                                        <?php echo $remaining_paragraphs; ?>
                                        </div>
                                        <div class="learn-more-toggle"><button class="learn-more" id="learnmore">Learn More</button></div>
                                        <script>
                                            jQuery(document).ready(function($){
                                                $('#learnmore').click(function(){
                                                    $('.more-content').toggleClass('show');
                                                    $(this).text() == 'Learn More' ? $(this).text('Show Less') : $(this).text('Learn More');
                                                });
                                            });
                                        </script>
                                    <?php } ?>
                            </div>
Quick Start Tutorial

In this newly updated tutorial, you’ll learn all the basics of getting started with Concepts! Whether you use Concepts on iOS, Android, ChromeOS or Windows, there’s something here for everyone.
sequenceDiagram
    participant User as User
    participant PDW_Connector as PDW Connector
    participant SFM_MS as SFM Microservice (SFM_MS)
    participant PRISM_API as PRISM API
    participant PDW_MART_HANA as PDW Mart (HANA)
   
    User->>PDW_Connector: Provide system ID during setup
    PDW_Connector->>SFM_MS: Request SFMemissionReport
    SFM_MS->>PDW_Connector: Fetch system ID for tenant
    SFM_MS-->>PDW_Connector: Return system ID
    SFM_MS->>PRISM_API: Request data for SFMemissionReport via OData GET call with $filter (system ID)
    PRISM_API->>PDW_MART_HANA: Fetch filtered data
    PDW_MART_HANA-->>PRISM_API: Return filtered data
    PRISM_API-->>SFM_MS: Return filtered data
    SFM_MS-->>PDW_Connector: Return data for SFMemissionReport
    PDW_Connector-->>User: Return data for SFMemissionReport
sequenceDiagram
    participant User as SFM_UI
    participant SFM_MS as SFM Microservice (SFM_MS)
    participant AI_Scenario_Manager as AI Scenario Manager
    participant Workflow_Client as Workflow Client
    participant Job_Management_Service as Job Management Service
    participant ETL_Process as ETL Process
    participant AiEmissionResult as sap.sfm.AiEmissionResult
    participant EmissionBySupplier as sap.smf.EmissionBySupplier

    User->>SFM_MS: Select Commodity/Supplier (Trigger AI Scenario)
    SFM_MS->>AI_Scenario_Manager: Activate AI Scenario (Subscription Request)
    AI_Scenario_Manager-->>SFM_MS: Confirm Activation (Create AIScenarioTenant)
    SFM_MS->>AI_Scenario_Manager: Trigger CO2 Data Enrichment
    AI_Scenario_Manager->>Workflow_Client: Submit Workflow
    Workflow_Client->>Job_Management_Service: Execute PySpark Jobs
    Job_Management_Service-->>Workflow_Client: Scenario Complete
    Workflow_Client-->>AI_Scenario_Manager: Scenario Complete
    AI_Scenario_Manager-->>SFM_MS: Return Enriched CO2 Data
    SFM_MS->>AiEmissionResult: Store Results (RAW Zone)
    ETL_Process->>AiEmissionResult: Extract Data (Source)
    ETL_Process->>EmissionBySupplier: Update Fact Table (Fill Missing Values)
Unity Rich Text 형식:

<color=#RRGGBB>텍스트</color>
<b>굵은 텍스트</b>
<i>기울임꼴 텍스트</i>
<u>밑줄 텍스트</u>
erDiagram
    InvoiceLineItem {
        int InvoiceLineNumber
        varchar Supplier_root_id
        varchar Part_root_Id
        varchar UNSPSC_root_Id
        decimal POAmount_Amount
        varchar SourceSystem
    }
    
    Part {
        varchar RootId
        int product_id
    }

    Supplier {
        varchar RootId
        int SupplierId
        varchar SupplierName
    }

    UNSPSC {
        varchar RootId
        varchar CategoryL3
    }

    EmissionBySupplier {
        int SFM_ID
        int Product_id
        int Supplier_id
    }

    InvoiceLineItem ||--|| Part: "Part_root_Id = RootId"
    InvoiceLineItem ||--|| Supplier: "Supplier_root_id = RootId"
    InvoiceLineItem ||--|| UNSPSC: "UNSPSC_root_Id = RootId"
    Part ||--|| EmissionBySupplier: "product_id = Product_id"
    Supplier ||--|| EmissionBySupplier: "SupplierId = Supplier_id"
extends CharacterBody3D

@export var speed : float = 6.0
@export var jump_velocity : float = 8.0
@export var look_sensitivity : float = 0.001

@onready var camera : Camera3D = $Camera3D
@onready var head : Node3D = $Head
@onready var pivot : Node3D = $Head/Pivot
@onready var collision_shape = $CollisionShape3D


var gravity : float = ProjectSettings.get_setting("physics/3d/default_gravity")*2
var velocity_y : float = 0
var update : bool = false
var gt_prev : Transform3D
var gt_current : Transform3D
var mesh_gt_prev : Transform3D
var mesh_gt_current : Transform3D

var obstacles : Array
var is_climbing : bool = false

func _ready():
	# Camera set up to prevent jitter.
	camera_setup()
	
	Input.mouse_mode = Input.MOUSE_MODE_CAPTURED 
	
func _input(event):
	# Mouse movement.
	if event is InputEventMouseMotion:
		rotate_y(-event.relative.x * look_sensitivity)
		
		head.rotate_x(-event.relative.y * look_sensitivity)
		
		head.rotation.x = clamp(head.rotation.x, -PI/2, PI/2)
		
# In-process func set up for preventing jitter.
func _process(delta):
	if update:
		update_transform()
		
		update = false
		
	var f = clamp(Engine.get_physics_interpolation_fraction(), 0 ,1)
	
	camera.global_transform = gt_prev.interpolate_with(gt_current, f)
	
func _physics_process(delta):
	update = true
	# Basic movement.
	var horizontal_velocity = Input.get_vector("left", "right", "forward", "backward").normalized() * speed
	
	velocity = horizontal_velocity.x * global_transform.basis.x + horizontal_velocity.y * global_transform.basis.z
	
	# Checking if the player is on the floor or climbing.
	if not is_on_floor() and not is_climbing:    
		velocity_y -= gravity * delta
		
	else:
		velocity_y = 0
		
	# Jump.
	if Input.is_action_just_pressed("jump") and is_on_floor():
		velocity_y = jump_velocity 
		
	# Vaulting with place_to_land detection and animation.
	vaulting(delta)
	
	velocity.y = velocity_y
	move_and_slide()
	
# Camera set up to prevent jitter.
func camera_setup():
	camera.set_as_top_level(true)
	
	camera.global_transform = pivot.global_transform
	
	gt_prev = pivot.global_transform
	
	gt_current = pivot.global_transform
	
# Updating transform to interpolate the camera's movement for smoothness. 
func update_transform():
	gt_prev = gt_current
	
	gt_current = pivot.global_transform
	
# Creating RayCast via code.
func raycast(from: Vector3, to: Vector3):
	var space = get_world_3d().direct_space_state
	
	var query = PhysicsRayQueryParameters3D.create(from, to, 2)
	
	query.collide_with_areas = true
	
	return space.intersect_ray(query)

# Calculating the place_to_land position and initiating the vault animation.
func vaulting(delta):
	if Input.is_action_just_pressed("jump"):
		# Player's RayCast to detect climbable areas.
		var start_hit = raycast(camera.transform.origin, camera.to_global(Vector3(0, 0, -1)))
		
		if start_hit and obstacles.is_empty():
			# RayCast to detect the perfect place to land. (Not that special, I just exaggerate :D)
			var place_to_land = raycast(start_hit.position + self.to_global(Vector3.FORWARD) * collision_shape.shape.radius + 
			(Vector3.UP * collision_shape.shape.height), Vector3.DOWN * (collision_shape.shape.height))
			
			if place_to_land:
				# Playing the animation
				vault_animation(place_to_land)

# Animation for vaulting/climbing.
func vault_animation(place_to_land):
	# Player is climbing. This variable prevents hiccups along the process of climbing.
	is_climbing = true
	
	# First Tween animation will make player move up.
	var vertical_climb = Vector3(global_transform.origin.x, place_to_land.position.y, global_transform.origin.z)
	# If your player controller's pivot is located in the middle use this: 
	# var vertical_climb = Vector3(global_transform.origin.x, (place_to_land.position.y + collision_shape.shape.height / 2), global_transform.origin.z)
	var vertical_tween = get_tree().create_tween().set_trans(Tween.TRANS_LINEAR).set_ease(Tween.EASE_IN)
	vertical_tween.tween_property(self, "global_transform:origin", vertical_climb, 0.4)
	
	# We wait for the animation to finish.
	await vertical_tween.finished
	
	# Second Tween animation will make the player move forward where the player is facing.
	var forward = global_transform.origin + (-self.basis.z * 1.2)
	var forward_tween = get_tree().create_tween().set_trans(Tween.TRANS_LINEAR).set_ease(Tween.EASE_IN_OUT)
	forward_tween.tween_property(self, "global_transform:origin", forward, 0.3)
	
	# We wait for the animation to finish.
	await forward_tween.finished
	
	# Player isn't climbing anymore.
	is_climbing = false

# Obstacle detection above the head.
func _on_obstacle_detector_body_entered(body):
	if body != self:
		obstacles.append(body)

func _on_obstacle_detector_body_exited(body):
	if body != self :
		obstacles.remove_at(obstacles.find(body))
0020-052F,2000-9FFF,AC00-D7AF,D7B0-D7FF,F900-FAFF,FF00-FFEF
 <form>
    <label>
      <input type="radio" name="question">
      Yes
    </label>
    <br>
    <label>
      <input type="radio" name="question">
      No
    </label>
  </form>
star

Tue Jun 04 2024 07:30:16 GMT+0000 (Coordinated Universal Time) view-source:https://www.zomato.com/clients/menu-tool/menu-tool/?res_id

@sahilkirmani98 #java

star

Tue Jun 04 2024 07:16:47 GMT+0000 (Coordinated Universal Time)

@hamzahanif192

star

Tue Jun 04 2024 06:01:10 GMT+0000 (Coordinated Universal Time) https://velog.io/@sinabro23/TIL202-Unity-TextMeshPro-한글-폰트-깨짐-해결-및-폰트-추가

@khyinto

star

Tue Jun 04 2024 05:36:49 GMT+0000 (Coordinated Universal Time)

@Peshani98

star

Tue Jun 04 2024 00:55:06 GMT+0000 (Coordinated Universal Time) https://github.com/nodejs/examples

@calazar23

star

Tue Jun 04 2024 00:30:09 GMT+0000 (Coordinated Universal Time) https://github.com/allyelvis/firebase-framework-tools/tree/patch-1

@calazar23

star

Tue Jun 04 2024 00:30:02 GMT+0000 (Coordinated Universal Time) https://github.com/allyelvis/firebase-framework-tools/tree/patch-1

@calazar23

star

Tue Jun 04 2024 00:05:47 GMT+0000 (Coordinated Universal Time) https://github.com/allyelvis/firebase-framework-tools/tree/patch-1

@calazar23

star

Tue Jun 04 2024 00:04:33 GMT+0000 (Coordinated Universal Time) https://github.com/allyelvis/firebase-framework-tools/tree/patch-1

@calazar23

star

Tue Jun 04 2024 00:04:20 GMT+0000 (Coordinated Universal Time) https://github.com/allyelvis/firebase-framework-tools/tree/patch-1

@calazar23

star

Mon Jun 03 2024 23:59:10 GMT+0000 (Coordinated Universal Time) https://docs.github.com/en/codespaces/reference/allowing-your-codespace-to-access-a-private-registry

@calazar23

star

Mon Jun 03 2024 23:16:18 GMT+0000 (Coordinated Universal Time)

@Muhammad_Waqar

star

Mon Jun 03 2024 23:06:47 GMT+0000 (Coordinated Universal Time) https://wiki.gdevelop.io/gdevelop5/interface/games-dashboard/leaderboard-administration/

@calazar23

star

Mon Jun 03 2024 17:32:58 GMT+0000 (Coordinated Universal Time) https://github.com/shmulisarmy/hello

@shmuli

star

Mon Jun 03 2024 15:02:55 GMT+0000 (Coordinated Universal Time) undefined

@ElyasAkbari

star

Mon Jun 03 2024 14:37:41 GMT+0000 (Coordinated Universal Time) https://chatgpt.com/

@RobertoSilvaZ

star

Mon Jun 03 2024 14:35:22 GMT+0000 (Coordinated Universal Time)

@madgakantara

star

Mon Jun 03 2024 13:40:13 GMT+0000 (Coordinated Universal Time) https://www.nike.com/ch/fr/?cp

@linouille

star

Mon Jun 03 2024 12:52:44 GMT+0000 (Coordinated Universal Time) https://www.blockchainappfactory.com/nft-marketing-services

@zarazyana #bitcoinlayer2 #bitcoinlayer2solutions #bitcoinlayer2blockhainsolutions #bitcoinlayer2development

star

Mon Jun 03 2024 10:39:17 GMT+0000 (Coordinated Universal Time) https://vtupulse.com/machine-learning/naive-bayesian-classifier-in-python/

@Divyansh

star

Mon Jun 03 2024 10:00:45 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/simple-ways-to-read-tsv-files-in-python/

@vladk

star

Mon Jun 03 2024 08:39:09 GMT+0000 (Coordinated Universal Time) https://secure.helpscout.net/mailbox/a66af2abc7090990/4174594/

@Pulak

star

Mon Jun 03 2024 07:30:16 GMT+0000 (Coordinated Universal Time) https://chatgpt.com/c/0024f688-63db-4a92-8f15-6217767bbc21

@rafnex

star

Mon Jun 03 2024 06:51:18 GMT+0000 (Coordinated Universal Time)

@anchal_llll

star

Mon Jun 03 2024 06:47:46 GMT+0000 (Coordinated Universal Time)

@StephenThevar

star

Mon Jun 03 2024 06:28:11 GMT+0000 (Coordinated Universal Time) https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world

@shmuli #json

star

Mon Jun 03 2024 03:20:20 GMT+0000 (Coordinated Universal Time) https://gyangangamoodle.in/pluginfile.php/79334/mod_resource/content/2/Experiment_No_10_Kmeans (1).ipynb

@Divyansh

star

Sun Jun 02 2024 21:00:15 GMT+0000 (Coordinated Universal Time) https://www.puppet.com/solutions/centos

@curtisbarry

star

Sun Jun 02 2024 20:53:37 GMT+0000 (Coordinated Universal Time) https://dora.dev/research/team/

@curtisbarry

star

Sun Jun 02 2024 20:24:26 GMT+0000 (Coordinated Universal Time) https://cloud.google.com/find-a-partner/

@curtisbarry

star

Sun Jun 02 2024 20:03:32 GMT+0000 (Coordinated Universal Time) https://zipextractor.app/lib/lib-zipreader-8-min.js:1:4141

@curtisbarry

star

Sun Jun 02 2024 15:29:25 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Jun 02 2024 15:11:20 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Jun 02 2024 15:03:28 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Jun 02 2024 14:25:34 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Jun 02 2024 06:15:21 GMT+0000 (Coordinated Universal Time) https://situbaon.com/mantri mall/?

@mehboob

star

Sun Jun 02 2024 06:15:08 GMT+0000 (Coordinated Universal Time)

@omnixima #php

star

Sun Jun 02 2024 05:42:02 GMT+0000 (Coordinated Universal Time) https://concepts.app/en/ios/support

@curtisbarry

star

Sun Jun 02 2024 04:04:37 GMT+0000 (Coordinated Universal Time)

@Ahan

star

Sun Jun 02 2024 03:51:29 GMT+0000 (Coordinated Universal Time) https://evenetstartup4.odoo.com/shop/confirmation

@oury

star

Sun Jun 02 2024 03:34:02 GMT+0000 (Coordinated Universal Time)

@Ahan

star

Sun Jun 02 2024 03:15:03 GMT+0000 (Coordinated Universal Time) https://gemini.google.com/app/bbf8e67c3ef80b52?_gl

@khyinto #bbcode

star

Sun Jun 02 2024 03:12:14 GMT+0000 (Coordinated Universal Time) https://www.domaintools.com/?s

@curtisbarry

star

Sun Jun 02 2024 02:38:05 GMT+0000 (Coordinated Universal Time)

@Ahan

star

Sun Jun 02 2024 00:04:40 GMT+0000 (Coordinated Universal Time)

@azariel #glsl

star

Sat Jun 01 2024 16:02:23 GMT+0000 (Coordinated Universal Time) https://myskrpatch.tistory.com/97

@khyinto

star

Sat Jun 01 2024 12:51:17 GMT+0000 (Coordinated Universal Time) https://nekkantimadhusri.medium.com/mastering-radio-buttons-selecting-only-one-option-in-a-group-9897b894043c

@ishwarpatel22

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension