Snippets Collections
var whiteList = {
    "http://localhost:5000": true,
    "https://example-url.herokuapp.com": true
};
var allowCrossDomain = function(req, res, next) {    
        if(whiteList[req.headers.origin]){            
            res.header('Access-Control-Allow-Credentials', true);
            res.header('Access-Control-Allow-Origin', req.headers.origin);
            res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
            res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With, Origin, Accept');        
            next();
        } 
};
app.use(allowCrossDomain);
force-reimport Datei nach c:\user\mo-desktop\appdata\local\programs\mo-containerplattform ablegen
# first we will import the subprocess module
import subprocess

# now we will store the profiles data in "data" variable by 
# running the 1st cmd command using subprocess.check_output
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')

# now we will store the profile by converting them to list
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]

# using for loop in python we are checking and printing the wifi 
# passwords if they are available using the 2nd cmd command
for i in profiles:
    # running the 2nd cmd command to check passwords
    results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 
                        'key=clear']).decode('utf-8').split('\n')
    # storing passwords after converting them to list
    results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
    # printing the profiles(wifi name) with their passwords using 
    # try and except method 
    try:
        print ("{:<30}|  {:<}".format(i, results[0]))
    except IndexError:
        print ("{:<30}|  {:<}".format(i, ""))
// Shortcode [king_events]

function king_events ( $atts, $content = null) {
    $today = date('Ymd');
	$atts = shortcode_atts(
        array(
            'type' => '',
            'number' => '-1',
        ),
        $atts,
        'king_events'
    );
    $args = array(
        'post_type' => 'tkc-event',
		'posts_per_page' => -1,
        'post_status' => 'publish',
        'orderby' => 'event_date',
        'order' => 'ASC',
        'meta_query' => array(
            array(
                'key' => 'event_date',
                'compare' => '>',
                'value' => $today,
                'type' => 'DATE'
            )
        ),
    );

	if( !empty( $atts['type'] ) ) {
		$args['tax_query'] = array(
			array(
				'taxonomy' => 'event_type',
				'field' => 'slug',
				'terms' => $atts['type'],
            )
		);
	}

    $events_query = new WP_Query($args);

    ob_start();
    if($events_query->have_posts()) { ?>

    <div class="events-wrap">

    <?php

    while ($events_query->have_posts()) {
    $events_query->the_post(); ?>

    <div class="belove-event-inner">
        <div class="belove-event-img">
            <a href="<?php echo get_the_post_thumbnail_url(get_the_ID(),'full'); ?>">
                <?php if ( has_post_thumbnail() ) { the_post_thumbnail('big-square'); } ?>
            </a>
        </div>
        <div class="belove-event-content">
            <h3><?php echo the_title(); ?></h3>
            <div class="event-details">
                <?php echo the_content(); ?>
            </div>
			<?php if (get_field('event_link')) { ?>
            <div class="belove-event-link">
                <?php if(get_field('button_label')) { ?>
                    <a href="<?php echo get_field('event_link'); ?>" target="_blank"><?php echo get_field('button_label'); ?></a>
                <?php }else { ?>
                    <a href="<?php echo get_field('event_link'); ?>" target="_blank">Registration</a>
                <?php }?>
            </div>
			<?php } ?>
        </div>
    </div>

    <?php }
    wp_reset_postdata();
    ?>
    </div>

    <?php
    } else { ?>
        <div>No Events found</div>
    <?php }
    return ob_get_clean();
}

add_shortcode('king_events', 'king_events');
}

#include <iostream>

using namespace std;

int main()
{
    
    int N ,M ; 
    cin>>N,M ;  
    int X[N] ,B[100001]={0} ;
    for(int i=0 ;i<N ;i++){
        cin>>X[i] ; 
        B[X[i]]++ ; 
        
    } 
    for(int i=0 ;i<N ;i++){ 
        if(B[X[i]]==-1){
            continue ;
        } 
        cout<<B[X[i]]<<endl; 
        B[X[i]]=-1 ; 
    } 
    

    return 0;
}

brew install shivammathur/php/php@8.2

brew unlink php@7.4 && brew link --force --overwrite php@8.2
const reducedData = Object.values(stockEntryReportData.reduce((acc, obj) => {
  const key = obj.store_id + '-' + obj.date + '-' + obj.user_id;
  if (!acc[key]) {
    acc[key] = { ...obj };
  } else {
    acc[key].productCount += obj.productCount;
  }
  return acc;
}, {}));

console.log(reducedData);
#include <iostream>
using namespace std;

class stu
{
   int id;
   char name[10];
   
