Snippets Collections
Say we have uncommitted changes to `foo` that
conflict with the state of `foo` in branch `develop`

Switch to `develop`
$ gl switch develop
✔ Switched to branch develop

$ gl status
...
Tracked files with modifications:
...
  foo
...

Create new branch `develop`
$ gl branch -c develop
✔ Created new branch develop

Switch to `develop`
$ gl switch develop
✔ Switched to branch develop
$ gl status
... no changes to foo here




Switch back to `master`
$ gl switch master
✔ Switched to branch master
$ gl status
...
Tracked files with modifications:
...
  foo
...
If you want the uncommitted changes to follow you
into the new branch you can use the mo/move-over
flag to move over the changes in the current branch
to the destination branch
$ gl status
...
Tracked files with modifications:
...
  foo
...

Stop tracking changes to `foo`
$ gl untrack foo
✔ File foo is now an untracked file
Now `foo` won't be automatically considered for
commit
$ gl status
...
Untracked files:
...
  foo (exists at head)
...

Start tracking changes to `foo` again
$ gl track foo
✔ File foo is now a tracked file
Now `foo` will be automatically considered for commit
$ gl status
...
Tracked files with modifications:
...
  foo
...
Commit all modified tracked files
$ gl commit
The default set of files to be committed are all
modified tracked files

Leave some modified tracked files (`foo`, `bar`)
out of the commit
$ gl commit -e foo bar
e/exclude excludes files from the default set
of files to be committed

Include some untracked files in the commit
$ gl commit -i foo2 bar2
i/include includes files to the default set
of files to be committed

Commit only some of the modified tracked files
$ gl commit foo3 bar3
listing files restricts the set of files to be committed
to only the specified ones

Commit only some of the modified tracked or
untracked files
$ gl commit foo3 bar3 foo4

$ gl tag -c v1.0
✔ Created new tag v1.0
$ gl tag
List of tags:
  ➜ do gl tag <t> to create tag t
  ➜ do gl tag -d <t> to delete tag t

    v1.0 ➜  tags 311bf7c Ready to release
$ gl remote -c try-gitless https://github.com/gitless-vcs/try-gitless
✔ Remote try-gitless mapping to https://github.com/gitless-vcs/try-gitless created
successfully
  ➜ to list existing remotes do gl remote
  ➜ to remove try-gitless do gl remote -d try-gitless
$ gl branch -c develop
✔ Created new branch develop
$ gl switch develop
✔ Switched to branch develop
$ gl branch
List of branches:
  ➜ do gl branch <b> to create branch b
  ➜ do gl branch -d <b> to delete branch b
  ➜ do gl switch <b> to switch to branch b
  ➜ * = current branch

    * master
      develop
$ gl commit -m "foo and bar"
$ gl commit -m "only foo" foo.py
$ gl commit -m "only foo and baz" foo.py baz.py
$ gl commit -m "only foo" -e bar.py
$ gl commit -m "only foo and baz" -e bar.py -i baz.py
$ gl commit -m "foo, bar and baz" -i baz.py
$ ls
bar.py  baz.py  foo.py  foo.pyc .gitignore
$ gl status
On branch master, repo-directory //

Tracked files with modifications:
  ➜ these will be automatically considered for commit
  ➜ use gl untrack <f> if you don't want to track changes to file f
  ➜ if file f was committed before, use gl checkout <f> to discard local changes

    foo.py
    bar.py

Untracked files:
  ➜ these won't be considered for commit)
  ➜ use gl track <f> if you want to track changes to file f

    baz.py
$ mkdir try-gitless
$ cd try-gitless/
$ gl init https://github.com/gitless-vcs/try-gitless
✔ Local repo created in /MyFiles/try-gitless
✔ Initialized from remote https://github.com/gitless-vcs/try-gitless
$ mkdir foo
$ cd foo/
$ gl init
✔ Local repo created in /MyFiles/foo
$ git branch --merged --list
fatal: malformed object name --list
$ git branch --list --merged
* develop
  feature/latest
user@host:~/project g branches
  2 days ago    c1632be  master -> origin/master
* 11 days ago   1e8eab0  develop -> origin/develop  (merged)
  5 months ago  d58b929  feature/historical -> ?    (merged)
  5 months ago  3b22622  save -> ?
  2 days ago    c1632be  origin/HEAD
  2 days ago    c1632be  origin/master
  11 days ago   1e8eab0  origin/develop
  11 days ago   1e8eab0  origin/will
  4 weeks ago   f58098a  origin/paul
#Step-5: Calculate Accuracy,  Precision ,Recall, and F1 Score

#Calculate accuracy
accuracy=accuracy_score(y_test, y_pred)
print("Accuracy :",accuracy)

#Calculate precision
precision= precision_score(y_test, y_pred)
print("Precision :",precision)

