Snippets Collections
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowSecondsInSystemClock"=dword:00000001
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"HideRecommendedSection"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\current\device\Start]
"HideRecommendedSection"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\current\device\Education]
"IsEducationEnvironment"=dword:00000001
Starting a business in the cryptocurrency space felt like stepping into the future of finance. I had always dreamed of creating a platform that would empower people to trade digital assets securely and easily. The idea of launching my own crypto exchange was thrilling, but I had no clue where to start or which service would be the right fit for my vision.

When it comes to leading solution setters in the crypto world, Maticz is the one. I’m excited to share why I chose them as my development partner—and how they turned my uncertainty into success.

One of Maticz's clients had a similar story. He wanted to dive into the crypto arena and create something impactful, but like me, he had no clear idea about what service to develop or how to go about it. He spent months contacting different cryptocurrency development solution providers, seeking advice and looking for the perfect match. Each time, he felt like something was missing. The solutions seemed generic, and none of them really aligned with his vision for innovation.

That’s when he found Maticz.

From the first conversation, Maticz stood out. Their team didn’t just offer standard packages—they took the time to understand his ambitions, guiding him through the various options available in the crypto space. 

Whether it was launching a custom crypto exchange or creating a new digital token, Maticz’s expertise opened doors he never thought possible.

Working with Maticz felt like having a roadmap to success. They weren’t just building a product—they were shaping his startup’s future. Their crypto development solutions were tailored specifically to his needs, offering top-notch security, scalability, and user-friendly features. In just a few months, his dream of running a crypto exchange became a reality.

Thanks to Maticz, I’m confident that my journey will be just as rewarding. They are more than a service provider—they are true partners in success. Whether you’re a startup founder with no clear direction or an established business looking to expand, Maticz is the solution setter that can turn your vision into reality.
import java.util.*;

public class Dijkstra {

 
    public static void dijkstra(int[][] cost, int source) {
        int n = cost.length; 
        boolean[] visited = new boolean[n]; 
        double[] dist = new double[n]; 

        Arrays.fill(dist, Double.POSITIVE_INFINITY);
        dist[source] = 0.0; 

        for (int count = 0; count < n - 1; count++) {
           
            int u = minDistance(dist, visited);
            visited[u] = true; 

       
            for (int v = 0; v < n; v++) {
               
                if (!visited[v] && cost[u][v] != 0 && dist[u] != Double.POSITIVE_INFINITY
                        && dist[u] + cost[u][v] < dist[v]) {
                    dist[v] = dist[u] + cost[u][v];
                }
            }
        }


        printSolution(dist);
    }


    private static int minDistance(double[] dist, boolean[] visited) {
        double min = Double.POSITIVE_INFINITY;
        int minIndex = -1;

        for (int v = 0; v < dist.length; v++) {
            if (!visited[v] && dist[v] <= min) {
                min = dist[v];
                minIndex = v;
            }
        }
        return minIndex;
    }


    private static void printSolution(double[] dist) {
        System.out.println("Vertex Distance from Source");
        for (int i = 0; i < dist.length; i++) {
            System.out.println(i + " \t\t " + dist[i]);
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter the number of vertices: ");
        int n = scanner.nextInt();

   
        int[][] cost = new int[n][n];
        System.out.println("Enter the adjacency matrix (enter 0 for no edge):");
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                cost[i][j] = scanner.nextInt();
            }
        }

        System.out.print("Enter the source vertex (0 to " + (n - 1) + "): ");
        int source = scanner.nextInt();

  
        dijkstra(cost, source);

        scanner.close();
    }
}

output:
Enter the number of vertices: 5
Enter the adjacency matrix (enter 0 for no edge):
0 4 0 0 0
0 0 1 0 0
0 0 0 2 0
0 0 0 0 3
0 0 0 0 0
Enter the source vertex (0 to 4): 0
Vertex Distance from Source
0                0.0
1                4.0
2                5.0
3                7.0
4                10.0
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Wedding Planner</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            margin: 20px;
        }
        h2 {
            font-size: 24px;
        }
        img {
            width: 300px;
            height: auto;
        }
        #content {
            border: 2px solid red;
            padding: 10px;
            width: 500px;
            margin: 20px auto;
            text-align: left;
        }
        a {
            text-decoration: none;
            color: blue;
        }
    </style>
</head>
<body>

    <h2>Wedding Planner</h2>

    <img src="image.jpg" alt="Wedding Planner">

    <div id="content">
        A wedding planner is a professional who assists with the design, planning and management of 
        <a href="#" id="anchor" onclick="read()">more</a>
    </div>

    <script src="script.js"></script>
</body>
</html>







//script.js
function read() {
    var content = document.getElementById("content");
    var anchor = document.getElementById("anchor");

    if (anchor.innerHTML === "more") {
        content.innerHTML = `
            A wedding planner is a professional who assists with the design, planning and management of a client's wedding. Weddings are significant events in people's lives and as such, couples are often willing to spend considerable amount of money to ensure that their weddings are well-organized. Wedding planners are often used by couples who work long hours and have little spare time available for sourcing and managing wedding venues and wedding suppliers.<br><br>

            Professional wedding planners are based worldwide but the industry is the largest in the USA, India, western Europe and China. Various wedding planning courses are available to those who wish to pursue the career. Planners generally charge either a percentage of the total wedding cost, or a flat fee.<br><br>

            Planners are also popular with couples planning a destination wedding, where the documentation and paperwork can be complicated. Any country where a wedding is held requires different procedures depending on the nationality of each the bride and the groom. For instance, US citizens marrying in Italy require a Nulla Osta (affidavit sworn in front of the US consulate in Italy), plus an Atto Notorio (sworn in front of the Italian consulate in the US or at a court in Italy), and legalization of the above. Some countries instead have agreements and the couple can get their No Impediment forms from their local registrar and have it translated by the consulate in the country of the wedding. A local wedding planner can take care of the different procedures.<br><br>
            <a href="#" id="anchor" onclick="read()">less</a>
        `;
    } else {
        content.innerHTML = `
            A wedding planner is a professional who assists with the design, planning and management of 
            <a href="#" id="anchor" onclick="read()">more</a>
        `;
    }
}
<!DOCTYPE html>
<html>
<head>
    <title>Programming Contest</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            background-color: #f9f9f9;
        }
        h2 {
            margin-top: 20px;
        }
        .editor-container {
            display: inline-block;
            text-align: left;
            margin-top: 20px;
        }
        textarea {
            width: 500px;
            height: 200px;
            border: 2px solid red;
            padding: 10px;
            font-family: monospace;
        }
        .instructions {
            font-size: 14px;
            margin-right: 10px;
        }
    </style>
</head>
<body>

    <h2>Programming Contest</h2>

    <div class="editor-container">
        <label class="instructions">Type code here</label>
        <textarea id="editor" oncut="warning()" oncopy="warning()" onpaste="warning()">
#include<stdio.h>
int main() {
    printf("Hello World");
    return 0;
}
        </textarea>
    </div>

    <script>
        function warning() {
            alert('Cut/Copy/Paste is restricted.');
        }
    </script>

</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <title>Event Count for a Month</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f9f0e5;
            text-align: center;
        }
        .container {
            width: 400px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ccc;
            background-color: #fdf2e9;
        }
        .container h2 {
            text-align: center;
        }
        .container div {
            margin: 10px 0;
        }
        .container label {
            display: inline-block;
            width: 180px;
            text-align: left;
        }
        .container input {
            width: 150px;
            padding: 5px;
        }
        .container button {
            padding: 8px 16px;
            background-color: #d3d3d3;
            border: none;
            cursor: pointer;
        }
    </style>
</head>
<body>

<div class="container">
    <h2>Event count for a month</h2>
    <div>
        <label>Birthday party event:</label>
        <input type="number" id="event1" placeholder="Enter count">
    </div>
    <div>
        <label>Engagement parties event:</label>
        <input type="number" id="event2" placeholder="Enter count">
    </div>
    <div>
        <label>Corporate event:</label>
        <input type="number" id="event3" placeholder="Enter count">
    </div>
    <div>
        <label>Social Gathering event:</label>
        <input type="number" id="event4" placeholder="Enter count">
    </div>
    <div>
        <button id="button" onclick="maxevent()">Submit</button>
    </div>
    <div id="result"></div>
</div>

<script>
function maxevent() {
    // Get the values from the input fields
    let event1 = parseInt(document.getElementById('event1').value) || 0;
    let event2 = parseInt(document.getElementById('event2').value) || 0;
    let event3 = parseInt(document.getElementById('event3').value) || 0;
    let event4 = parseInt(document.getElementById('event4').value) || 0;

    // Find the maximum event count
    let maxCount = Math.max(event1, event2, event3, event4);
    let eventName = "";

    // Determine which event has the max count and set the name according to the expected format
    if (maxCount === event1) {
        eventName = "Birthday party";
    } else if (maxCount === event2) {
        eventName = "Engagement parties";
    } else if (maxCount === event3) {
        eventName = "Corporate";
    } else if (maxCount === event4) {
        eventName = "Social Gathering";
    }

    // Display the result in the expected format
    document.getElementById('result').innerHTML = "Maximum number of event occurred in this month is " + eventName;
}
</script>