   public:
   void get_data()
   {
       cout<<"enter student name:";
       cin>>name;
       cout<<"enter student id:";
       cin>>id;
   }
   void put_data()
   {
       cout<<"name="<<name;
       cout<<"id="<<id;
       
       
   }
};


class marks
{
   protected:
   int m1,m2,m3;
   public:
   void getmarks()
   {
       cout<<"enter three sub marks:";
       cin>>m1>>m2>>m3;
   }
  void putmarks()
  {
      cout<<"m1="<<m1;
      cout<<"m2="<<m2;
      cout<<"m3="<<m3;
  }
    
    
};
class result:public stu,public marks
{
    int total;
    float avg;
    public:
    void show()
    {
    
    getmarks();
    total= m1+m2+m3;
    cout<<"total marks:"<<total<<endl;;
    avg=total/3.0;
    cout<<"average marks scored:"<<avg<<endl;
    
}
    
    
};
int main()
{
    
    result r[3];
    for (int i=0;i<3;i++)
    {
    cout<<"data of student"<<i+1<<":"<<endl;
    r[i].show();
    }
    return 0;
    
    
}

#include <iostream>
using namespace std;

class stu
{
   int id;
   char name[10];
   
   public:
   void get_data()
   {
       cout<<"enter student name:";
       cin>>name;
       cout<<"enter student id:";
       cin>>id;
   }
   void put_data()
   {
       cout<<"name="<<name;
       cout<<"id="<<id;
       
       
   }
    
    
    
    
};

class phy:private stu
{
    int w ,h;
    public:
    void get_phy()
    {
       get_data();
       cout<<"enter student height:";
       cin>>h;
       cout<<"enter student weight:";
       cin>>w;
    }
    
    void put_phy()
    {
       put_data();
       cout<<"height="<<h;
       cout<<"weight="<<w;
       
     }
    
    
    
};



int main()
{
    
    phy p;
   
    p.get_phy();
    p.put_phy();
    cout<<"hello";
    return 0;
}
#include <iostream>
using namespace std;

class stu
{
   int id;
   char name[10];
   
   public:
   void get_data()
   {
       cout<<"enter student name:";
       cin>>name;
       cout<<"enter student id:";
       cin>>id;
   }
   void put_data()
   {
       cout<<"name="<<name;
       cout<<"id="<<id;
       
       
   }
    
    
    
    
};

class phy:public stu
{
    int w ,h;
    public:
    void get_phy()
    {
       cout<<"enter student height:";
       cin>>h;
       cout<<"enter student weight:";
       cin>>w;
    }
    
    void put_phy()
    {
       cout<<"height="<<h;
       cout<<"weight="<<w;
       
     }
    
    
    
};



int main()
{
    
    phy p;
    p.get_data();
    p.put_data();
    p.get_phy();
    p.put_phy();
    cout<<"hello";
    return 0;
}
public class Main {

    public static void main(String[] args) {
        boolean enrolledInAutomationClass = true; 

        boolean notEnrolledInAutomationClass = !enrolledInAutomationClass;

        System.out.println("Is the student enrolled in the automation class? " + notEnrolledInAutomationClass);
    }
}
Fale agora com um dos <span style="font-weight: 700">nossos <span style="  background: linear-gradient(86.05deg, #82EC86 4.61%, #26D22D 95.53%),
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;">especialistas</span></span>


Função: A mesma palavra em negrito e degradê, e uma cor para navegadores que não suportam degradê


Aliada Contabilidade e <span style="font-weight: 700">
  <span style="background: linear-gradient(86.05deg, #82EC86 4.61%, #26D22D 95.53%);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                color: #26D22D;
  ">Prestadores de Serviços</span>
</span>
public class Main {

    public static void main(String[] args) {
        boolean hasAccessCard = true; 
        boolean hasSecurityClearance = false; 

        boolean canEnterRestrictedArea = hasAccessCard || hasSecurityClearance;

        System.out.println("Can the user enter the restricted area? " + canEnterRestrictedArea);
    }
}
posterizeTime(thisComp.layer("Null 3").effect("posterize")("Slider"));
seedRandom(index+thisComp.layer("Null 3").effect("seed")("Slider"));
random(0,100);
/******************************************************************************

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

*******************************************************************************/