#Calculate recall
recall= recall_score(y_test, y_pred)
print("Recall :",recall)

#calculate the f1 score
f1= f1_score(y_test, y_pred)
print("F1 Score :",f1)
                      
Fig. 1
From: Investigating the effectiveness of peer code review in distributed software development based on objective and subjective data


Overview of the Code Review Process

Back to article page
#include <bits/stdc++.h>  // Thư viện tiêu chuẩn cho C++ (bao gồm tất cả các thư viện phổ biến)
using namespace std;

void primMST(int V, vector<vector<pair<int, int>>>& adj) {  // Hàm tìm MST với V đỉnh và danh sách kề 'adj'
    vector<int> key(V, INT_MAX), parent(V, -1);  // 'key' lưu trọng số nhỏ nhất để kết nối, 'parent' lưu đỉnh cha
    vector<bool> inMST(V, false);  // Đánh dấu đỉnh nào đã được thêm vào MST
    priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;  // Min-heap lưu (trọng số, đỉnh)

    key[0] = 0;  // Khởi tạo đỉnh đầu tiên với trọng số 0 (bắt đầu từ đỉnh 0)
    pq.push({0, 0});  // Đẩy đỉnh 0 vào hàng đợi ưu tiên với trọng số 0

    while (!pq.empty()) {  // Vòng lặp chính: Chạy cho đến khi hàng đợi rỗng
        int u = pq.top().second;  // Lấy đỉnh 'u' có trọng số nhỏ nhất từ hàng đợi
        pq.pop();  // Loại bỏ đỉnh 'u' khỏi hàng đợi
        inMST[u] = true;  // Đánh dấu 'u' đã được thêm vào MST

        // Duyệt qua tất cả các đỉnh kề 'v' của 'u' với trọng số 'weight'
        for (auto& [v, weight] : adj[u]) {  
            // Nếu 'v' chưa thuộc MST và 'weight' nhỏ hơn trọng số hiện tại 'key[v]'
            if (!inMST[v] && weight < key[v]) {  
                key[v] = weight;  // Cập nhật 'key[v]' với trọng số mới
                pq.push({key[v], v});  // Đẩy (trọng số mới, đỉnh 'v') vào hàng đợi ưu tiên
                parent[v] = u;  // Cập nhật đỉnh cha 'u' của 'v'
            }
        }
    }

    // In ra các cạnh của cây khung nhỏ nhất (MST)
    for (int i = 1; i < V; i++)  // Duyệt qua các đỉnh từ 1 đến V-1
        cout << parent[i] << " - " << i << " (" << key[i] << ")\n";  // In cạnh (parent[i] - i) và trọng số (key[i])
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: What's on in Melbourne this week! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n Hey Melbourne, happy Monday! Please see below for what's on this week. "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Xero Café :coffee:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :new-thing: *This week we are offering:* \n\n We have Muesli & Apple Yoghurt Cookies, Triple Chocolate Fudge Cookes (GF), and Hedgehog Slice!\n\n *Weekly Café Special*: _Vanilla Chai Latte_"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " Wednesday, 4th September :calendar-date-4:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n:late-cake: *Afternoon Tea*: From *2pm* in the *L1, L2 and L3* kitchens! \n\n:massage:*Wellbeing - Yoga Flow*: Confirm your spot <https://docs.google.com/spreadsheets/d/1iKMQtSaawEdJluOmhdi_r_dAifeIg0JGCu7ZSPuwRbo/edit?gid=0#gid=0/|*here*>. Please note we have a maximum of 15 participants per class, a minimum notice period of 2 hours is required if you can no longer attend."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Thursday, 5th September :calendar-date-5:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am* in the Wominjeka Breakout Space.\n\n"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Later this month:* We have our Grand Final Eve-Eve BBQ Social on the 26th of September! Make sure to wear your team colours (can be NRL or AFL) and come along for some fun! \n\nStay tuned to this channel for more details, and make sure you're subscribed to the <https://calendar.google.com/calendar/u/0?cid=Y19xczkyMjk5ZGlsODJzMjA4aGt1b3RnM2t1MEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Melbourne Social Calendar*> :party-wx:"
			}
		}
	]
}
<link rel="stylesheet" href="2bit-ui.css" />
// Footer
.ari-section.footer{
  	@media (max-width: 991px){
    	padding: 0;
  	}
  	.ari-layout.internal &, .ari-layout.contact-pg &{
    	margin-top: 50px;
  	}
}
.footer{
    &-top{
        font-size: _res-m(36);
        text-align: center;
        @include screen-sm-min{
            font-size: _res(16);
            text-align: left;
            padding: _res(88) 0;
            @include _flex($halign: space-between, $valign: flex-start);
            &::before, &::after{ display: none; }
        }
        @include section-padding;
        a{
            color: #fff;
            transition: all .3s ease-in-out;
            &:hover{
                color: $brand-primary;
                text-decoration: none;
            }
        }
        >div{
            @include screen-xs{
                padding: _res-m(130) 0;
                &:not(:last-child){
                    border-bottom: 2px solid #9B9DA0;
                }
            }
            @include screen-sm-min{
                width: auto;
            }
        }
    }
    &-title{
        @include screen-sm-min{}
    }
    &-logo{
        width: _res-m(382);
        margin: 0 auto;
        @include screen-sm-min{
            width: _res(254);
        }
        img{ width: 100%; }
    }
    &-phone{
        @include screen-sm-min{}
    }
    &-address{
        @include screen-sm-min{}
    }
    &-phone, &-address{
        @include screen-sm-min{}
    }
    &-quick-links{
        ul{
            margin: 0;
            padding: 0;
            list-style: none;
            li{
                padding-bottom: _res-m(20);
                @include screen-sm-min{
                    padding-bottom: _res(20);
                }
            }
        }
    }
    &-smedia{
        .social-media{
            .fa-circle{ display: none; }
            .fa-stack{
                width: 1em; height: 1em;
                line-height: 1em;
                font-size: _res-m(50);
                @include screen-sm-min{
                    font-size: _res(30);
                }
            }
            @include screen-sm-min{
                &:hover{}
            }
        }
    }
    &-hours{
        .hours{
            display: inline-block;
            text-align: left;
            >div{
                padding-bottom: _res-m(20);
                @include screen-sm-min{
                    padding-bottom: _res(10);
                }
            }
        }
        .day{
            display: inline-block;
            width: _res-m(300);
            @include screen-sm-min{
                width: _res(90,168);
            }
        }
    }
    &-map{
        iframe{
            width: _res-m(923);
            height: _res-m(609);
            @include screen-sm-min{
                width: _res(180,250);
                height: _res(110,165);
            }
        }
        .map{ display: flex; }
    }
    &-cta{
        display: inline-block;
        .btn-cta{
            font-size: _res-m(36);
            @include screen-sm-min{
                font-size: _res(16);
            }
        }
    }
    &-bottom{
        background: #000;
        border-top: _res-m(5,10) solid $brand-primary;
        padding: _res-m(15,30) 0;
        @include screen-sm-min{
            padding: 15px 0;
            border-top-width: _res(2,5);
            .bottom-row{
                display: flex;
                align-items: center;
                justify-content: space-between;
            }
        }
        @include section-padding;
        a, a:hover{ color: #fff; }
        .footer-nav{
            ul{
                margin: 0;
                padding: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                li{
                    list-style: none;
                    a{
                        font-size: _res-m(10,25);
                        display: inline-block;
                        padding: 0 10px;
                        line-height: 1;
                        border-right: 1px solid #fff;
                        @include screen-sm-min{
                            font-size: _res(11,14);
                        }
                    }
                    &:first-child a{
                        padding-left: 0;
                    }
                    &:last-child a{
                        padding-right: 0;
                        border-right: none;
                    }
                }
            }
        }
        .footer-copyright{
            text-align: center;
            padding: _res-m(8,15) 0;
            font-size: _res-m(10,25);
            @include screen-sm-min{
                padding: 0;
                font-size: _res(11,14);
            }
            small{ font-size: 100%; }
        }
        .footer-ds-logo{
            text-align: center;
            img{
                width: _res-m(174,284);
                @include screen-sm-min{
                  width: _res(150,284);
                }
            }
        }
    }
}
package com.example.objectdemo

import kotlin.js.ExperimentalJsExport

class Employee(var name:String,var position:String="Clerk",var dept:String="Sales",var Experience:Int=1)
{

    fun display(){
        println("Employee Details \nName:$name\nPosition:$position\nDepartment:$dept\nExperience:$Experience")
    }
    fun promote(place:String)
    {
        this.position=place
    }
    fun transfer(place:String)
    {
        this.dept=place
    }
    fun increament(inc:Int)
    {
        this.Experience+=inc
    }
}
fun main(){
    val b1=Employee("Karan","Junior Developer","sales")
    b1.display()
    b1.promote("Senior Developer")
    b1.display()
    val b2=Employee("Raju","Manager",)
    b2.display()
    b2.transfer("Marketing")
    b2.display()
    val b3=Employee("Tani", position = "Marketing", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
    val b4=Employee("Ashok", position = "Manager", dept = "HR")
    b4.display()
    b4.promote("Senior Manager")
    b3.display()
    val b5=Employee("Balu", position = "Analyst", dept = "Finance")
    b3.display()
    b3.transfer("Sales")
    b3.display()
    val b6=Employee("Charan", position = "Developer", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
}
package com.example.objectdemo

import kotlin.js.ExperimentalJsExport

class Employee(var name:String,var position:String="Clerk",var dept:String="Sales",var Experience:Int=1)
{

    fun display(){
        println("Employee Details \nName:$name\nPosition:$position\nDepartment:$dept\nExperience:$Experience")
    }
    fun promote(place:String)
    {
        this.position=place
    }
    fun transfer(place:String)
    {
        this.dept=place
    }
    fun increament(inc:Int)
    {
        this.Experience+=inc
    }
}
fun main(){
    val b1=Employee("Karan","Junior Developer","sales")
    b1.display()
    b1.promote("Senior Developer")
    b1.display()
    val b2=Employee("Raju","Manager",)
    b2.display()
    b2.transfer("Marketing")
    b2.display()
    val b3=Employee("Tani", position = "Marketing", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
    val b4=Employee("Ashok", position = "Manager", dept = "HR")
    b4.display()
    b4.promote("Senior Manager")
    b3.display()
    val b5=Employee("Balu", position = "Analyst", dept = "Finance")
    b3.display()
    b3.transfer("Sales")
    b3.display()
    val b6=Employee("Charan", position = "Developer", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
}
1. Create a 'Book' class with the following specifications:

 Properties:  title,Author,Published_year

Methods:
  displayInfo : to print Book details.

//Program
package com.example.objectoriented

class Book(val title:String, val author:String, val published_year:Int){
    fun display(){
        println("Title: $title\nAuthor: $author\nPublished Year: $published_year")
        println()
    }
}

fun main(){
    val b1 = Book("Computer Networking", "John", 2020)
    val b2 = Book("Algorithms Design And Analysis", "James", 2019)

    println("Book Details")
    println()
    b1.display()
    b2.display()
}



2. Simple class with a Primary Constructor

//Program

package com.example.objectoriented

class Emp(val ename:String, val id:Int, val age:Int){

    init {
        if(age<0){
            println("Age cannot be negative")
        }
        else{
            println("Object is created")
        }
    }
    fun showDetails(){
        println("Name: $ename \nID: $id")
    }
}

fun main(){
    val e1 = Emp("Rahul", 101, 20)
    e1.showDetails()
    println()
    val e2 = Emp("Aarav", 102, -3)
    e2.showDetails()
}


3. Implelemt a Employee Class with default constructor values

    Properties: name,position,department,experience(set it to 1 default)

  Methods: showdetails()

  a. Create a Instance with only Name specified
  b. Create a Instance with Name and Position Specified
  c. Create a Instance with All Properties Specified
  d. Instance with Name and Experience Specified
  
//Program

package com.example.objectoriented

class Employee(val name:String, val position:String = "Clerk", val department:String = "CS", val experience:Int = 1){
    fun display(){
        println("Name: $name")
        println("Poistion: $position")
        println("Department: $department")
        println("Experience: $experience")
        println()
    }
}

fun main(){
    val e1 = Employee("Rahul")
    val e2 = Employee("Aarav", "Data Analyst ", "CS")
    val e3 = Employee("James", "Manager", "IT", 20)
    val e4 = Employee("Adam", experience = 15)

    e1.display()
    e2.display()
    e3.display()
    e4.display()


}
x=0 y=0
mouse=down <y(10)>
wait(0.5)<y(-10)>
 if (window.fetch) {
            document.getElementById("submit").addEventListener("click", (e) => {
                e.preventDefault();
                fetch("https://jsonplaceholder.typicode.com/posts", {
                    method: "POST",
                    body: new FormData(document.getElementById("myForm")),
                })
                    .then((response) => response.json())
                    .then((json) => console.log(json))
                    .catch(error => console.log(error));
            });
        } else {
            document.getElementById("submit").addEventListener("click", (e) => {
                e.preventDefault();
                let xhttp = new XMLHttpRequest();
                xhttp.onreadystatechange = function () {
                    if (this.readyState == 4 && this.status == 200) {
                        let result = JSON.parse(this.responseText);
                        console.log(result);
                    } else if (this.readyState == 4) {
                        console.log("can't fecth data")
                    }
                }

                xhttp.open("POST", "https://jsonplaceholder.typicode.com/posts", true);
                const formData = new FormData(document.getElementById("myForm"));
                xhttp.send(formData);
            });
        }
// Example program
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <unordered_map>
#include <algorithm>
#include <deque>
#include <set>
#include <iostream>
#include <string>
#include <algorithm>
#include <algorithm>
using namespace std;

void BFS(int startnode, const vector<vector<int> >& S){
    vector<int> visited(S.size(), 0);
    visited[startnode] = 1;
    deque<int> dq;
    dq.push_back(startnode);
    
    while(dq.empty() == false){
        int node = dq.front();
        dq.pop_front();
        
        cout << node << " ";
        
         for(int i = 0; i < S[node].size(); i++){
            int neighbor = S[node][i]; // Lấy đỉnh kề
            if(visited[neighbor] == 0){ // Nếu đỉnh kề chưa được thăm
                visited[neighbor] = 1; // Đánh dấu đỉnh kề đã được thăm
                dq.push_back(neighbor); // Thêm đỉnh kề vào deque
            }
         }
    }
}

void DFS(int node, const vector<vector<int> >& S, vector<int>& visited){
    visited[node] = 1;
    cout << node << " ";
    for(int i = 0; i < S[node].size(); i++){
        if(visited[S[node][i]] == 0){
            DFS(S[node][i], S, visited);
            }
    }
}

int main()
{
  int n,m; //số đỉnh, cạnh
  cin >> n >> m;
  vector<vector<int> > S(n);
  vector<int> visited(n,0);
  for(int i = 0; i < m; i++){
      int a,b;
      cin >> a >> b;
      S[a].push_back(b);
      S[b].push_back(a);
}

  DFS(0, S , visited);  
  return 0;  
}
import React from "react";
import ImageGallery from "react-image-gallery";
import { useImageGallery } from "../../hooks/useImageGallery";

export const FeatureImageGallery = ({
  images,
}: Record<string, any>): JSX.Element => {
  const { galleryRef, handleScreenChange, handleFullscreen } =
    useImageGallery();

  return (
    <div
      style={{
        display: "flex",
        justifyContent: "center",
        alignItems: "center",
        margin: "1rem 0",
        maxWidth: "1100px",
      }}
    >
      <ImageGallery
        items={images.map(
          (image: {
            original: string | undefined;
            originalAlt: string;
            originalClass: string;
          }) => ({
            ...image,
            renderItem: () => (
              <img
                key={image.original}
                style={{ width: "auto" }}
                src={image.original}
                alt={image.originalAlt}
              />
            ),
          })
        )}
        ref={galleryRef}
        showPlayButton={false}
        showFullscreenButton={false}
        autoPlay={true}
        slideInterval={3000}
        lazyLoad={true}
        onClick={() => handleFullscreen()}
        onScreenChange={(isFullScreen) => handleScreenChange(isFullScreen)}
        showNav={false}
        showBullets={images.length > 1}
      />
    </div>
  );
};
import { useState } from 'react';

import { Badge } from '@/shadcn-ui/components/ui/badge';
import { ShadCnButton } from '@/shadcn-ui/components/ui/button';
import {
  DropdownMenu,
  DropdownMenuCheckboxItem,
  DropdownMenuContent,
  DropdownMenuTrigger,
} from '@/shadcn-ui/components/ui/dropdown-menu';
import { Separator } from '@/shadcn-ui/components/ui/separator';
import { X } from 'lucide-react';

interface BusinessesFilterProps {
  title?: string;
  icon: JSX.Element;
  options: {
    label: string | null;
    value: string;
  }[];
  onSelectedValues: (
    value: {
      label: string | null;
      value: string;
    }[],
  ) => void;
}

export function BusinessesFilter({
  icon,
  options,
  title,
}: BusinessesFilterProps) {
  const [isOpen, setIsOpen] = useState(false);
  const [selectedItems, setSelectedItems] = useState<
    {
      label: string | null;
      value: string;
    }[]
  >([]);

  function handleItemsSelected(clickedItem: {
    label: string | null;
    value: string;
  }) {
    const itemAlreadyExist = selectedItems.find(
      (item) => item.value === clickedItem.value,
    );

    if (itemAlreadyExist) {
      setSelectedItems((prevItems) => {
        const filteredItem = prevItems.filter(
          (prevItem) => prevItem !== itemAlreadyExist,
        );
        return filteredItem;
      });
    } else {
      setSelectedItems((prevItems) => {
        const filteredItem = [...prevItems, clickedItem];
        return filteredItem;
      });
    }
  }

  return (
    <DropdownMenu open={isOpen}>
      <DropdownMenuTrigger asChild onClick={() => setIsOpen(true)}>
        <ShadCnButton
          variant="outline"
          size="default"
          className="h-12 border-dashed flex gap-2"
        >
          {icon}
          {title}

          <Separator orientation="vertical" className="mx-2 h-4" />
          <div>
            {selectedItems && (
              <Badge
                variant="secondary"
                className="rounded-sm px-1 font-normal"
              >
                {selectedItems.length}
              </Badge>
            )}
          </div>
        </ShadCnButton>
      </DropdownMenuTrigger>
      <DropdownMenuContent className="w-[200px] p-0" align="start">
        <div className="flex justify-between items-center p-2 border-b">
          <span className="font-medium">{title}</span>
          <ShadCnButton
            variant="ghost"
            size="sm"
            className="h-8 w-8 p-0"
            onClick={() => setIsOpen(false)}
          >
            <X className="h-4 w-4" />
          </ShadCnButton>
        </div>
        <div className="flex flex-col gap-2 p-2">
          {options.map(({ label, value }) => {
            const isChecked = selectedItems.find(
              (item) => item.value === value,
            );
            return (
              <DropdownMenuCheckboxItem
                checked={!!isChecked}
                onCheckedChange={() => {
                  handleItemsSelected({ label, value });
                }}
                key={value}
              >
                {label}
              </DropdownMenuCheckboxItem>
            );
          })}
        </div>
      </DropdownMenuContent>
    </DropdownMenu>
  );
}
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
using namespace std;


int gcd(int a, int b){
    while(b != 0) {
        int temp = b;
        b = a % b;
        a = temp;
    }
    return a;
}

int lcm(int a, int b){
    return (a*b) / gcd(a,b);
}
<!-- sldsValidatorIgnore -->
<template>
      <div class="related-list-style-div"></div>
      <div class="slds-card_boundary">
            <div class="slds-page-header related-list-header">
                  <div class="slds-page-header__row">
                        <div class="slds-page-header__col-title" style="margin: auto;">
                              <div class="slds-media">
                                    <div class="slds-media__figure">
                                          <lightning-icon icon-name="standard:quotes" size="small"
                                                title="large size"></lightning-icon>
                                    </div>
                                    <div class="slds-media__body">
                                          <div class="slds-page-header__name">
                                                <div class="slds-page-header__name-title">
                                                      <h1>
                                                            <span
                                                                  class="slds-page-header__title slds-truncate related-list-title">
                                                                  Grupo de Cotações ({qntQuotes})
                                                            </span>
                                                      </h1>
                                                </div>
                                          </div>
                                    </div>
                              </div>
                        </div>
                        <div class="slds-page-header__col-actions">
                              <div class="slds-page-header__controls">
                                    <!-- <div if:true={showClipWrapButton} class="slds-page-header__control">
                                          <button class="slds-button slds-button_icon slds-button_icon-more"
                                                aria-haspopup="true" aria-expanded="false" title="Clip/Wrap Text"
                                                onclick={handleClipWrap}>
                                                <lightning-icon if:true={wrapText} icon-name="utility:right_align"
                                                      alternative-text="Wrap Text" size="xx-small"></lightning-icon>
                                                <lightning-icon if:false={wrapText}
                                                      icon-name="utility:center_align_text" alternative-text="Clip Text"
                                                      size="xx-small"></lightning-icon>
                                                <span class="slds-assistive-text">Clip/Wrap Text</span>
                                          </button>
                                    </div> -->

                                    <div class="slds-page-header__control">
                                          <button class="slds-button slds-button_icon slds-button_icon-border-filled"
                                                title="Refresh List" onclick={handleRefreshList}>
                                                <lightning-icon icon-name="utility:refresh"
                                                      alternative-text="Refresh List" size="xx-small"></lightning-icon>
                                                <span class="slds-assistive-text">Refresh List</span>
                                          </button>
                                    </div>

                                    <!-- <template if:true={showNewButton}>
                                          <div class="slds-page-header__control">
                                                <ul class="slds-button-group-list">
                                                      <li>
                                                            <lightning-button variant="neutral" label="New"
                                                                  onclick={navigateToNewRecordPage}></lightning-button>
                                                      </li>
                                                </ul>
                                          </div>
                                    </template> -->

                              </div>
                        </div>
                  </div>
            </div>

            <div class="related-list-body">
                  <lightning-tree-grid columns={gridColumns} data={gridData} key-field="id" hide-checkbox-column>
                  </lightning-tree-grid>
            </div>
      </div>
</template>
#include <iostream>
#include <iomanip>
using namespace std;

struct Time {
    int hours;
    int minutes;
    int seconds;
};

// Function to calculate time difference
Time calculateTimeDifference(Time t1, Time t2) {
    Time difference;

    // Calculate total seconds for both times
    int seconds1 = t1.hours * 3600 + t1.minutes * 60 + t1.seconds;
    int seconds2 = t2.hours * 3600 + t2.minutes * 60 + t2.seconds;

    // Difference in seconds
    int diffSeconds = seconds1 - seconds2;

    // Convert difference back to hours, minutes, seconds
    difference.hours = diffSeconds / 3600;
    diffSeconds = diffSeconds % 3600;
    difference.minutes = diffSeconds / 60;
    difference.seconds = diffSeconds % 60;

    return difference;
}

int main() {
    // Input the two times
    Time t1, t2;
    char colon;
    cin >> t1.hours >> colon >> t1.minutes >> colon >> t1.seconds;
    cin >> t2.hours >> colon >> t2.minutes >> colon >> t2.seconds;

    // Calculate the difference
    Time difference = calculateTimeDifference(t1, t2);

    // Output the difference in HH:MM:SS format
    cout << setfill('0') << setw(2) << difference.hours << ":"
         << setfill('0') << setw(2) << difference.minutes << ":"
         << setfill('0') << setw(2) << difference.seconds << endl;

    return 0;
}
<!-- Squarepaste Form Logic © -->

<script src="https://storage.googleapis.com/squarepaste/base-jquery.js"></script>

<script type="text/javascript">
/* Select Field */

$(document).on('change', '#select-6ed7f446-8ef8-42ea-abf4-e72a84b41cb3-field select', function() {

        const value = $(this).val();

        if (value == 'Yes') {

           $('#section-8ce22bc1-00cb-43c0-b3ab-cccaab43ad22').fadeIn();

        }

        else {

            $('#section-8ce22bc1-00cb-43c0-b3ab-cccaab43ad22').hide();

        }

    });

/* Radio Field- Hide submit button based on radio button selection and display message */
    $(document).on('change', 'input[type="radio"]', function() {
        if ($('input[type="radio"][value="No"]:checked').length > 0) {
            $('button[type="submit"]').fadeIn();
            $('#section-26b8b3d8-8295-42a8-bae3-3f26b85de441').hide();
        } else if ($('input[type="radio"][value="No"]:checked').length === 0) {
            $('button[type="submit"]').hide();
            $('#section-26b8b3d8-8295-42a8-bae3-3f26b85de441').fadeIn();

        } else {
            $('button[type="submit"]').hide();
        }
    });

    // Trigger the change event on page load to set initial state
    $('input[type="radio"]:checked').change();

    

</script>
const CategoryCard: React.FC<CategoryCardProps> = ({ name, icon: Icon }) => {
  return (
    <div className="flex h-14 w-full items-center justify-start rounded-2xl bg-frostWhite/80 px-4 shadow-md transition-shadow duration-300 hover:shadow-lg">
      <Icon className="text-[22px] text-gray-600" />
      <span className="ml-3 text-xl font-medium text-gray-800">{name}</span>
    </div>
  );
};



import { IconType } from "react-icons";
import {
  FaBolt,
  FaPalette,
  FaStar,
  FaLaptop,
  FaFont,
  FaCamera,
  FaGraduationCap,
  FaBlog,
  FaPodcast,
  FaBook,
  FaUniversalAccess,
  FaUsers,
  FaRobot,
  FaPencilRuler,
  FaMagic,
  FaPaintBrush,
  FaClipboardCheck,
  FaCode,
} from "react-icons/fa";

interface Category {
  id: string;
  name: string;
  icon: IconType;
}

export const categories: Category[] = [
  { id: "inspiration", name: "Inspiration", icon: FaBolt },
  { id: "illustrations", name: "Illustrations", icon: FaPalette },
  { id: "icons", name: "Icons", icon: FaStar },
  { id: "mockups", name: "Mockups", icon: FaLaptop },
];


#include <iostream>
#include <string>

using namespace std;

class Person {
private:
    string name;
    int age;
    string gender;

public:
    void setDetails(string n, int a, string g) {
        name = n;
        age = a;
        gender = g;
    }

    void displayDetails() {
        string uppercaseName = "";
        string uppercaseGender = "";

        for (char c : name) {
            uppercaseName += toupper(c);
        }

        for (char c : gender) {
            uppercaseGender += toupper(c);
        }

        cout << uppercaseName << " " << age << " " << uppercaseGender << endl;
    }
};

int main() {
    Person person;
    string name;
    int age;
    string gender;


    cin >> name;
 
    cin >> age;

    cin >> gender;

    person.setDetails(name, age, gender);
    person.displayDetails();

    return 0;
}
#include <iostream>
#include <string>

using namespace std;

class dayOfWeek {
public:
    int dayNumber;
    string dayName;

    void setDay(int n) {
        dayNumber = n;
        switch (dayNumber) {
            case 1: dayName = "Sunday"; break;
            case 2: dayName = "Monday"; break;
            case 3: dayName = "Tuesday"; break;
            case 4: dayName = "Wednesday"; break;
            case 5: dayName = "Thursday"; break;
            case 6: dayName = "Friday"; break;
            case 7: dayName = "Saturday"; break;
            case 0: dayName = "Weekend"; break;
            default: dayName = "Invalid"; break;
        }
    }

    void printDay() {
        cout << dayName << endl;
    }
};

int main() {
    dayOfWeek day;
    int dayNumber;

    cin >> dayNumber;

    day.setDay(dayNumber);
    day.printDay();

    return 0;
}
#include <iostream>
#include <cmath>

using namespace std;

int main() {
    long long binaryNumber;

    cin >> binaryNumber;

    long long decimalNumber = 0;
    int power = 0;

    while (binaryNumber != 0) {
        int digit = binaryNumber % 10;
        decimalNumber += digit * pow(2, power);
        binaryNumber /= 10;
        power++;
    }

    cout << "Decimal: " << decimalNumber << endl;

    return 0;
}
star

Thu Aug 29 2024 07:45:55 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:50 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:43 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:35 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:01 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:57 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:52 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:43 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:39 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:33 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:17 GMT+0000 (Coordinated Universal Time) undefined

@mikefried

star

Thu Aug 29 2024 07:43:59 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:43:51 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:43:47 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:42:17 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:42:15 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:42:06 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:42:03 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:41:50 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:33:00 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/npm-auto

@mikefried

star

Thu Aug 29 2024 07:32:06 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/npm-auto

@mikefried

star

Thu Aug 29 2024 05:45:40 GMT+0000 (Coordinated Universal Time)

@signup

star

Thu Aug 29 2024 04:46:36 GMT+0000 (Coordinated Universal Time) https://www.vishyat.com

@vishyattech

star

Thu Aug 29 2024 04:08:11 GMT+0000 (Coordinated Universal Time) https://jserd.springeropen.com/articles/10.1186/s40411-018-0058-0/figures/1

@WayneChung

star

Thu Aug 29 2024 03:59:30 GMT+0000 (Coordinated Universal Time)

@LizzyTheCatto

star

Thu Aug 29 2024 00:56:21 GMT+0000 (Coordinated Universal Time)

@WXAPAC

star

Wed Aug 28 2024 22:53:10 GMT+0000 (Coordinated Universal Time) https://2bit-ui.wavebeem.com/

@ThisIsKrystina

star

Wed Aug 28 2024 10:23:57 GMT+0000 (Coordinated Universal Time)

@vishalsingh21

star

Wed Aug 28 2024 10:10:06 GMT+0000 (Coordinated Universal Time)

@signup

star

Wed Aug 28 2024 10:10:06 GMT+0000 (Coordinated Universal Time)

@signup

star

Wed Aug 28 2024 10:01:33 GMT+0000 (Coordinated Universal Time)

@chatgpt #kotlin

star

Wed Aug 28 2024 07:16:45 GMT+0000 (Coordinated Universal Time)

@jackisKING79

star

Wed Aug 28 2024 06:15:28 GMT+0000 (Coordinated Universal Time)

@ahmad_raza #undefined

star

Wed Aug 28 2024 02:40:56 GMT+0000 (Coordinated Universal Time)

@LizzyTheCatto

star

Tue Aug 27 2024 21:50:30 GMT+0000 (Coordinated Universal Time)

@bfpulliam #react.js

star

Tue Aug 27 2024 20:03:23 GMT+0000 (Coordinated Universal Time) https://livesql.oracle.com/apex/f?p=590:43:16426940006981:::43:P43_ID:43352950296447187878627853347720280810&cs=38_D57ZtvJyXPSdCfGQby18sR-mNY4uX2DG5zeh-ycr9n6avfuX6sV_Sx5GRZVp6s-aMOQxo7PO9gi_zL54gjwA

@emir

star

Tue Aug 27 2024 20:02:40 GMT+0000 (Coordinated Universal Time) https://www.chuyentin.pro/2021/03/e-thi-chuyen-tin-khoi-thpt.html

@LizzyTheCatto

star

Tue Aug 27 2024 20:02:31 GMT+0000 (Coordinated Universal Time) https://drive.google.com/file/d/1PRbG2LEMaIaCSDGbWvGb_3URJxJcDhW8/view

@LizzyTheCatto

star

Tue Aug 27 2024 20:02:08 GMT+0000 (Coordinated Universal Time) https://www.chuyentin.pro/

@LizzyTheCatto

star

Tue Aug 27 2024 19:01:59 GMT+0000 (Coordinated Universal Time)

@Weslem

star

Tue Aug 27 2024 18:38:51 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/cpp-programming/online-compiler/

@LizzyTheCatto

star

Tue Aug 27 2024 18:38:31 GMT+0000 (Coordinated Universal Time)

@gbritgs

star

Tue Aug 27 2024 17:13:21 GMT+0000 (Coordinated Universal Time) https://codepen.io/pen/

@DKMitt #undefined

star

Tue Aug 27 2024 17:00:11 GMT+0000 (Coordinated Universal Time)

@Xyfer #c++

star

Tue Aug 27 2024 16:48:49 GMT+0000 (Coordinated Universal Time)

@defymavity #javascript

star

Tue Aug 27 2024 16:07:10 GMT+0000 (Coordinated Universal Time)

@asha #react

star

Tue Aug 27 2024 15:59:25 GMT+0000 (Coordinated Universal Time)

@Xyfer #c++

star

Tue Aug 27 2024 15:57:21 GMT+0000 (Coordinated Universal Time)

@Xyfer #c++

star

Tue Aug 27 2024 15:42:36 GMT+0000 (Coordinated Universal Time)

@Xyfer #c++

star

Tue Aug 27 2024 15:07:49 GMT+0000 (Coordinated Universal Time) https://phoenixnap.com/kb/mac-terminal-commands

@hmboyd #bash

Save snippets that work with our extensions

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