</body>
</html>
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

class Item {
    int id;
    int weight;
    int profit;
    double cost;

    public Item(int id, int weight, int profit) {
        this.id = id;
        this.weight = weight;
        this.profit = profit;
        this.cost = (double) profit / weight;
    }
}

public class FractionalKnapsack {

    public static double fractionalKnapsack(Item[] items, int capacity, float[] solutionVector) {
        Arrays.sort(items, Comparator.comparingDouble(item -> -item.cost));

        double totalProfit = 0.0;
        for (Item item : items) {
            if (capacity == 0) {
                break;
            }
            if (item.weight <= capacity) {
                totalProfit += item.profit;
                capacity -= item.weight;
                solutionVector[item.id - 1] = 1.0f;
            } else {
                float fraction = (float) capacity / item.weight;
                totalProfit += item.profit * fraction;
                solutionVector[item.id - 1] = fraction;
                capacity = 0;
            }
        }
        return totalProfit;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter the number of items: ");
        int n = scanner.nextInt();
        System.out.print("Enter the capacity of the knapsack: ");
        int capacity = scanner.nextInt();

        Item[] items = new Item[n];
        float[] solutionVector = new float[n];

        for (int i = 0; i < n; i++) {
            System.out.print("Enter weight and profit of item " + (i + 1) + ": ");
            int weight = scanner.nextInt();
            int profit = scanner.nextInt();
            items[i] = new Item(i + 1, weight, profit);
            solutionVector[i] = 0.0f;
        }

        double maxProfit = fractionalKnapsack(items, capacity, solutionVector);
        System.out.printf("Maximum profit in Knapsack = %.2f\n", maxProfit);

        System.out.print("Solution vector (ID: fraction included): ");
        for (int i = 0; i < n; i++) {
            System.out.printf(" %d: %.2f ", items[i].id, solutionVector[i]);
        }
        System.out.println();

        
    }
}
import serial
import time

# Set up the serial connection to the SIM800 module
ser = serial.Serial('/dev/serial0', baudrate=9600, timeout=1)

def send_at_command(command, delay=1):
    """Send an AT command to the SIM800 module."""
    ser.write((command + '\r').encode())
    time.sleep(delay)
    reply = ser.read(ser.inWaiting()).decode()
    return reply

# Enable GPS
send_at_command("AT+CGNSPWR=1")

# Check GPS status (optional)
gps_status = send_at_command("AT+CGNSPWR?")
print("GPS Status: ", gps_status)

# Get the GPS location
location_data = send_at_command("AT+CGNSINF", delay=2)
print("Location Data: ", location_data)

ser.close()
<?php
require 'vendor/autoload.php';
use Firebase\JWT\JWT;
use Firebase\JWT\ExpiredException;

$key = "tu_clave_secreta"; // La misma clave utilizada para firmar el token

// Obtener el token del encabezado de la solicitud
$headers = getallheaders();
$token = isset($headers['Authorization']) ? str_replace('Bearer ', '', $headers['Authorization']) : null;

if ($token) {
    try {
        // Decodificar el token
        $decoded = JWT::decode($token, $key, ['HS256']);
        // Aquí puedes acceder a los datos del payload
        $userId = $decoded->sub; // ID del usuario (o cualquier otro dato del payload)
        
        // Validación exitosa
        echo json_encode(['message' => 'Token is valid', 'userId' => $userId]);
    } catch (ExpiredException $e) {
        // El token ha expirado
        http_response_code(401);
        echo json_encode(['message' => 'Token has expired']);
    } catch (Exception $e) {
        // El token no es válido
        http_response_code(401);
        echo json_encode(['message' => 'Invalid token']);
    }
} else {
    http_response_code(401);
    echo json_encode(['message' => 'No token provided']);
}
Get-ChildItem -path C:\Temp -Recurse -File | 
   Group-Object -property | Get-FileHash | Group-Object -property Hash | Where-Object { $_.count -gt 1 } | 
          ForEach-Object { $_.Group | Select-Object Path, Hash }
max_input_vars (default is 1000) set to 3000
post_max_size (default is “8M”) set to 2000M
upload_max_filesize (default is “2M”) set to 64M
max_execution_time (default is “30”) set to 180
max_input_time (default is “-1”) set to 180
memory_limit (default is “128M”) set to 3000M
							
/**
 * @author      Justus van den Berg (jfwberg@gmail.com)
 * @date        May 2022
 * @copyright   (c) 2024 Justus van den Berg
 * @license     MIT (See LICENSE file in the project root)
 * @description Execute anonymous script to test a dependency topological
 *              sort against all sObjects that have data in the org and their
 *              lookup fields. Sorted based on the required loading order.
 *              Please note this is just a quickly put together example script
 *              that can be optimised and customized.
 *
 * @use case    The main use case is to sort sObjects and their relationships to create
 *              the order of loading during data migrations or data restores
 * 
 * @relatedCode https://www.thiscodeworks.com/salesforce-apex-topological-sort-automatically-define-sobject-data-migration-loading-order/66fdbd5592e2590014ee4528
 * 
 * @blog        https://medium.com/@justusvandenberg/programmatically-find-the-order-to-load-salesforce-objects-in-a-data-migration-using-apex-1f65841531fb
 */

// Keep track of all objects that have been described
private Set<Schema.SObjectType> finishedSObjectTypes = new Set<Schema.SObjectType>{};

// Map to auto popuplate missing sObjects
private Set<Schema.SObjectType> missingSObjectTypes = new Set<Schema.SObjectType>{};

// The node dependency map
private Map<Schema.SObjectType, Set<Schema.SObjectType>> nodeDependenciesMap = new Map<Schema.SObjectType,Set<Schema.SObjectType>>();

// List of sObjects, generate this automatically
// Update this value to a custom list if you want to manually specify what sObject you want added
String[] sObjectNames = getSObjectsThatHaveData();

// Execute the main logic
populateSObjectNodes(sObjectNames);

// Populate the dependencies
populateDependencies();

// Convert all the schema classes to strings
Map<Object, Set<Object>> convertedNodeDepencyMap = convertSchemaMapToObjectMap();

// Execute the topological search against all sObjects that have data in them
Set<SortUtil.Node> sortedNodeList = SortUtil.topologicalSort(convertSchemaMapToObjectMap());

// Output the results of the topological search
System.debug(JSON.serializePretty(sortedNodeList,true));

// Output the objects and their related objects (this is to verify the sObjects)
System.debug(JSON.serializePretty(convertedNodeDepencyMap, true));


/**
 * @description Method that calls the limits API and gets all objects and their record cound
 *              Add the records with a count > 0 to the output list
 * @return      A list of all SObjects that contain records
 */
private String[] getSObjectsThatHaveData(){

    // List of the output sObjects
    String[] sObjectsWithData = new String[]{};

    // Create new request
    Http http = new Http();
    HttpRequest request = new HttpRequest();
    request.setEndpoint(URL.getOrgDomainUrl().toExternalForm() + '/services/data/v61.0/limits/recordCount');
    request.setMethod('GET');
    request.setHeader('Content-Type', 'application/json;charset=UTF-8');
    request.setHeader('Authorization', 'Bearer ' + userInfo.getSessionId());
    HttpResponse response = http.send(request);

    // Check response code
    if (response.getStatusCode() != 200) {
        throw new StringException(response.getBody());
    }

    // Populate storage list, note fasted JSON parsing happens when directly going into a constructor instead of creating a variable assignment first
    for(Object obj : (Object[]) ((Map<String, Object>) JSON.deserializeUntyped(response.getBody())).get('sObjects')){
        
        Map<String,Object> objMap = (Map<String,Object>) obj;

        if( (Integer)objMap.get('count') > 0){
            sObjectsWithData.add((String) objMap.get('name'));
        }
       
    }

    // return the list with data
    return sObjectsWithData;
}


/**
 * @description Method to popualate the sObject nodes
 * @param sObjectName A list of sObject API Names
 */
private void populateSObjectNodes(String[] sObjectNames){
    // Create the base map with empty sObject dependency sets
    for(String sObjectName : sObjectNames){
        
        // Describe the sObject
        Schema.DescribeSObjectResult dsor = ( (SObject) Type.forName('Schema.' + sObjectName).newInstance()).getSObjectType().getDescribe();
        
        // We only want writable and updateable sObjects that have a keyprefix
        // otherwise we cannot load the data, so skip otherwise
        if(dsor.createable == false || dsor.updateable == false || dsor.keyprefix == null){
            continue;
        }

        // Populate the node dependencies map
        nodeDependenciesMap.put(
            dsor.sobjecttype,
            new Set<Schema.SObjectType>{}
        );
    }
}