import java.util.*;
public class Main
{
	public static void main(String[] args) {
// 		System.out.println("Hello World");
// 		String s1="prepinsta";
// 		String s2="insta";
// 		String s3="ster";
// 		String s4=s1.replace(s1.substring(s1.indexOf(s2),s1.indexOf(s2)+s2.length()),s3);
// 		System.out.println(s4);
		
		
		// LEFT SHIFT
// 		int []arr={1, 2, 3, 4, 5, 6, 7};
// 		int n=4;
// 		int []m=new int[arr.length];
// 		for(int i=0;i<arr.length;i++){
// 		    int k=i-n;
// 		    k=k<0?(arr.length+k):k;
// 		    m[k]=arr[i];
// 		}
// 		for(int s:m){
// 		    System.out.print(s+" ");
// 		}
		
		//RIGHT SHIFT
// 		int []arr={1, 2, 3, 4, 5, 6, 7};
// 		int n=4;
// 		int []m=new int[arr.length];
// 		for(int i=0;i<arr.length;i++){
// 		    int k=i+n;
// 		    k=k>=arr.length?(k-arr.length):k;
// 		    m[k]=arr[i];
// 		}
// 		for(int s:m){
// 		    System.out.print(s+" ");
// 		}

        // int arr[] = {21, 30, 10, 2, 10, 20, 30, 11};
        // int m=0;
        // Arrays.sort(arr);
        // for(int i=0;i<arr.length-2;i++){
        //     if(arr[i]==arr[i+1]){
        //         m=arr[i];
        //         continue;
        //     }
        //     if(m!=arr[i+1] && i+1==arr.length-1){
        //         System.out.print(arr[i+1]+" ");
        //     }
        //     if(m!=arr[i])
        //     System.out.print(arr[i]+" ");
        // }
        
        // int n=232;
        // String s=String.valueOf(n);
        // char []arr=s.toCharArray();
        // int m=s.length()/2;
        // int k=s.length()-1;
        // m=k%2==0?m+1:m;
        // int i;
        // boolean b=true;
        // for(i=0;i<m;i++){
        //     int l=k-i;
        //     if(arr[i]!=arr[l]){
        //         b=false;
        //         break;
        //     }
        // }
        // System.out.print(b);
        
        // String s="geeks";
        // System.out.print(isPal(s.toCharArray()));
        
        // System.out.print(sum(0,5));
        
        // int a[][]={{1,2},{3,4}};
        // int b[][]={{1,2},{3,4}};
        // int c[][]=new int[2][2];
        // int s=0;
        // for(int i=0;i<2;i++){
        //     for(int j=0;j<2;j++){
        //         c[i][j]=a[i][j]+b[i][j];
        //     }
        // }
        // for(int i=0;i<2;i++){
        //     for(int j=0;j<2;j++){
        //         System.out.print(c[i][j]);
        //     }
        // }
        
        // int n=11001,b=1,dec=0,bin,r;
        // while(n>0){
        //     r=n%10;
        //     dec=dec+b*r;
        //     n/=10;
        //     b*=2;
        // }
        // System.out.print(dec);
        
        String s="abc12cde3fg5";
        char []c=s.toCharArray();
        for(int i=0;i<c.length-1;i++){
            while(!((c[i]>='a' && c[i]<='z') || (c[i]>='A' && c[i]<='Z')) && c[i]!='\0'){
                // System.out.print(i);
                boolean b=true;
                int j=i;
                for(j=i;j<c.length-1;j++){
                    if(((c[j+1]>='a' && c[j+1]<='z') || (c[j+1]>='A' && c[j+1]<='Z')) && c[j+1]!='\0'){
                        c[j]=c[j+1];
                    } else{
                        System.out.println(c[j]+" "+c[j+1]+" "+j);
                        b=false;
                    }
                
                }
                if(j==c.length-1 && !b){
                    c[j]=c[j]!='\0'?'\0':c[j-1];
                    c[j-1]='\0';
                    // System.out.println(c[j]+" "+c[j-1]+" "+j);
                }
            }

        }
        System.out.print(String.valueOf(c));
	}
	
	static int sum(int s, int n){
	    if(n==0)
	    return s;
	    return n+sum(s,n-1);
	}
	
	static boolean isPal(char[] s1){
	    int s=0,l=s1.length-1;
        boolean b=true;
        while(l>s){
            if(s1[s++]!=s1[l--]){
                b=false;
            }
        }    
        return b;
	}
}
function logINPDebugInfo(inpEntry) {
  console.log('INP target element:', inpEntry.target);
  console.log('INP interaction type:', inpEntry.name);

  const navEntry = performance.getEntriesByType('navigation')[0];
  const wasINPBeforeDCL =
    inpEntry.startTime < navEntry.domContentLoadedEventStart;

  console.log('INP occurred before DCL:', wasINPBeforeDCL);
}
new PerformanceObserver((list) => {
  for (const {value, startTime, sources} of list.getEntries()) {
    // Log the shift amount and other entry info.
    console.log('Layout shift:', {value, startTime});
    if (sources) {
      for (const {node, curRect, prevRect} of sources) {
        // Log the elements that shifted.
        console.log('  Shift source:', node, {curRect, prevRect});
      }
    }
  }
}).observe({type: 'layout-shift', buffered: true});
function countPositivesSumNegatives(input) {
  if(!input || input.length === 0) return []
  return input.reduce((finalValue, currentNumber)=> {
    return Math.sign(currentNumber) === 1 ? [finalValue[0]+1, finalValue[1]] : [finalValue[0], currentNumber + finalValue[1]]
  }, [0,0])
}
function digitize(n) {
return [...String(n)].map((n)=>parseInt(n)).reverse()
}

//OR

function digitize(n) {
  return Array.from(String(n), Number).reverse();
}
import random

plaintext = input("ENTER THE PLAINTEXT: ")
plainStorage = list(plaintext)
key = int(input("ENTER THE KEY: "))
storage = []  # Stores ciphertext

print("ENCRYPTED TEXT IS: ", end="")
for letter in plaintext:
    if letter == " ":  # print empty space, if whitespace is found in the plaintext.
        print(" ", end="")
        storage.append(letter)
        continue
    # 'cipherLetter' stores the Ascii value of the letter, and updates it with the key.
    cipherLetter = ord(letter)
    cipherLetter = cipherLetter + key

    if letter.isupper():
        model = 90  # Ascii of 'Z'
    else:
        model = 122  # Ascii of 'z'

    # checks if 'cipherLetter' is within the boundaries of the alphabet.
    if cipherLetter <= model:
        print(chr(cipherLetter), end='')
        storage.append(cipherLetter)

    # If cipherLetter is greater than the Ascii of 'z', recalculate the new cipherLetter.
    else:
        cipherLetter = (cipherLetter % model) + (model - 26)
        print(chr(cipherLetter), end='')
        storage.append(cipherLetter)
print("\n")

choice = input("DO YOU WANT TO DECRYPT, YES OR NO? ").upper()
if choice == 'YES':
    print("DECRYPTED TEXT IS: ", end="")
    flag = True
    while flag:  # Generates a random integer until the correct integer is found
        guessKey = random.randint(0, 26)
        storage2 = []
        for i in storage:
            if i == " ":
                storage2.append(i)
                continue

            plaintext = i - guessKey

            if chr(i).isupper():
                modelS = 65  # Ascii of 'A' I switched to 'A' because we want to retrace our steps backwards
            else:
                modelS = 97  # Ascii of 'a'

            # checks if 'plainLetter' is within the boundaries of the alphabet.
            if plaintext >= modelS:
                storage2.append(chr(plaintext))

            # If cipherLetter is greater than the Ascii of 'z', recalculate the new cipherLetter.
            else:
                plaintext = (modelS + 26) - (modelS % plaintext)
                storage2.append(chr(plaintext))

        if plainStorage == storage2:
            answer = ''.join(storage2)
            print(answer)
            flag = False
        else:
            continue

else:
    print("SAFELY ENCRYPTED!")
x = 0;
menu = thisComp.layer("Null 3").effect("Dropdown Menu Control")("Menu").value;

for (x; x <= time; x += 0.5) {
	if ((x - inPoint) % 2 == 0){
		switch(menu){
		case 1:
		transform.opacity = linear(time, x, x + 0.5, 100, 0);
		break;
		case 2:
		transform.opacity = easeOut(time, x, x + 0.5, 100, 0);
		break;
		case 3:
		transform.opacity = easeIn(time, x, x + 0.5, 100, 0);
		break;
		case 4:
		transform.opacity = ease(time, x, x + 0.5, 100, 0);
		break;
		};
	};
};
HTML 
<canvas id="canvas">No HTML5 canvas support.</canvas>

CSS
body {
  overflow: hidden;
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/167451/1797393.png) no-repeat center center fixed;
  background-size: cover;
  text-align: center;
}