/**
 * @description Method to popualate the sObject dependencies recursively
 */
private void populateDependencies(){
    
    // Iterate all the object types in the dependencies map
    for(Schema.SObjectType sot : nodeDependenciesMap.keySet()){

        // Only describe sObjects once
        if(finishedSObjectTypes.contains(sot)){
            continue;
        }

        for(Schema.SObjectField sof :  sot.getDescribe().fields.getMap().values()){
            
            // Describe the field
            Schema.DescribeFieldResult dfr = sof.getDescribe();
            
            // Skip everything except lookup fields
            if(dfr.type != Schema.DisplayType.REFERENCE){
                continue;
            }

            // Get the object describe
            Schema.DescribeSObjectResult dsor = dfr.referenceto[0].getDescribe();

            // Also for the related describes we only want writable objects
            // This filteres out things like history objects and RecordTypes
            if(dsor.createable == false || dsor.updateable == false || dsor.keyprefix == null){
                continue;
            }

            // Add the lookup field as a depencency
            nodeDependenciesMap.get(sot).add(dsor.sobjecttype);
            
            // Dependency is missing, so add it that we can add it later
            if(!nodeDependenciesMap.containsKey(dsor.sobjecttype)){
                nodeDependenciesMap.put(dsor.sobjecttype, new Set<Schema.SObjectType>{});
                missingSObjectTypes.add(dsor.sobjecttype);
            }

            // If the the sot has been added so can be removed from the missing SOTs
            if(missingSObjectTypes.contains(sot)){
                missingSObjectTypes.remove(sot);
            }
        }

        // Flat that sObject describe has finished
        finishedSObjectTypes.add(sot);
    }

    // Recursively call self
    if(!missingSObjectTypes.isEmpty()){
        populateDependencies();
    }
}


/**
 * @description Method to convert all Schema.SObjectTypes to Strings
 *              Fixes the "bug" where the self reference should not 
 *              be the first dependency
 * @return      A node/depencency map (object,Set<Object>)
 */
private Map<Object,Set<Object>> convertSchemaMapToObjectMap(){
    
    // Output map
    Map<Object,Set<Object>> objectMap = new Map<Object,Set<Object>>();
    
    // Add the string values for each sObject
    for(Schema.SObjectType sot : nodeDependenciesMap.keySet()){
        
        // Set for holding the dependencies
        Set<Object> dependencies = new Set<Object>{};
        
        // Counter
        Integer i = 0;

        // Indicate if relationship to self needs to be added to the end
        // This fixes a bug where if the first dependency is to itself all other get ignored.
        Boolean addSelfToEnd = false;

        // Convert dependencies
        for(Schema.SObjectType dependency : nodeDependenciesMap.get(sot)){
            if(i==0 && (dependency == sot)){
                addSelfToEnd = true;
                i++;
                continue;
            }
            
            dependencies.add(String.valueOf(dependency));
            i++;
        }

        // Add self to end of dependencies
        if(addSelfToEnd){
            dependencies.add(String.valueOf(sot));
            addSelfToEnd = false;
        }

        // Add the object type and dependencies
        objectMap.put(String.valueOf(sot),dependencies);
    }

    // Return the converted map
    return objectMap;
}
/**
 * @author      Justus van den Berg (jfwberg@gmail.com)
 * @date        May 2022
 * @copyright   (c) 2024 Justus van den Berg
 * @license     MIT (See LICENSE file in the project root)
 * @description Class contains a basic topological (graph) sort algorithm for Apex
 *              It's not 100% perfect, but does the job for most simple graph sorts.
 *              It has two additional methods, one for creating an ordered list of all
 *              nodes in the graph sorted by dependency and a second one to create
 *              a report of any errors or issues with the graph
 *
 * @use case    The main use case is to sort sObjects and their relationships to create
 *              the order of loading during data migrations or data restores
 * 
 * @relatedCode https://www.thiscodeworks.com/salesforce-apex-get-all-sobjects-with-data-and-sort-them-topologically/66fdbe1192e2590014ee4673
 * @blog        https://medium.com/@justusvandenberg/programmatically-find-the-order-to-load-salesforce-objects-in-a-data-migration-using-apex-1f65841531fb
 */
@SuppressWarnings('PMD.ExcessiveParameterList')
public with sharing class SortUtil {
 
    // Warning message templates
    private static final String SELF_DEPENDENCY_WARNING	   = 'Node "{0}" has a dependency on itself';
    private static final String DUO_DEPENDENCY_WARNING	   = 'Node "{0}" and "{1}" have a dependency on each other.';
    private static final String CYL_DEPENDENCY_WARNING	   = 'Node "{0}" has a cylindrical relationship on path "{1}".';
    private static final String MISSING_DEPENDENCY_WARNING = 'Node "{0}" depends on node "{1}" but Node "{1}" does not exist in the dependencies Map';
 
    // Create a map to hold any warnings
    private static Map<Object, String[]> warningMap = new Map<Object, String[]>();
 
 
    /**
     * @description Sort a graph topologically
     * @param nodeDependenciesMap the map containing the node and all of it's dependencies
     * @return      A sorted list of the nodes based on the dependency
     */
    public static Set<Node> topologicalSort(Map<Object,Set<Object>> nodeDependenciesMap){
        
        // Validate graph first to create the initial warning messages
        // Execute the topological sorting and return the details
        return new TopologicalSort(
            nodeDependenciesMap,
            validateGraph(nodeDependenciesMap)
        ).getSortedResult();
    }
 
 
    /**
     * @description A methods that analyses the data map and generates
     *              warnings for missing, circular or self dependencies
     * @param nodeDependenciesMap The main node/dependencies map
     * @return      A map with (potential) warnings for each node
     */
    private static Map<Object, String[]> validateGraph(Map<Object,Set<Object>> nodeDependenciesMap){
 
        // Iterate each node
        for(Object node : nodeDependenciesMap.keySet()){
 
            for(Object dependency : nodeDependenciesMap.get(node)){
 
                // If a referenced dependency does not exist in the data map add a warning
                if(!nodeDependenciesMap.containsKey(dependency)){
                    addWarning(
                        node, 
                        String.format(MISSING_DEPENDENCY_WARNING, new String[]{
                            node.toString(),
                            dependency.toString()
                        })
                    );
                    
                    // If the depended node does not exists in the data map there is no point to check for self or circular dependencies
                    // so continue to the next dependency
                    continue;
                }
 
                // If there is a dependency to the same node, add a warning
                if(node == dependency){
                    addWarning(
                        node,
                        String.format(
                            SELF_DEPENDENCY_WARNING,
                            new String[]{node.toString()}
                        )
                    );
 
                    // If the depended node is self referencing, there is no need to look for a duo dependency as
                    // technically it already is a duo reference
                    continue;
                }
                    
                // If there is a duo dependency between the dependency and the node, add a warning message (ie they point at each other)
                if(nodeDependenciesMap.get(dependency).contains(node)){
                    addWarning(
                        node,
                        String.format(
                            DUO_DEPENDENCY_WARNING,
                            new String[]{node.toString(),dependency.toString()}
                        )
                    );
                }
            }
        }
        return warningMap;
    }
 
 
    /**
     * @description Method that adds a warning to a specific node in the warning maps
     * @param node       The node object
     * @param warning    The warning message
     */
    private static void addWarning(Object node, String warning){
        
        // Create new map entry if it doesn't exist
        if(!warningMap.containsKey(node)){
           warningMap.put(node,new String[]{});
        }
 
        // Add warning to the map
        warningMap.get(node).add(warning);
    }
 
 
    /**
     * description Class to perform a topological sort
     */
    private with sharing class TopologicalSort{
        
        // Start the order for the nodes. We use a zro index so start at -1
        private Integer nodeOrder = -1;
 
        // A set with the sorted result
        private transient Set<Node> sortedResult = new Set<Node>{};
 
        // The map containing the warnings
        private transient Map<Object, String[]> warningsMap = new Map<Object, String[]>();
 
 
        /**
         * @description Constructor that that the map with nodes and their dependencies
         * @param nodeDependenciesMap The main input node / dependencies map
         * @param warningsMap         The map containing the warning messages
         */
        private TopologicalSort(Map<Object, Set<Object>> nodeDependenciesMap, Map<Object, String[]> warningsMap){
            
            // Assign the warning map
            this.warningsMap = warningsMap;
 
            // Start the sorting
            visit(
                nodeDependenciesMap,
                nodeDependenciesMap.keySet(),
                new Set<Object>{},
                new Set<Object>{},
                ''
            );
        }
 
 
        /**
         * @description Method to get the sorted results
         * @return The result from the topological sort
         */
        private Set<Node> getSortedResult(){
            return this.sortedResult;
        }
 
 
        /**
         * @description Method to pass through i.e. visit each node in the graph
         * @param nodeDependenciesMap The main map with the nodes and their dependencies
         * @param dependencies        The dependencies for this specific node
         * @param dead                Set with nodes that have been visited
         * @param pending             Set with nodes that have not been visited
         * @param nodePath            The path that has led to the node
         */
        @SuppressWarnings('PMD.CognitiveComplexity')
        private void visit(Map<Object,Set<Object>> nodeDependenciesMap, Set<Object> dependencies, Set<Object> dead, Set<Object> pending, String nodePath ){
            
            // If there are no dependencies nothing needs to happen
            if(dependencies == null){return;}
            
            // Check all dependencies for this node
            for(Object node : dependencies){
 
                String childNodePath = nodePath + (!String.isBlank(nodePath) ? + '.' : '') + node;
                
                // If the node has not been visited before
                if(!dead.contains(node)){
                    if (!pending.contains(node)){
                        pending.add(node);
                    }else{
                        // Circular relationship
                        addWarning(
                            node,
                            String.format(
                                CYL_DEPENDENCY_WARNING,
                                new String[]{node.toString(),childNodePath}
                            )
                        );
                        return;
                    }
 
                    // recursively call this function for every child of the current node
                    visit(nodeDependenciesMap, nodeDependenciesMap.get(node), dead, pending, childNodePath);
 
                    // If the node is still pending, remove it
                    if (pending.contains(node)){
                        pending.remove(node);
                    }
 
                    // Indicate that this node has been visited
                    dead.add(node);
 
                    // Increment the order, it starts at -1, so the first node will be 0
                    this.nodeOrder++;
 
                    // Add the node to the end of the sorted list
                    this.sortedResult.add(new Node(
                        this.nodeOrder,
                        node,
                        childNodePath.split('\\.').size() -1,
                        childNodePath,
                        this.warningsMap.get(node)
                    ));   
                }
            }
        }
    }
 
 
    /**
     * @description Class that represents a node in a graph that can be topologically sorted
     */
    @SuppressWarnings('PMD.ExcessiveParameterList')
    public with sharing class Node implements comparable{
        
        // Public variables
        public Integer  order;
        public Object   node;
        public Integer  depth;
        public String   path;
        public String[] warnings;
 
        /**
         * @description The main constructor
         * @param order     The order in the graph
         * @param node      The node itself
         * @param depth     The node depth
         * @param path      The path it took to get to the node
         * @param warnings  List of warnings for the node
         */
        
        public Node(Integer order, Object node, Integer depth, String path, String[] warnings){
            this.order    = order;
            this.node     = node;
            this.depth    = depth;
            this.path     = path;
            this.warnings = warnings;
        }
 
        /**
         * @description Interface for compare method to sort based on order
         * @param compareTo The Node to compare against
         * @return      -1,0 or 1
         */
        public Integer compareTo (Object compareTo) {
            return (this.order > ((Node)compareTo).order) ? 1 : (this.order < ((Node)compareTo).order) ? -1 : 0;
        }
    }
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":genea::genea-mobile-access: Genea Mobile Access Denver :genea::genea-mobile-access:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "rich_text",
			"elements": [
				{
					"type": "rich_text_section",
					"elements": [
						{
							"type": "text",
							"text": "Today WX have a super important announcement for you all: We are transforming the way our Xeros access the Denver office starting "
						},
						{
							"type": "text",
							"text": "Monday, October 14th",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "!"
						}
					]
				}
			]
		},
		{
			"type": "divider"
		},
		{
			"type": "rich_text",
			"elements": [
				{
					"type": "rich_text_section",
					"elements": [
						{
							"type": "emoji",
							"name": "iphone",
							"unicode": "1f4f1"
						},
						{
							"type": "text",
							"text": " Good news, Denver! We’re moving away from physical access card fobs (mostly) and upgrading to mobile credentials. That means all you’ll need to get through Xero’s doors is your phone!\n"
						},
						{
							"type": "text",
							"text": "Keep your access card",
							"style": {
								"bold": true,
								"code": true
							}
						},
						{
							"type": "text",
							"text": " though—you'll still need it during off-hours, bike parking, and shower as the building's system isn't Genea compatible.",
							"style": {
								"code": true
							}
						},
						{
							"type": "text",
							"text": "\n\n\n"
						},
						{
							"type": "emoji",
							"name": "gmail-new",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "  Watch for an email",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " from Genea Support with a link to download the"
						},
						{
							"type": "text",
							"text": " Genea Mobile Access app",
							"style": {
								"bold": true,
								"italic": true
							}
						},
						{
							"type": "text",
							"text": ". Just follow the steps and sign in with your Xero SSO to set up your mobile key.\n\n\n"
						},
						{
							"type": "emoji",
							"name": "apple-sad",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "  iPhone users:",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " You may need to have the app open for a seamless entry, though the Toronto pilot users reported no issues!\n\n\n"
						},
						{
							"type": "emoji",
							"name": "wx"
						},
						{
							"type": "text",
							"text": " "
						},
						{
							"type": "text",
							"text": "After hours:",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " Elevators are unlocked from "
						},
						{
							"type": "text",
							"text": "8 AM to 5 PM",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": ", and office hours are "
						},
						{
							"type": "text",
							"text": "5 AM to 9 PM",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": ". A "
						},
						{
							"type": "text",
							"text": "Genea 2FA ",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "pin will be required for office access before "
						},
						{
							"type": "text",
							"text": "7 AM or after 7 PM",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": ". The building’s exterior doors are locked from "
						},
						{
							"type": "text",
							"text": "6 PM to 6 AM",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "—use your building access card.\n\n\n"
						},
						{
							"type": "emoji",
							"name": "earth_americas",
							"unicode": "1f30e"
						},
						{
							"type": "text",
							"text": "  "
						},
						{
							"type": "text",
							"text": "Genea Mobile",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " works in Denver, Toronto, San Mateo, London, and all Southern Hemisphere offices (except Canberra).\n\n\n"
						},
						{
							"type": "emoji",
							"name": "lock",
							"unicode": "1f512"
						},
						{
							"type": "text",
							"text": "  "
						},
						{
							"type": "text",
							"text": "Xero offices",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " are closed from "
						},
						{
							"type": "text",
							"text": "9 PM to 5 AM globally",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": ". To access outside those times, please submit a request to "
						},
						{
							"type": "link",
							"url": "https://xerohelp.zendesk.com/hc/en-us/requests/new?ticket_form_id=900001672246",
							"text": "WX"
						},
						{
							"type": "text",
							"text": ".\n\n\n"
						},
						{
							"type": "emoji",
							"name": "bulb",
							"unicode": "1f4a1"
						},
						{
							"type": "text",
							"text": " "
						},
						{
							"type": "text",
							"text": "For more info,",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " check out the new "
						},
						{
							"type": "link",
							"url": "https://xerohelp.zendesk.com/hc/en-us/articles/4414408043161-Access-the-Xero-office",
							"text": "Genea Mobile Access doc"
						},
						{
							"type": "text",
							"text": " on the Help Centre or reach out to "
						},
						{
							"type": "link",
							"url": "https://xerohelp.zendesk.com/hc/en-us/requests/new?ticket_form_id=900001672246",
							"text": "WX"
						},
						{
							"type": "text",
							"text": " with any questions."
						}
					]
				}
			]
		},
		{
			"type": "divider"
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":powerup-shroom: Boost Day Thursday, October 3rd :powerup-shroom:",
				"emoji": true
			}
		},
		{
			"type": "rich_text",
			"elements": [
				{
					"type": "rich_text_section",
					"elements": [
						{
							"type": "text",
							"text": "Hi everyone,\n\nPower up with these Boost Day perks!\n\n"
						},
						{
							"type": "emoji",
							"name": "coffee",
							"unicode": "2615"
						},
						{
							"type": "text",
							"text": " Xero Cafe: ",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "Enjoy coffee and café-style beverages from our partner, Blue Sparrow, by showing your Xero ID\n"
						},
						{
							"type": "text",
							"text": "Be sure to hit the tip button before you walk away.",
							"style": {
								"code": true
							}
						},
						{
							"type": "text",
							"text": "\n\n\n"
						},
						{
							"type": "emoji",
							"name": "burrito",
							"unicode": "1f32f",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " Lunch",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": ": "
						},
						{
							"type": "text",
							"text": "Cuba Cuba ",
							"style": {
								"bold": true,
								"italic": true
							}
						},
						{
							"type": "emoji",
							"name": "flag-cu",
							"unicode": "1f1e8-1f1fa",
							"style": {
								"bold": true,
								"italic": true
							}
						},
						{
							"type": "text",
							"text": " ",
							"style": {
								"bold": true,
								"italic": true
							}
						},
						{
							"type": "text",
							"text": "sponsored by LOS XEROS ERG",
							"style": {
								"italic": true
							}
						}
					]
				}
			]
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":powerup-shroom: Boost Day Tuesday, October 1st :powerup-shroom:",
				"emoji": true
			}
		},
		{
			"type": "rich_text",
			"elements": [
				{
					"type": "rich_text_section",
					"elements": [
						{
							"type": "text",
							"text": "Hi everyone,\n\nPower up with these Boost Day perks!\n\n"
						},
						{
							"type": "emoji",
							"name": "coffee",
							"unicode": "2615"
						},
						{
							"type": "text",
							"text": " Xero Cafe: ",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "Grab your coffee from Blue Sparrow!\n"
						},
						{
							"type": "text",
							"text": "Be sure to hit the tip button before you walk away.",
							"style": {
								"code": true
							}
						},
						{
							"type": "text",
							"text": "\n\n\n"
						},
						{
							"type": "emoji",
							"name": "breakfast_smile"
						},
						{
							"type": "text",
							"text": " "
						},
						{
							"type": "text",
							"text": "Breakfast: ",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": "In honor of Hispanic Heritage Month "
						},
						{
							"type": "emoji",
							"name": "hispanic-heritage-month_sticker_06"
						},
						{
							"type": "text",
							"text": "Los Xero's ERG is sponsoring Boost Day breakfast from "
						},
						{
							"type": "text",
							"text": "Lazo Empanadas",
							"style": {
								"italic": true
							}
						},
						{
							"type": "text",
							"text": "!\n\n\n"
						},
						{
							"type": "emoji",
							"name": "chipotle",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": " Lunch",
							"style": {
								"bold": true
							}
						},
						{
							"type": "text",
							"text": ": Hackathon is sponsoring Boost Day lunch from "
						},
						{
							"type": "text",
							"text": "Chipotle",
							"style": {
								"italic": true
							}
						},
						{
							"type": "text",
							"text": "."
						}
					]
				}
			]
		}
	]
}
Table.TransformColumns( #"Filtered rows 1", {{"crb3f_ic_link", each Text.Select(_, {"A".."Z", "a".."z", "0".."9", ";"}), type text}})
#include <iostream>

using namespace std;

class Node 
{
public:
    int data;       // Data stored in the node
    Node* next;     // Pointer to the next node in the list
};

// Function to detect a loop in a linked list
bool detectCycle(Node* head) 
{
    Node* slow = head;
    Node* fast = head;
    
    while(fast != nullptr && fast->next != nullptr)
    {
        if(fast == nullptr)
            return false;
            
        slow = slow->next;
        fast = fast->next->next;
        
        if(slow == fast)
            return true;
    }
}

int main() 
{
    Node* head = new Node();
    Node* second = new Node();
    Node* third = new Node();
    Node* fourth = new Node();
    Node* fifth = new Node();

    head->data = 1;
    head->next = second;
    second->data = 2;
    second->next = third;
    third->data = 3;
    third->next = fourth;
    fourth->data = 4;
    fourth->next = fifth;
    fifth->data = 5;
    fifth->next = third; 
    
    if (detectCycle(head)) 
    {
        cout << "Loop detected in the linked list." << endl;
    }
    else 
    {
        cout << "No loop detected in the linked list." << endl;
    }
    
    delete head;
    delete second;
    delete third;
    delete fourth;
    delete fifth;
    
    //--------------------------New input set------------------------//
    
    /*Node* head = new Node(); 
    Node* second = new Node(); 
    Node* third = new Node(); 
    
    head->data = 1; 
    head->next = second; 
    second->data = 2; 
    second->next = third; 
    third->data = 3; 
    third->next = nullptr;
    
    if (detectCycle(head)) 
    {
        cout << "Loop detected in the linked list." << endl;
    }
    else 
    {
        cout << "No loop detected in the linked list." << endl;
    }
    
    delete head;
    delete second;
    delete third;*/
    
    //--------------------------New input set------------------------//

    /*Node* head = new Node(); 
    head->data = 1; 
    head->next = head;
    
    if (detectCycle(head)) 
    {
        cout << "Loop detected in the linked list." << endl;
    }
    else 
    {
        cout << "No loop detected in the linked list." << endl;
    }
    
    delete head;*/

    return 0;
}
$ docker build .

[+] Building 3.5s (11/11) FINISHED

...



1 warning found (use --debug to expand):

  - Lint Rule 'JSONArgsRecommended': JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 7)