JS
(function() {
  console.clear();
  var stage = new PIXI.Stage();
  var renderer = PIXI.autoDetectRecommendedRenderer(window.innerWidth, window.innerHeight, {view: document.getElementById("canvas"), transparent: true}
  );
  
  var starTexture = PIXI.Texture.fromImage("https://s3-us-west-2.amazonaws.com/s.cdpn.io/167451/Feedbin-Icon-star.svg");
  
  var colours = [
    0x3498db,  // Blue
    0x9b59b6,  // Purple
    //0xf1c40f,  // Yellow
    //0xd35400,  // Orange
    0xfA2323   // Red
  ];
  
  var starPool = [];
  var starsInUse = [];
  for (var i=0; i<100; i++) {
    var star = new PIXI.Sprite(starTexture);
    star.anchor.x = star.anchor.y = 0.5;
    star.visible = false;
    star.scaleDecay = 0;
    star.alphaDecay = 0;
    star.speed = 0;
    star.velocity = {
      x: 0,
      y: 0
    };
    starPool[i] = star;
    stage.addChild(star);
  }
  
  var spawn = function(x, y) {
    var star = starPool.splice(0, 1)[0];
    star.tint = colours[Math.floor(Math.random() * colours.length)];
    star.scale.x = star.scale.y = (Math.random() * 0.8) + 0.2;
    star.scaleDecay = (Math.random() * 0.05) + 0.05;
    star.alpha = (Math.random() * 0.2) + 0.8;
    star.alphaDecay = (Math.random() * 2) + 1;
    star.rotation = 2 * Math.random() * Math.PI;
    star.x = Math.cos(star.rotation) * 10 + x;
    star.y = Math.sin(star.rotation) * 10 + y;
    star.speed = (Math.random() * 30) + 20;
    star.velocity.x = star.speed * Math.cos(star.rotation);
    star.velocity.y = star.speed * Math.sin(star.rotation);
    star.visible = true;
    starsInUse.push(star);
  };
  
  var updateStars = function(delta) {
    for (var i=0; i<starsInUse.length; i++) {
      var star = starsInUse[i];
      if (star.visible) {
        star.alpha -= star.alphaDecay * delta;
        star.scale.x -= star.scaleDecay * delta;
        star.scale.y -= star.scaleDecay * delta;
        star.x += star.velocity.x * delta;
        star.y += star.velocity.y * delta;
        
        if (star.alpha < 0 || star.scale.x < 0) {
          star.visible = false;
          starPool.push(starsInUse.splice(i, 1)[0]);
        }
      }
    }
  };

  var lastTime = null;
  var animate = function(timestamp) {
    if (lastTime === null) {
      lastTime = timestamp;
    }
    var delta = (timestamp - lastTime) / 1000;
    lastTime = timestamp;
    
    for (var i=0; i<Math.min(starPool.length, 5); i++) {
      var pos = stage.interactionManager.mouse.global;
      spawn(pos.x, pos.y);      
    }
    updateStars(delta);
    
    renderer.render(stage);
    
    requestAnimationFrame(animate);
  };
  
  requestAnimationFrame(animate);
})();
Với vị trí quản lý cấp phòng, trong 6 năm qua tôi đã phỏng vấn, tuyển dụng số nhân sự lên tới cả trăm. Vì đơn vị tôi công tác trong lĩnh vực truyền thông, nên hầu hết nhân sự ứng tuyển đều còn trẻ, là sinh viên mới ra trường, thậm chí chưa ra trường. Những cuộc phỏng vấn thường có công thức thế này: 1. Ứng viên nói về bằng cấp và các thành tích trong học tập của mình rất trơn tru và tự hào. 2. Ứng viên nói khá chung chung về các kỹ năng mà mình có (và sẽ lại quy về bằng cấp để chứng minh). 3.Ứng viên hỏi rất rành mạch về cơ chế đãi ngộ (lương bổng, phụ cấp, kỷ luật lao động...) nhưng lại lúng túng khi được hỏi bạn mang tới cho chúng tôi cái gì?
<p id="my-paragraph" style="color: green;">Here’s some text for a paragraph that is being altered by HTML attributes</p>
<h1>Breaking News</h1>
<h2>This is the 1st subheading</h2>
<h3>This is the 2nd subheading</h3>
...
<h6>This is the 5th subheading</h6>
<body>
  <div>
    <h1>It's div's child and body's grandchild</h1>
    <h2>It's h1's sibling</h2>
  </div>
</body>
<div>
  <h1>A section of grouped elements</h1>
  <p>Here’s some text for the section</p>
</div>
<div>
  <h1>Second section of grouped elements</h1>
  <p>Here’s some text</p>
</div>
<ol>
  <li>Preheat oven to 325 F 👩‍🍳</li>
  <li>Drop cookie dough 🍪</li>
  <li>Bake for 15 min ⏰</li>
</ol>
<p>This <em>word</em> will be emphasized in italics.</p>
<video src="test-video.mp4" controls>
  Video not supported
</video>
<ol>
  <li>Head east on Prince St</li>
  <li>Turn left on Elizabeth</li>
</ol>


<ul>
  <li>Cookies</li>
  <li>Milk</li>