#include <iostream>
using namespace std;

struct Node 
{
    int data;
    Node* next;
    
    Node(int value) : data(value), next(nullptr) {}
};

class CircularLinkedList 
{
private:
    Node* head_node;

public:
    CircularLinkedList() : head_node(nullptr) {}

    //insert a node at the end of the list
    void insertAtEnd(int value) 
    {
        Node* newNode = new Node(value);
        
        if (!head_node) 
        {
            head_node = newNode;
            head_node->next = head_node;
        } 
        else
        {
            Node* temp = head_node;
            while (temp->next != head_node) 
            {
                temp = temp->next;
            }
            temp->next = newNode;
            newNode->next = head_node;
        }
    }

    //insert a node at the beginning of the list
    void insertAtBeginning(int value) 
    {
        Node* newNode = new Node(value);
        
        if (!head_node) 
        {
            head_node = newNode;
            head_node->next = head_node;
        } 
        else 
        {
            Node* temp = head_node;
            
            while (temp->next != head_node)
            {
                temp = temp->next;
            }
            
            newNode->next = head_node;
            temp->next = newNode;
            head_node = newNode;
        }
    }

    //delete a node from the end of the list
    void deleteFromEnd()
    {
        if (!head_node) 
            return;
        
        if (head_node->next == head_node) 
        {
            delete head_node;
            head_node = nullptr;
        } 
        else 
        {
            Node* temp = head_node;
            Node* prev = nullptr;
            
            while (temp->next != head_node)
            {
                prev = temp;
                temp = temp->next;
            }
            
            prev->next = head_node;
            delete(temp);
        }
    }

    //delete a node from the beginning of the list
    void deleteFromBeginning() 
    {
        if (!head_node) 
        return;
        
        if (head_node->next == head_node) 
        {
            delete(head_node);
            head_node = nullptr;
        } 
        else 
        {
            Node* temp = head_node;
            Node* tail = head_node;
            
            while (tail->next != head_node)
            {
                tail = tail->next;
            }
            
            head_node = head_node->next;
            tail->next = head_node;
            delete(temp);
        }
    }

    //traverse and print the list
    void traverse() 
    {
        if (!head_node) 
        {
            cout << "List is empty." << endl;
            return;
        }
        
        Node* temp = head_node;
        
        do
        {
            cout << temp->data << " ";
            temp = temp->next;
        } while (temp != head_node);
        
        cout << endl;
    }

    //find and print the middle node
    void findTheMiddle()
    {
        if (!head_node) 
        return;

        Node* slow = head_node;
        Node* fast = head_node;

        while (fast->next != head_node && fast->next->next != head_node)
        {
            slow = slow->next;
            fast = fast->next->next;
        }

        cout << "Middle node data: " << slow->data << endl;
    }

    //insert a node at a given index
    void insertAtIndex(int index, int value) 
    {
        if (index == 0) 
        {
            insertAtBeginning(value);
            return;
        }

        Node* newNode = new Node(value);
        Node* temp = head_node;
        
        for (int i = 0; i < index - 1 && temp->next != head_node; i++) 
        {
            temp = temp->next;
        }
        
        newNode->next = temp->next;
        temp->next = newNode;
    }

    //delete a node from a given index
    void deleteFromIndex(int index) 
    {
        if (index == 0) 
        {
            deleteFromBeginning();
            return;
        }

        Node* temp = head_node;
        Node* prev = nullptr;
        for (int i = 0; i < index && temp->next != head_node; i++)
        {
            prev = temp;
            temp = temp->next;
        }

        if (prev != nullptr) 
        {
            prev->next = temp->next;
            delete(temp);
        }
    }

    //reverse the circular linked list
    void reverse()
    {
        if (!head_node) 
            return;

        Node* prev = nullptr;
        Node* current = head_node;
        Node* next = nullptr;
        Node* tail = head_node;

        while (tail->next != head_node) 
        {
            tail = tail->next;
        }

        do 
        {
            next = current->next;
            current->next = prev;
            prev = current;
            current = next;
        } while (current != head_node);

        tail->next = prev;
        head_node->next = prev;
        head_node = prev;
    }
};

int main() 
{
    CircularLinkedList circular_linked_list;

    circular_linked_list.insertAtEnd(11);
    circular_linked_list.insertAtEnd(221);
    circular_linked_list.insertAtEnd(34);
    circular_linked_list.insertAtBeginning(0);
    circular_linked_list.traverse();

    circular_linked_list.deleteFromEnd();
    circular_linked_list.traverse();

    circular_linked_list.findTheMiddle();

    circular_linked_list.insertAtIndex(1, 5);
    circular_linked_list.traverse();

    circular_linked_list.deleteFromIndex(2);
    circular_linked_list.traverse();

    circular_linked_list.reverse();
    circular_linked_list.traverse();

    return 0;
}
// First, store table names in a variable
LET vTableList = '';

FOR i = 0 to NoOfTables() - 1
    LET vTable = TableName($(i));
    IF '$(vTable)' <> '$(t)' THEN
        TRACE 'Adding Table: $(vTable)';
        LET vTableList = If(len(vTableList)>0, '$(vTableList)|', '') & '$(vTable)';
    ENDIF;
NEXT i;

// Drop tables outside the initial loop
LET vTableCount = SubStringCount('$(vTableList)', '|') + 1;
FOR i = 1 to $(vTableCount)
    LET vDropTable = SubField('$(vTableList)', '|', $(i));
    TRACE 'Dropping Table: $(vDropTable)';
    DROP TABLE [$(vDropTable)];
NEXT

Sub PreencherColuna1()
    Dim ultimaLinha As Long
    Dim linhaAtual As Long
    Dim palavras() As String
    Dim abreviacao As String
    
    ' Define a última linha com dados na coluna 2 (B)
    ultimaLinha = Cells(Rows.Count, 2).End(xlUp).Row
    
    ' Percorre cada linha da coluna 2
    For linhaAtual = 1 To ultimaLinha
        ' Verifica se a célula da coluna 1 está vazia
        If Cells(linhaAtual, 1).Value = "" Then
            ' Divide o conteúdo da célula na coluna 2 em palavras
            palavras = Split(Cells(linhaAtual, 2).Value, " ")
            
            ' Limpa a abreviação para cada linha
            abreviacao = ""
            
            Select Case UBound(palavras)
                Case 0 ' Uma palavra
                    abreviacao = Left(palavras(0), 4)
                Case 1 ' Duas palavras
                    abreviacao = Left(palavras(0), 2) & Left(palavras(1), 2)
                Case 2 ' Três palavras
                    abreviacao = Left(palavras(0), 1) & Left(palavras(1), 1) & Left(palavras(2), 2)
                Case Else ' Quatro ou mais palavras
                    abreviacao = Left(palavras(0), 1) & Left(palavras(1), 1) & Left(palavras(2), 1) & Left(palavras(3), 1)
            End Select
            
            ' Preenche a coluna 1 com a abreviação
            Cells(linhaAtual, 1).Value = UCase(abreviacao)
        End If
    Next linhaAtual
End Sub
Sub VerificarDuplicados()
    Dim UltimaLinha As Long
    Dim Coluna As Range
    Dim Celula As Range
    Dim Duplicados As Collection
    
    ' Define a coluna que você quer verificar (exemplo: coluna A)
    Set Coluna = ThisWorkbook.Sheets("Planilha1").Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
    
    ' Cria uma coleção para armazenar os valores únicos
    Set Duplicados = New Collection
    
    On Error Resume Next
    For Each Celula In Coluna
        ' Tenta adicionar o valor à coleção
        Duplicados.Add Celula.Value, CStr(Celula.Value)
        
        ' Se o valor já existir na coleção, ele será duplicado
        If Err.Number <> 0 Then
            ' Destaque as células duplicadas
            Celula.Interior.Color = vbYellow
            Err.Clear
        End If
    Next Celula
    On Error GoTo 0
End Sub
curl \
  -H 'Content-Type: application/json' \
  -d '{"contents":[{"parts":[{"text":"Explain how AI works"}]}]}' \
  -X POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=YOUR_API_KEY'
const axios = require('axios');

async function fetchDataWithRetry(url, retries = 3) {
  try {
    const response = await axios.get(url);
    console.log('Data fetched:', response.data);
  } catch (err) {
    if (retries > 0) {
      console.log(`Retrying... Attempts left: ${retries}`);
      await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait 1 second before retrying
      return fetchDataWithRetry(url, retries - 1); // Retry the API call
    } else {
      console.error('Failed after retries:', err.message);
    }
  }
}

fetchDataWithRetry('https://jsonplaceholder.typicode.com/posts');
const fs = require('fs');

// Async
fs.writeFile('example.txt', 'Hello, world!', (err) => {
  if (err) {
    console.error('Error writing file:', err.message);
    return;
  }
  console.log('File written successfully');
});

// Sync
try {
  fs.writeFileSync('example.txt', 'Hello, world!');
  console.log('File written successfully');
} catch (err) {
  console.error('Error writing file:', err.message);
}
const fs = require('fs');

// Async
fs.readFile('example.txt', 'utf8', (err, data) => {
  if (err) {
    console.error('Error reading file:', err.message);
    return;
  }
  console.log('File content:', data);
});

// Sync
try {
  const data = fs.readFileSync('example.txt', 'utf8');
  console.log('File content:', data);
} catch (err) {
  console.error('Error reading file:', err.message);
}
const axios = require('axios');

async function fetchData(url) {
  try {
    const response = await axios.get(url); // Make an API call
    console.log('Data fetched successfully:', response.data); // Handle success
  } catch (error) {
    console.error('Error fetching data:', error.message); // Handle error
  }
}
var numWaterBottles = function(numBottles, numExchange) {
    let drinked = 0;
    let empty = 0;
    while (numBottles + empty >= numExchange) {
        drinked += numBottles; 
        empty += numBottles;
        numBottles = Math.floor(empty / numExchange);
        empty -= numBottles * numExchange;
    }
    return drinked + numBottles;
};
class ArrayWrapper {
    nums: number[] = [];
    constructor(nums: number[]) {
        this.nums = nums;
    }
    
    valueOf(): number {
        return this.nums.reduce((s, e) => s += e, 0);
    }
    
    toString(): string {
        return JSON.stringify(this.nums);
    }
};
function productExceptSelf(nums: number[]): number[] {
    const postfix = [];
    const indexLast = nums.length - 1;
    postfix[indexLast] = nums[indexLast];
    for (let i = indexLast - 1; i >= 0; i--) {
        postfix[i] = postfix[i+1] * nums[i];
    }
    const result = [postfix[1]];
    let prefix = nums[0];
    for (let i = 1; i < indexLast; i++) {
        result[i] = prefix * postfix[i+1];
        prefix *= nums[i]
    }
    result[indexLast] = prefix;
    return result;
};
function isSubPath(head: ListNode | null, root: TreeNode | null): boolean {
    if (!head) return true;
    if (!root) return false;
    const dfs = (head: ListNode | null, root: TreeNode | null): boolean => {
        if (!head) return true; 
        if (!root) return false;
        if (root.val === head.val)
            return dfs(head.next, root.left) || dfs(head.next, root.right);
        return false;
    };
    return dfs(head, root) || isSubPath(head, root.left) || isSubPath(head, root.right);
}
function hook_css() {
    ?>
        <style>
            .wp_head_example {
                background-color : #f1f1f1;
            }
        </style>
    <?php
}
add_action('wp_head', 'hook_css');
function* createPeopleIterator() {
  let index = 0;
  while (true) {
    yield people[index++ % people.length];
  }
}

const iterator = createPeopleIterator();

console.log(iterator.next());
.incorrecto {
    text-decoration:line-through;
    color: red;
}
// Define the coordinates of the point or region of interest
var point = ee.Geometry.Point(90.2611485521762, 23.44690280909043);

// Define the date range for the year 2012
var startDate = '2012-01-01';
var endDate = '2012-12-31';

// Create a Landsat 7 Collection 2 Tier 1 image collection for the year 2012
var landsatCollection = ee.ImageCollection('LANDSAT/LE07/C02/T1_TOA')
  .filterBounds(point)
  .filterDate(startDate, endDate)
  .filter(ee.Filter.lt('CLOUD_COVER', 10));  // Filter for images with less than 10% cloud cover

// Get the median image for the year 2012
var medianImage = landsatCollection.median();

// Center the map to the point of interest
Map.centerObject(point, 10);

// Add the median image to the map
Map.addLayer(medianImage, {
  bands: ['B3', 'B2', 'B1'],  // True color composite (RGB)
  min: 0,
  max: 0.3
}, 'Landsat 7 Image (2012, Low Clouds)');