</ul>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
#User function Template for python3
import heapq
class Solution:
    
    #Function to find sum of weights of edges of the Minimum Spanning Tree.
    def spanningTree(self, V, adj):
        #code here
        #MST
        sum_=0
        adjl = adj
        vis = [0]*V
        pq = []  #wt,node  #store parent as well when the mst is asked as well
        heapq.heappush(pq,[0,0])
        while pq:
            cost,node = heapq.heappop(pq)
            if vis[node]==1:continue
            sum_+=cost
            vis[node] = 1
            for ch,wt in adjl[node]:
                if vis[ch]==0:heapq.heappush(pq,[wt,ch])
                
                
        return sum_
            

add_filter( 'woocommerce_checkout_cart_item_quantity', 'bbloomer_checkout_item_quantity_input', 9999, 3 );
  
function bbloomer_checkout_item_quantity_input( $product_quantity, $cart_item, $cart_item_key ) {
   $product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
   $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
   if ( ! $product->is_sold_individually() ) {
      $product_quantity = woocommerce_quantity_input( array(
         'input_name'  => 'shipping_method_qty_' . $product_id,
         'input_value' => $cart_item['quantity'],
         'max_value'   => $product->get_max_purchase_quantity(),
         'min_value'   => '0',
      ), $product, false );
      $product_quantity .= '<input type="hidden" name="product_key_' . $product_id . '" value="' . $cart_item_key . '">';
   }
   return $product_quantity;
}
 
// ----------------------------
// Detect Quantity Change and Recalculate Totals
 
add_action( 'woocommerce_checkout_update_order_review', 'bbloomer_update_item_quantity_checkout' );
 
function bbloomer_update_item_quantity_checkout( $post_data ) {
   parse_str( $post_data, $post_data_array );
   $updated_qty = false;
   foreach ( $post_data_array as $key => $value ) {   
      if ( substr( $key, 0, 20 ) === 'shipping_method_qty_' ) {         
         $id = substr( $key, 20 );   
         WC()->cart->set_quantity( $post_data_array['product_key_' . $id], $post_data_array[$key], false );
         $updated_qty = true;
      }     
   }  
   if ( $updated_qty ) WC()->cart->calculate_totals();
}
public class Targeter : MonoBehaviour
{
    [SerializeField] private CinemachineTargetGroup cinemachineTargetGroup;

    private Camera cam;
    private List<Target> targets = new List<Target>();

    public Target CurrentTarget { get; private set; }

    private void Start()
    {
        cam = Camera.main;
    }

    private void OnTriggerEnter(Collider other)
    {
        if (!other.TryGetComponent<Target>(out Target target)) { return; }

        targets.Add(target);
        target.OnDestroyed += RemoveTarget;
    }

    private void OnTriggerExit(Collider other)
    {
        if (!other.TryGetComponent<Target>(out Target target)) { return; }

        RemoveTarget(target);
    }

    public bool SelectTarget()
    {
        if (targets.Count == 0) { return false; }

        Target closestTarget = null;
        float closestTargetDistance = Mathf.Infinity;

        foreach (Target target in targets)
        {
            Vector2 viewportPos = cam.WorldToViewportPoint(target.transform.position);

            if (!target.GetComponentInChildren<Renderer>().isVisible)
            {
                continue;
            }

            Vector2 centerOffset = viewportPos - new Vector2(0.5f, 0.5f);
            if (centerOffset.sqrMagnitude < closestTargetDistance)
            {
                closestTarget = target;
                closestTargetDistance = centerOffset.sqrMagnitude;
            }
        }

        if (closestTarget == null) { return false; }

        CurrentTarget = closestTarget;
        cinemachineTargetGroup.AddMember(CurrentTarget.transform, 1f, 2f);

        return true;
    }

    public void Cancel()
    {
        if (CurrentTarget == null) { return; }

        cinemachineTargetGroup.RemoveMember(CurrentTarget.transform);
        CurrentTarget = null;
    }

    private void RemoveTarget(Target target)
    {
        if (CurrentTarget == target)
        {
            cinemachineTargetGroup.RemoveMember(CurrentTarget.transform);
            CurrentTarget = null;
        }

        target.OnDestroyed -= RemoveTarget;
        targets.Remove(target);
    }
}
public class LoadSaveManager : MonoBehaviour
{
    // Save game data
    public class GameStateData
    {
        public struct DataTransform
        {
            public float posX;
            public float posY;
            public float posZ;

            public float rotX;
            public float rotY;  
            public float rotZ;

            public float scaleX;
            public float scaleY;
            public float scaleZ;
        }

        // Data for enemy
        public class DataEnemy
        {
            // Enemy Transform Data
            public DataTransform posRotScale;
            // Enemy ID
            public int enemyID;
            // Health
            public int health;
        }