// Pinpoint the coordinates by adding the point to the map
Map.addLayer(point, {color: 'red'}, 'Pinpoint Location');
pip install prowler
prowler -v
async function fetchGET(url: string): Promise<any> {
	try {
		const response = await fetch(url);
		if (!response.ok) {
			throw new Error(
				`Unable to Fetch Data, Please check URL
				or Network connectivity!!`
			);
		}
		const data = await response.json();
		return data.results[0];
	} catch (error) {
		console.error('Some Error Occured:', error);
	}
}
Deal_Details = zoho.crm.getRecordById("Deals",deal_id);
Deal_Name = Deal_Details.get("Deal_Name");
Deal_Number = Deal_Details.get("Deal_Number");
//===================================================================================//
searchParam = {"reference_number":Deal_Number};
related_purchase_orders = zoho.books.getRecords("purchaseorders","689149759",searchParam);
info related_purchase_orders;
count = 0;
Total_of_all = 0.0;
if(related_purchase_orders.get("purchaseorders").size() > 0)
{
	responseXML = "<record>";
	for each  purchase_order in related_purchase_orders.get("purchaseorders")
	{
		purchaseorder_number = purchase_order.get("purchaseorder_number");
		created_date = purchase_order.get("date");
		status = purchase_order.get("status");
		vendor_name = purchase_order.get("vendor_name");
		total = purchase_order.get("total");
		Total_of_all = Total_of_all + total;
		po_id = purchase_order.get("purchaseorder_id");
		html = "<a href='www.google.com'>click here</a>";
		//===================================================================================//
		responseXML = responseXML + "<row no='" + count + "'>";
		responseXML = responseXML + "<FL val='PO Number'>" + purchaseorder_number + "</FL>";
		responseXML = responseXML + "<FL val='Status'>" + status.proper() + "</FL>";
		responseXML = responseXML + "<FL val='Vendor'>" + vendor_name.replaceAll("[\"#%&+;<=>\[\]^`(){}|~]","") + "</FL>";
		responseXML = responseXML + "<FL val='Total'>$ " + total + "</FL>";
		responseXML = responseXML + "<FL val='Created Date'>" + created_date + "</FL>";
		// 				responseXML = responseXML + "<FL val='PO Link'>https://books.zoho.com/app#/purchaseorders/" + po_id + "</FL>";
		responseXML = responseXML + "<FL val='PO Link' link='true' url='https://books.zoho.com/app#/purchaseorders/" + po_id + "'>Open</FL>";
		responseXML = responseXML + "</row>";
		count = count + 1;
	}
	responseXML = responseXML + "</record>";
}
else
{
	responseXML = "";
	responseXML = responseXML + "<record><error>=><message>There are no POs found against this Deal!</message></error></record>";
}
return responseXML;
class MakeRequests {
  private baseURL: string;

  constructor(baseURL: string) {
    this.baseURL = baseURL;
  }

  private async makeRequest<T>(requestInfo: RequestInfo): Promise<T> {
    const jsonResponse: Awaited<T> = await fetch(requestInfo)
      .then((response: Response) => response.json())
      .then((json: T) => json);
    return jsonResponse;
  }

  public async getPosts(): Promise<Record<string, unknown>> {
    const jsonResponse: Record<string, unknown> = await this.makeRequest(
      new Request(`${this.baseURL}posts/1`, {
        headers: new Headers({ "Content-Type": "application/json" }),
      })
    );
    return jsonResponse;
  }
}

const makeRequests: MakeRequests = new MakeRequests(
  "https://jsonplaceholder.typicode.com/"
);
export default makeRequests;
function woosuite_disable_shipping_calc_on_cart( $show_shipping ) {

    if( is_cart() ) {
        return false;
    }
    return $show_shipping;
}

add_filter( 'woocommerce_cart_ready_to_calc_shipping', 'woosuite_disable_shipping_calc_on_cart', 99 );
import dataclasses


@dataclasses.dataclass()
class Parent:
    def __post_init__(self):
        for (name, field_type) in self.__annotations__.items():
            if not isinstance(self.__dict__[name], field_type):
                current_type = type(self.__dict__[name])
                raise TypeError(f"The field `{name}` was assigned by `{current_type}` instead of `{field_type}`")

        print("Check is passed successfully")


@dataclasses.dataclass()
class MyClass(Parent):
    value: str


obj1 = MyClass(value="1")
obj2 = MyClass(value=1)
import React, { useState, useRef, useEffect } from 'react';
import './style.css';

const Chat = () => {
  const [textAreaHeight, setTextAreaHeight] = useState('auto');
  const [overflow, setOverflow] = useState(false);
  const textareaRef = useRef(null);

  const handleInput = (e) => {
    const textarea = textareaRef.current;
    textarea.style.height = 'auto';
    const newHeight = textarea.scrollHeight;

    if (newHeight > 100) {
      textarea.style.height = '100px';
      setOverflow(true);
    } else {
      textarea.style.height = `${newHeight}px`;
      setOverflow(false);
    }
  };

  useEffect(() => {
    const textarea = textareaRef.current;
    textarea.addEventListener('input', handleInput);

    return () => {
      textarea.removeEventListener('input', handleInput);
    };
  }, []);

  return (
    <div className="chat-container">
      <div className="input-wrapper">
        <textarea
          ref={textareaRef}
          className={`chat-textarea ${overflow ? 'overflow' : ''}`}
          placeholder="Type a message..."
          style={{ height: textAreaHeight }}
        />
        {/* Add send and audio icons */}
        <div className="icon-container">
          {/* Audio recording icon */}
          <svg
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 24 24"
            width="24"
            height="24"
            fill="currentColor"
          >
            <path d="M12 14a3.998 3.998 0 0 0 4-4V6a4 4 0 0 0-8 0v4a3.998 3.998 0 0 0 4 4zm7-4a1 1 0 1 0-2 0 5 5 0 0 1-10 0 1 1 0 1 0-2 0 7.002 7.002 0 0 0 6 6.92V20h-3a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2h-3v-3.08A7.002 7.002 0 0 0 19 10z" />
          </svg>

          {/* Send message icon */}
          <svg
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 24 24"
            width="24"
            height="24"
            fill="currentColor"
          >
            <path d="M21.426 2.574a1 1 0 0 0-1.059-.219l-17 7A1 1 0 0 0 3.5 11.5l7.223 2.89 2.89 7.223a1 1 0 0 0 1.15.615 1 1 0 0 0 .71-.698l7-17a1 1 0 0 0-.047-.959zM11.074 13.8 6.057 11.943 18.057 6l-6.825 6.825a.999.999 0 0 0-.158.975z" />
          </svg>
        </div>
      </div>
    </div>
  );
};

export default Chat;
h1,
p {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.chat-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 500px;
  margin: auto;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background-color: #f1f1f1;
  border-radius: 25px;
  padding: 10px;
}

.chat-textarea {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 10px;
  resize: none;
  font-size: 16px;
  outline: none;
}

.chat-textarea.overflow {
  overflow-y: auto;
}