        // Data for player
        public class DataPlayer
        {
            public bool isSaved;
            // Transform Data
            public DataTransform posRotScale;
            // Collected combo power up?
            public bool collectedCombo;
            // Collected spell power up?
            public bool collectedSpell;
            // Has Collected sword ?
            public bool collectedSword;
            // Health
            public int health;
        }

        public List<DataEnemy> enemies = new List<DataEnemy>();
        public DataPlayer player = new DataPlayer();
    }

    // Game data to save/load
    public GameStateData gameState = new GameStateData();
    
    // Saves game data to XML file
    public void Save(string fileName = "GameData.xml")
    {
        EncryptedXmlSerializer.Save<GameStateData>(fileName, gameState);
    }

    // Load game data from XML file
    public void Load(string fileName = "GameData.xml")
    {
        EncryptedXmlSerializer.Load<GameStateData>(fileName);
    }
}
<meta name="robots" content="noindex, nofollow" />

<!-- Google Tag Manager -->
<script>
(function(w,d,s,l,i){
    w[l]=w[l]||[];
    w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
    var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
    j.async=true;
    j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
    f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TWJ6DPQ');
</script>
<!-- End Google Tag Manager -->

<!-- Redirection Script -->
<script>
// Function to get URL parameters
function getURLParameter(name) {
    return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}

// Get parameters from URL
const fname = getURLParameter('fname');
const email = getURLParameter('email');
const phone = getURLParameter('phone');
const post_credit_score = getURLParameter('post_credit_score');
const post_loan_amount = getURLParameter('post_loan_amount');
const post_unsecured_debt = getURLParameter('post_unsecured_debt');

// Construct the refValue for ChatGPTBuilder
const refValue = `FromUser--${fname}--170117--${fname}--974582--${email}--758141--${phone}--532496--${post_credit_score}--944036--${post_loan_amount}--848495--${post_unsecured_debt}`;

// Redirect to ChatGPTBuilder link after a 1-second delay
setTimeout(() => {
    location.href = `https://app.chatgptbuilder.io/webchat/?p=4077234&ref=${refValue}`;
}, 1000);
</script>
#Find patients with Type 1 Diabetes using the prefix 'DIAB1'

+--------------+---------+
| Column Name  | Type    |
+--------------+---------+
| patient_id   | int     |
| patient_name | varchar |
| conditions   | varchar |
+--------------+---------+ 

  Input: 
Patients table:
+------------+--------------+--------------+
| patient_id | patient_name | conditions   |
+------------+--------------+--------------+
| 1          | Daniel       | YFEV COUGH   |
| 2          | Alice        |              |
| 3          | Bob          | DIAB100 MYOP |
| 4          | George       | ACNE DIAB100 |
| 5          | Alain        | DIAB201      |
+------------+--------------+--------------+
SELECT *
FROM Patients
WHERE conditions LIKE 'DIAB1%' 
or conditions LIKE '% DIAB1%';
#Find emails: they that MUST start with a letter and MUST BE FOR LEETCODE.COM. 
#Emails can contain letters, numbers, underscores, periods, dashes and hyphens.

SELECT *
FROM Users
WHERE mail REGEXP '^[A-Za-z][A-Za-z0-9_\.\-]*@leetcode(\\?com)?\\.com$';
star

Mon Oct 02 2023 13:14:07 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/29196364/why-do-the-cors-settings-for-my-express-js-backend-not-work?rq

@daavib #javascript

star

Mon Oct 02 2023 11:52:21 GMT+0000 (Coordinated Universal Time) https://onlinebanking.alrajhibank.com.sa/OnlineBanking/dashboard

@Lonishe

star

Mon Oct 02 2023 08:26:51 GMT+0000 (Coordinated Universal Time) https://sgo.prim-edu.ru/angular/school/main/

@chudesnik_15sym

star

Mon Oct 02 2023 07:43:08 GMT+0000 (Coordinated Universal Time)

@oce1907

star

Mon Oct 02 2023 06:46:35 GMT+0000 (Coordinated Universal Time) https://copyassignment.com/how-to-get-wifi-passwords-with-python/

@rehan__creation

star

Mon Oct 02 2023 06:42:49 GMT+0000 (Coordinated Universal Time)

@omnixima #css #html #jquery

star

Mon Oct 02 2023 06:32:11 GMT+0000 (Coordinated Universal Time) https://www.onlinegdb.com/online_c++_compiler

@70da_vic2002

star

Mon Oct 02 2023 05:28:38 GMT+0000 (Coordinated Universal Time)

@codeplay #php

star

Mon Oct 02 2023 05:12:35 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/

@rtrmukesh

star

Mon Oct 02 2023 04:30:13 GMT+0000 (Coordinated Universal Time)

@rahulk

star

Mon Oct 02 2023 03:54:13 GMT+0000 (Coordinated Universal Time)

@rahulk

star

Mon Oct 02 2023 03:44:40 GMT+0000 (Coordinated Universal Time)

@rahulk

star

Mon Oct 02 2023 02:22:17 GMT+0000 (Coordinated Universal Time)

@TestProSupport

star

Mon Oct 02 2023 02:13:53 GMT+0000 (Coordinated Universal Time)

@carla

star

Mon Oct 02 2023 02:07:06 GMT+0000 (Coordinated Universal Time)

@TestProSupport

star

Sun Oct 01 2023 21:45:30 GMT+0000 (Coordinated Universal Time)

@vjg #javascript

star

Sun Oct 01 2023 19:46:58 GMT+0000 (Coordinated Universal Time)

@samee

star

Sun Oct 01 2023 19:01:19 GMT+0000 (Coordinated Universal Time) https://web.dev/debug-performance-in-the-field/

@dpavone #javascript

star

Sun Oct 01 2023 18:57:31 GMT+0000 (Coordinated Universal Time) https://web.dev/debug-performance-in-the-field/

@dpavone #javascript

star

Sun Oct 01 2023 17:11:42 GMT+0000 (Coordinated Universal Time) https://www.codewars.com/kata/576bb71bbbcf0951d5000044/train/javascript

@Paloma

star

Sun Oct 01 2023 16:53:08 GMT+0000 (Coordinated Universal Time) https://www.google.com/search?q

@pk20

star

Sun Oct 01 2023 16:43:58 GMT+0000 (Coordinated Universal Time) https://www.codewars.com/kata/5583090cbe83f4fd8c000051/train/javascript

@Paloma

star

Sun Oct 01 2023 11:01:11 GMT+0000 (Coordinated Universal Time)

@Codes

star

Sun Oct 01 2023 09:00:24 GMT+0000 (Coordinated Universal Time)

@vjg #javascript

star

Sun Oct 01 2023 08:27:34 GMT+0000 (Coordinated Universal Time) https://codepen.io/davidhartley/pen/ByBPoq

@hamitLicina

star

Sun Oct 01 2023 06:37:01 GMT+0000 (Coordinated Universal Time) https://vnexpress.net/hoc-dai-hoc-lam-gi-4154160.html

@abcabcabc

star

Sun Oct 01 2023 06:36:50 GMT+0000 (Coordinated Universal Time) https://www.reddit.com/r/css/comments/jgvu65/i_built_a_handy_chrome_extension_to_save_code/

@abcabcabc

star

Sat Sep 30 2023 20:46:55 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:42:02 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:40:17 GMT+0000 (Coordinated Universal Time) https://www.roblox.com/home

@zl0dan

star

Sat Sep 30 2023 20:39:41 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:39:07 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:36:27 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:35:42 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:35:02 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:34:32 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:33:25 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 20:33:01 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/learn/learn-html/modules/learn-html-elements/cheatsheet

@melissa2521

star

Sat Sep 30 2023 12:28:39 GMT+0000 (Coordinated Universal Time) https://getbootstrap.com/

@Zohaib77

star

Sat Sep 30 2023 10:55:06 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/blog/blockchain-identity-management-solutions

@irislee #web3 #blockchain

star

Sat Sep 30 2023 09:31:35 GMT+0000 (Coordinated Universal Time) https://refund-solutions.online/admin/?object

star

Sat Sep 30 2023 07:02:13 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/4196971/how-to-get-the-html-tag-html-with-javascript-jquery

@hirsch

star

Sat Sep 30 2023 05:50:38 GMT+0000 (Coordinated Universal Time)

@utp

star

Sat Sep 30 2023 05:45:52 GMT+0000 (Coordinated Universal Time)

@Alihaan #php

star

Fri Sep 29 2023 20:07:18 GMT+0000 (Coordinated Universal Time)

@juanesz

star

Fri Sep 29 2023 19:27:23 GMT+0000 (Coordinated Universal Time)

@juanesz

star

Fri Sep 29 2023 18:28:09 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Fri Sep 29 2023 17:54:18 GMT+0000 (Coordinated Universal Time) https://forum.arizona-rp.com/members/1649910/

@delik

star

Fri Sep 29 2023 17:53:14 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/patients-with-a-condition/description/?envType=study-plan-v2&envId=30-days-of-pandas&lang=pythondata

@jaez #mysql

star

Fri Sep 29 2023 17:31:04 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/big-countries/?envType

@jaez #mysql

Save snippets that work with our extensions

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