.icon-container {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.icon-container .audio-icon,
.icon-container .send-icon {
  font-size: 24px; /* Adjust size if needed */
  color: #555; /* Default color */
  margin-left: 10px;
  cursor: pointer;
}

.audio-icon {
  color: #128c7e; /* Custom color for audio icon */
}

.send-icon {
  color: #25d366; /* Custom color for send icon */
}
Ride-hailing services operate in a complex regulatory landscape, with varying requirements across different regional jurisdictions. Here are some key regulatory considerations:

1. Licensing and Permits
◦ Operator Licenses: Many jurisdictions require ride-hailing companies to obtain specific licenses or permits to operate.
◦ Driver Licenses: Drivers must have valid driver's licenses and may need additional commercial driver's licenses (CDLs).

2. Vehicle Requirements
◦ Inspection: Vehicles used for ride-hailing must meet specific safety standards and pass regular inspections.
◦ Insurance: Drivers and companies must carry appropriate insurance coverage to protect passengers and third-party liabilities.

3. Driver Background Checks
◦ Thorough Checks: Rigorous background checks are typically required to ensure the safety of passengers.
◦ Criminal Records: Checks for criminal records, driving history, and other relevant information.

4. Fare Regulations
◦ Price Controls: Some jurisdictions may have regulations on pricing, including minimum and maximum fares.
◦ Surge Pricing: Regulations regarding surge pricing and its implementation.

5. Data Privacy
◦ GDPR and Other Data Protection Laws: Adherence to data privacy regulations like GDPR (Europe) or CCPA (California) is essential to protect user data.

6. Consumer Protection
◦ Dispute Resolution: Establish clear dispute resolution mechanisms for passengers and drivers.
◦ Fair Practices: Ensure fair and transparent practices, including clear cancellation policies and pricing information.

Hopefully, these rules and regulations will grasp things and clear out the way for developing your rid-hailing app for your business considering legal compliance. In that sense, Bolt Clone is one of the prominent players in the Middle East region and gets overwhelming responses from users and businessmen. So if entrepreneurs desire to kickstart their business journey with bolt clone script Appticz is the best choice for starting your business entry.
def process_masks_and_save_with_visualization(mask_dir, bump_dir, no_bump_dir, skip=12, threshold=3):
    """
    Przetwarza maski, wykrywa obecność garbu, zapisuje je do odpowiednich folderów 
    i tworzy ich wizualizacje.
    """
    if not os.path.exists(bump_dir):
        os.makedirs(bump_dir)
    if not os.path.exists(no_bump_dir):
        os.makedirs(no_bump_dir)

    for filename in os.listdir(mask_dir):
        file_path = os.path.join(mask_dir, filename)
        if os.path.isfile(file_path) and filename.endswith('.png'):
            mask = Image.open(file_path).convert('L')  # Konwertuj do odcieni szarości
            mask_np = np.array(mask)
       
            # Wykrycie garbu
            bump_present = detect_bump(mask_np, skip, threshold)
            
            # Obliczanie max_diff
            label_bony_roof = 5
            binary_mask = (mask_np == label_bony_roof).astype(np.uint8)
            height, width = binary_mask.shape
            upper_contour = []
 
            for x in range(width):
                column = binary_mask[:, x]
                if np.any(column):
                    y = np.where(column)[0][0]  # Najwyższy piksel w danej kolumnie
                    upper_contour.append(y)
                else:
                    upper_contour.append(height)
 
            upper_contour = np.array(upper_contour)
            min_y = np.min(upper_contour)
            distances = min_y - upper_contour
            differences = pd.Series(distances).diff(periods=skip).fillna(0).abs()
            max_diff = differences.max()
            
            # Wizualizacja maski
            visualized_image = np.zeros((height, width, 3), dtype=np.uint8)
            
            for label, color_info in CLASS_COLORS.items():
                color = color_info['color_rgb']
                visualized_image[mask_np == label] = color
 
            # Zapisanie do odpowiedniego folderu
            if bump_present:
                save_path = os.path.join(bump_dir, filename)
            else:
                save_path = os.path.join(no_bump_dir, filename)
 
            Image.fromarray(visualized_image).save(save_path)
            print(f'Zapisano zwizualizowaną maskę do: {save_path} - max_diff: {max_diff}')
 
 
process_masks_and_save_with_visualization('./Angles/dane/masks_from_txt', './Angles/dane/garb_5_5/garb_obecny','./Angles/dane/garb_5_5/garb_nieobecny')
star

Thu Oct 03 2024 13:16:37 GMT+0000 (Coordinated Universal Time) https://forums.mydigitallife.net/threads/discussion-windows-11-build-26100-pc-24h2-retail-ge-release.88220/page-109#post-1854786:~:text=Windows%20Registry%20Editor%20Version%205.00%0A%0A%0A%5BHKEY_CURRENT_USER%5CSoftware%5CMicrosoft%5CWindows%5CCurrentVersion%5CExplorer%5CAdvanced%5D%0A%22ShowSecondsInSystemClock%22%3Ddword%3A00000001

@Curable1600 #windows

star

Thu Oct 03 2024 11:56:36 GMT+0000 (Coordinated Universal Time) https://forums.mydigitallife.net/threads/remove-start-menu-recommended-section-and-setting-ads-no-patch-any-edition-proofs.88653/

@Curable1600 #windows

star

Thu Oct 03 2024 06:00:34 GMT+0000 (Coordinated Universal Time) https://maticz.com/cryptocurrency-development-company

@jamielucas #drupal

star

Thu Oct 03 2024 05:08:38 GMT+0000 (Coordinated Universal Time)

@signup

star

Thu Oct 03 2024 04:24:05 GMT+0000 (Coordinated Universal Time)

@adsj

star

Thu Oct 03 2024 04:23:08 GMT+0000 (Coordinated Universal Time)

@adsj

star

Thu Oct 03 2024 04:22:41 GMT+0000 (Coordinated Universal Time)

@adsj

star

Thu Oct 03 2024 04:05:58 GMT+0000 (Coordinated Universal Time)

@signup

star

Thu Oct 03 2024 03:58:33 GMT+0000 (Coordinated Universal Time)

@iliavial #python

star

Wed Oct 02 2024 22:15:41 GMT+0000 (Coordinated Universal Time)

@marcopinero #css

star

Wed Oct 02 2024 21:58:40 GMT+0000 (Coordinated Universal Time) https://www.sharepointdiary.com/2022/05/find-and-delete-duplicate-files-using-powershell.html

@sariohara

star

Wed Oct 02 2024 21:58:28 GMT+0000 (Coordinated Universal Time) https://ninzio.com/fundrize/help/

@acassell

star

Wed Oct 02 2024 21:41:37 GMT+0000 (Coordinated Universal Time)

@Justus

star

Wed Oct 02 2024 21:12:55 GMT+0000 (Coordinated Universal Time)

@ncdiep

star

Wed Oct 02 2024 19:58:07 GMT+0000 (Coordinated Universal Time)

@ncdiep

star

Wed Oct 02 2024 19:52:41 GMT+0000 (Coordinated Universal Time)

@ncdiep

star

Wed Oct 02 2024 13:19:09 GMT+0000 (Coordinated Universal Time)

@bdusenberry

star

Wed Oct 02 2024 10:02:40 GMT+0000 (Coordinated Universal Time)

@Rohan@99

star

Wed Oct 02 2024 09:38:00 GMT+0000 (Coordinated Universal Time) https://docs.docker.com/build/checks/

@mathewmerlin72

star

Wed Oct 02 2024 09:30:00 GMT+0000 (Coordinated Universal Time)

@Rohan@99

star

Wed Oct 02 2024 06:20:01 GMT+0000 (Coordinated Universal Time) https://htm-rapportage.eu.qlikcloud.com/dataloadeditor/app/46eb3215-f8ae-4802-9ccf-64daef3a78df

@bogeyboogaard

star

Wed Oct 02 2024 01:53:55 GMT+0000 (Coordinated Universal Time)

@jdeveloper #javascript

star

Wed Oct 02 2024 01:52:43 GMT+0000 (Coordinated Universal Time)

@jdeveloper #javascript

star

Wed Oct 02 2024 01:22:37 GMT+0000 (Coordinated Universal Time) https://aistudio.google.com/app/apikey/AIzaSyA0BlngtbJuJJM4kHOq6i1jXHr9zA7P2rM

@Pythaicoris

star

Tue Oct 01 2024 22:03:32 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 21:58:09 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 21:57:09 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 21:52:51 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 20:22:46 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 20:18:56 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 20:13:18 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 20:04:18 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 17:46:26 GMT+0000 (Coordinated Universal Time) https://developer.wordpress.org/reference/hooks/wp_head/

@systemsroncal #php

star

Tue Oct 01 2024 17:02:19 GMT+0000 (Coordinated Universal Time)

@destinyChuck #json #vscode

star

Tue Oct 01 2024 16:39:50 GMT+0000 (Coordinated Universal Time) https://desarrolloweb.com/faq/tachado-css

@systemsroncal #css

star

Tue Oct 01 2024 16:26:51 GMT+0000 (Coordinated Universal Time)

@Rehbar #javascript

star

Tue Oct 01 2024 14:35:21 GMT+0000 (Coordinated Universal Time) undefined

@jindrax84

star

Tue Oct 01 2024 14:07:29 GMT+0000 (Coordinated Universal Time)

@underlinegls #bash

star

Tue Oct 01 2024 12:25:03 GMT+0000 (Coordinated Universal Time) https://netschool.edu22.info/app/school/studentdiary/

@A17012012

star

Tue Oct 01 2024 12:22:26 GMT+0000 (Coordinated Universal Time) https://netschool.edu22.info/app/school/announcements/

@A17012012

star

Tue Oct 01 2024 12:17:19 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 12:15:32 GMT+0000 (Coordinated Universal Time)

@RehmatAli2024 #deluge

star

Tue Oct 01 2024 12:15:15 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Tue Oct 01 2024 11:13:44 GMT+0000 (Coordinated Universal Time) https://aovup.com/woocommerce/hide-shipping-on-cart-page/

@webisko #php

star

Tue Oct 01 2024 11:11:31 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/58992252/how-to-enforce-dataclass-fields-types

@kapkap #python

star

Tue Oct 01 2024 11:06:23 GMT+0000 (Coordinated Universal Time)

@kiran022 #javascriptreact

star

Tue Oct 01 2024 11:05:43 GMT+0000 (Coordinated Universal Time)

@kiran022 #javascriptreact

star

Tue Oct 01 2024 10:30:01 GMT+0000 (Coordinated Universal Time) https://appticz.com/bolt-clone

@aditi_sharma_

star

Tue Oct 01 2024 10:09:05 GMT+0000 (Coordinated Universal Time)

@mateusz021202

Save snippets that work with our extensions

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