Snippets Collections
#include <iostream> 
using namespace std;

struct node{
    int data;
    struct node* next;
};
int main()
{
    node* head = new node;
    head-> data = 10;
    head-> next = NULL;
    cout << "1st node is "<< head-> data << endl;
    
    node* current = new node;
    current-> data = 20;
    current-> next = NULL;
    head-> next = current;
    cout << "1st node is "<< current-> data << endl;
    
    
    current-> data = 30;
    current-> next = NULL;
    head-> next ->next = current;
    cout << "3rd node is "<< current-> data << endl;
    
    
    
}
// Define the coordinates for the specific point (e.g., the location of interest)
var point = ee.Geometry.Point(90.2611485521762, 23.44690280909043);

// Create a buffer around the point (e.g., 30 kilometers)
var bufferRadius = 30000; // 30 km in meters
var pointBuffer = point.buffer(bufferRadius);

// Create a Landsat 8 Collection 2 Tier 1 image collection for the desired date range
var startDate = '2020-12-01';
var endDate = '2020-12-31';

var landsatCollection2 = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
  .filterBounds(point)
  .filterDate(startDate, endDate);

// Cloud masking function for Landsat
function maskL8Clouds(image) {
  var qa = image.select('QA_PIXEL');
  var cloudMask = qa.bitwiseAnd(1 << 3).eq(0); // Cloud bit is 3rd
  return image.updateMask(cloudMask);
}

// Apply the cloud mask to the collection
var cloudFreeCollection = landsatCollection2.map(maskL8Clouds);

// Print the number of images in the collection
var imageCount = cloudFreeCollection.size();
print('Number of cloud-free images in the collection:', imageCount);

// Compute the maximum temperature across all cloud-free images (Band 10 - thermal infrared)
var maxTemperature = cloudFreeCollection.select('B10').max();

// Compute the minimum temperature across all cloud-free images (Band 10 - thermal infrared)
var minTemperature = cloudFreeCollection.select('B10').min();

// Convert temperatures from Kelvin to Celsius
var maxTemperatureCelsius = maxTemperature.subtract(273.15);
var minTemperatureCelsius = minTemperature.subtract(273.15);

// Clip the max and min temperature images to the buffer region around the point
var clippedMaxTemperature = maxTemperatureCelsius.clip(pointBuffer);
var clippedMinTemperature = minTemperatureCelsius.clip(pointBuffer);

// Inspect the max and min temperature values (Celsius) within the buffer region
var maxTempStats = clippedMaxTemperature.reduceRegion({
  reducer: ee.Reducer.max(),
  geometry: pointBuffer,
  scale: 30
});
var minTempStats = clippedMinTemperature.reduceRegion({
  reducer: ee.Reducer.min(),
  geometry: pointBuffer,
  scale: 30
});

print('Maximum Temperature (Celsius):', maxTempStats);
print('Minimum Temperature (Celsius):', minTempStats);

// Display the specific point and the max/min temperature layers on the map
Map.centerObject(point, 10);
Map.addLayer(point, {color: 'red'}, 'Specific Point');

// Add the max temperature layer to the map
Map.addLayer(
  clippedMaxTemperature,
  {
    min: 0, // Min temperature range (Celsius)
    max: 50, // Max temperature range (Celsius)
    palette: ['blue', 'lightblue', 'green', 'yellow', 'orange', 'red']
  },
  'Max Land Surface Temperature (Celsius)',
  false,
  0.75
);

// Add the min temperature layer to the map (can toggle display)
Map.addLayer(
  clippedMinTemperature,
  {
    min: 0, // Min temperature range (Celsius)
    max: 50, // Max temperature range (Celsius)
    palette: ['blue', 'lightblue', 'green', 'yellow', 'orange', 'red']
  },
  'Min Land Surface Temperature (Celsius)',
  false,
  0.75
);

// Add a legend for the temperature range (Max and Min)
var legend = ui.Panel({
  style: {
    position: 'bottom-right',
    padding: '8px 15px'
  }
});
legend.add(ui.Label({
  value: 'Land Surface Temperature (°C)',
  style: {
    fontWeight: 'bold',
    fontSize: '14px',
    margin: '0 0 4px 0',
    padding: '0'
  }
}));

// Define the color palette and corresponding temperature ranges (0-50°C)
var palette = ['blue', 'lightblue', 'green', 'yellow', 'orange', 'red'];
var tempRanges = ['0-8 °C', '9-16 °C', '17-24 °C', '25-32 °C', '33-40 °C', '41-50 °C'];

for (var i = 0; i < palette.length; i++) {
  var colorBox = ui.Label({
    style: {
      backgroundColor: palette[i],
      padding: '8px',
      margin: '0 0 4px 0'
    }
  });
  var description = ui.Label({
    value: tempRanges[i],
    style: {margin: '0 0 4px 6px'}
  });
  legend.add(
    ui.Panel({
      widgets: [colorBox, description],
      layout: ui.Panel.Layout.Flow('horizontal')
    })
  );
}
Map.add(legend);
// Define the coordinates for the specific point (e.g., the location of interest)
var point = ee.Geometry.Point(90.2611485521762, 23.44690280909043);

// Create a buffer around the point (e.g., 30 kilometers)
var bufferRadius = 30000; // 30 km in meters
var pointBuffer = point.buffer(bufferRadius);

// Create a Landsat 8 Collection 2 Tier 1 image collection for the desired date range
var startDate = '2020-12-01';
var endDate = '2020-12-31';

var landsatCollection2 = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
  .filterBounds(point)
  .filterDate(startDate, endDate);

// Cloud masking function for Landsat
function maskL8Clouds(image) {
  var qa = image.select('QA_PIXEL');
  var cloudMask = qa.bitwiseAnd(1 << 3).eq(0); // Cloud bit is 3rd
  return image.updateMask(cloudMask);
}

// Apply the cloud mask to the collection
var cloudFreeCollection = landsatCollection2.map(maskL8Clouds);

// Print the number of images in the collection
var imageCount = cloudFreeCollection.size();
print('Number of cloud-free images in the collection:', imageCount);

// Compute the average temperature across all cloud-free images (Band 10 - thermal infrared)
var averageTemperature = cloudFreeCollection.select('B10').mean();

// Convert temperature from Kelvin to Celsius
var temperatureCelsius = averageTemperature.subtract(273.15);

// Clip the temperature image to the buffer region around the point
var clippedTemperature = temperatureCelsius.clip(pointBuffer);

// Inspect the temperature range (min and max values) within the buffer region
var temperatureStats = clippedTemperature.reduceRegion({
  reducer: ee.Reducer.minMax(),
  geometry: pointBuffer,
  scale: 30
});
print('Temperature range (Celsius):', temperatureStats);

// Display the specific point and the clipped temperature layer on the map
Map.centerObject(point, 10);
Map.addLayer(point, {color: 'red'}, 'Specific Point');

// Adjust visualization based on the inspected temperature range
Map.addLayer(
  clippedTemperature,
  {
    min: 10, // Adjust these values after checking the printed temperature range
    max: 40, // Adjust these values after checking the printed temperature range
    palette: ['blue', 'lightblue', 'green', 'yellow', 'red']
  },
  'Clipped Land Surface Temperature (Celsius)',
  false,
  0.75 // Set transparency to help with visibility
);

// Add a legend to the map
var legend = ui.Panel({
  style: {
    position: 'bottom-right',
    padding: '8px 15px'
  }
});
legend.add(ui.Label({
  value: 'Average Land Surface Temperature (°C)',
  style: {
    fontWeight: 'bold',
    fontSize: '14px',
    margin: '0 0 4px 0',
    padding: '0'
  }
}));

// Define the color palette and temperature ranges for the legend
var palette = ['blue', 'lightblue', 'green', 'yellow', 'red'];
var tempRanges = ['10-15 °C', '16-20 °C', '21-25 °C', '26-30 °C', '31-40 °C'];

// Add the colors and labels to the legend
for (var i = 0; i < palette.length; i++) {
  var colorBox = ui.Label({
    style: {
      backgroundColor: palette[i],
      padding: '8px',
      margin: '0 0 4px 0'
    }
  });
  var description = ui.Label({
    value: tempRanges[i],
    style: {margin: '0 0 4px 6px'}
  });
  legend.add(
    ui.Panel({
      widgets: [colorBox, description],
      layout: ui.Panel.Layout.Flow('horizontal')
    })
  );
}

// Add the legend to the map
Map.add(legend);
import java.util.Scanner;

public class Patterns {

    // Main method to test the functionality of the patterns
    public static void main(String[] args) {
        // Call method to print design patterns
        printPatterns();

        // Call method to print horizontal bars
        printHorizontalBars();

        // Call method to print vertical bars
        printVerticalBars();
    } // end main

    // Method to print various patterns using nested loops
    public static void printPatterns() {
        System.out.println("printPatterns() method called....");
        
        // First pattern
        for (int row = 1; row <= 8; row++) {
            for (int col = 1; col <= 8; col++) {
                if (row + col <= 9) {
                    System.out.print("# ");
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println(); // Move to next line after each row
        }
        
        // Second pattern
        for (int row = 1; row <= 8; row++) {
            for (int col = 1; col <= 8; col++) {
                if (row <= 9 - col) {
                    System.out.print("# ");
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println(); // Move to next line after each row
        }

        // Third pattern
        for (int row = 1; row <= 8; row++) {
            for (int col = 1; col <= 8; col++) {
                if (row == 1 || row == 8 || col == 1 || col == 8) {
                    System.out.print("# ");
                } else if (row == col) {
                    System.out.print("# ");
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println(); // Move to next line after each row
        }

        // Fourth pattern
        for (int row = 1; row <= 8; row++) {
            for (int col = 1; col <= 8; col++) {
                if (row == 1 || row == 8 || col == 1 || col == 8 || row + col == 9) {
                    System.out.print("# ");
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println(); // Move to next line after each row
        }
    }

    // Method to print horizontal bars based on user input
    public static void printHorizontalBars() {
        Scanner sc = new Scanner(System.in);
        int num1, num2, num3, num4;

        System.out.println("printHorizontalBars() method called....");
        System.out.println("Enter four integers:");

        // Read the numbers from the keyboard
        num1 = sc.nextInt();
        num2 = sc.nextInt();
        num3 = sc.nextInt();
        num4 = sc.nextInt();

        // Print the horizontal bars
        printStars(num1);
        printStars(num2);
        printStars(num3);
        printStars(num4);
    }

    // Helper method to print a given number of stars
    private static void printStars(int count) {
        for (int i = 0; i < count; i++) {
            System.out.print("* ");
        }
        System.out.println(); // Move to next line after printing stars
    }

    // Method to print vertical bars based on user input
    public static void printVerticalBars() {
        Scanner sc = new Scanner(System.in);
        int num1, num2, num3, num4;

        System.out.println("printVerticalBars() method called....");
        System.out.println("Enter four integers:");

        // Read the numbers from the keyboard
        num1 = sc.nextInt();
        num2 = sc.nextInt();
        num3 = sc.nextInt();
        num4 = sc.nextInt();

        // Find the maximum number of stars in any column
        int max = Math.max(num1, Math.max(num2, Math.max(num3, num4)));

        // Print the vertical bars
        for (int i = max; i > 0; i--) {
            if (i <= num1) System.out.print("** ");
            else System.out.print("   ");
            
            if (i <= num2) System.out.print("** ");
            else System.out.print("   ");
            
            if (i <= num3) System.out.print("** ");
            else System.out.print("   ");
            
            if (i <= num4) System.out.print("** ");
            else System.out.print("   ");
            
            System.out.println(); // Move to the next line after each level
        }

        // Print the row of dashes
        System.out.println("------------------------------");
    }
}
For this assignment you are to complete the code for the Java Class, named Patterns, that contains
a main method and three additional methods that will print various patterns. The main method will
act as a test driver for this program in that it will make one call to each of the following three methods.
Complete the code for the method, named printPatterns(), that uses for loops to print the pat-
terns that follow. You should use two nested for loops for each pattern (so you will have four
separate sets of nested for loops when complete). Your method should use Sys-
tem.out.print(“#”); to print the pattern and System.out.print(“ “); to print spaces that will be
needed for formatting. You are not allowed to use System.out.print(“####”), then Sys-
tem.out.print(“###”), and then System.out.print(“##”) or anything similar to print the patterns,
you may only print one character at a time and use control structures (logic) to determine when
to print the pattern. You will need to use if/else statements within the loops to determine when
to print the pattern or a space. You will need to use System.out.println() to advance to the next
line in the pattern.
NOTE: Each of the following patterns should be printed separately and will appear vertically
(one below the other) on the screen when printed. They are shown horizontally on this specifi-
cation to save space.
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # #
# # # # # # # # #
# # # # # # #
# # # # # # # # # # # # # # # # # #
Complete the code for the method, named printHorizontalBars(), that prompts the user for four
values and then draws corresponding bar graphs using an ASCII character. For example, if the
user entered 12, 9, 4 and 2 in that respective order, the program would draw.
* * * * * * * * * * * *
* * * * * * * * *
* * * *
* *
Complete the code for the method, named printVerticalBars(), that prompts the user for four
values and draws vertical bar charts using an ASCII character. A row of dashes should be dis-
played at the bottom of the chart. For example, if the user inputs 5, 2, 3, and 4, the program
should display.
**
** **
** ** **
** ** ** **
** ** ** **
------------------------------
The variables and methods defined within your Java class must include comments. Your program
should also be properly formatted, which includes indentation of code and package patterns;

import java.util.Scanner;

public class Patterns {


    // All of the code for the main method is complete.  No modifications are necessary.

    public static void main(String[] args) {

        // call method to print design patterns
        printPatterns();

        // call method to print horizontal bars
        printHorizontalBars();

        // call method to print vertical bars
        printVerticalBars();

    } // end main

    // Complete the code for the following method according to the project specifications.
    public static void printPatterns()    {

        System.out.println("printPatterns() method called....");

        // nested for loop to print the following pattern goes below:
        //    # # # # # # # #
        //	    # # # # # # #
        //	      # # # # # #
        //	        # # # # #
        //	          # # # #
        //	            # # #
        //	              # #
        //	                #

        // NOTE: You can copy the following nested-for loop structure and change it based on
        // each of the four patterns that you need to draw

   Remove comments before coding
        for (int row = 1; row <= 8; row++)  // add code to complete the for loop
        {
            for ( int col = 1; col<= 8; col++) // add code to complete the for loop
            {
                if (row + col == 9 || row == col || row = 1 || row 8) // add condition to if-statement
                {
                    // You can swap the following print statements based on the logic you wish to use

                    System.out.print("#"); // print space in pattern (you can swap with print statement below to make logic easier
                }
                        else
                System.out.print("  "); // print character for pattern

                System.out.println(); // move to next line of the pattern been printed

        }
 */


        // Tested for loop to print the following pattern goes below:
        //    # # # # # # # #
        //	  # # # # # # #
        //	  # # # # # #
        //	  # # # # #
        //	  # # # #
        //	  # # #
        //	  # #
        //	  #


        for (int row = 1; row <= 8; row++)  // add code to complete the for loop
        {
            for ( int col = 1; col<= 8; col++) // add code to complete the for loop
            {
                if (row + col <= 9) // add condition to if-statement
                {
                    // You can swap the following print statements based on the logic you wish to use

                    System.out.print("#"); // print space in pattern (you can swap with print statement below to make logic easier
                }
                else
                    System.out.print("  "); // print character for pattern

                System.out.println(); // move to next line of the pattern been printed

                System.out.println


        // nested for loop to print the following pattern goes below:
        //(HINT: what do the #'s on the top and bottom have in common.  What is the
        // relationship between row and column values...plug in numbers for their location
        // to help find the answers to the logic you need to use..think in terms of the
        // row and column value)
        //
        //    # # # # # # # #
        //	    #         #
        //	      #     #
        //	        # #
        //	        # #
        //	      #     #
        //	    #         #
        //	  # # # # # # # #

                for (int row = 1; row <= 8; row++)  // add code to complete the for loop
                {
                    for ( int col = 1; col<= 8; col++) // add code to complete the for loop
                    {
                        if (row + col == 9 || row == col || row = 1 || row 8) // add condition to if-statement
                        {
                            // You can swap the following print statements based on the logic you wish to use

                            System.out.print("#"); // print space in pattern (you can swap with print statement below to make logic easier
                        }
                        else
                            System.out.print("  "); // print character for pattern

                        System.out.println(); // move to next line of the pattern been printed

                        System.out.println();

                Tested for loop to print the following pattern goes below:
        //    # # # # # # # #
        //    #
        //    #
        //    # # # # # # # #
        //	  # # # # # # # #
        //    #
        //    #
        //    # # # # # # #


    }

    // Complete the code for the following method according to the project specifications.
    public static void printHorizontalBars()
    {
        Scanner sc = new Scanner(System.in);
        int num1 = 0; // number of times to print * on line 1
        int num2 = 0; // number of times to print * on line 2
        int num3 = 0; // number of times to print * on line 3
        int num4 = 0; // number of times to print * on line 4

        System.out.println("printHorizontalBars() method called....");

        // prompt user to enter four integers (selecting enter after each number)

        // read the numbers from the keyboard - remove comments tags to start
//       num1 = sc.nextInt();
//       num2 = sc.nextInt();
//       num3 = sc.nextInt();
//       num4 = sc.nextInt();

        // for loop to print out the number of *s for line 1

        // for loop to print out the number of *s for line 2

        // for loop to print out the number of *s for line 3

        // for loop to print out the number of *s for line 4


    }


    // Complete the code for the following method according to the project specifications.
    public static void printVerticalBars()
    {
        Scanner sc = new Scanner(System.in);
        int num1 = 0; // number of times to print * in column 1
        int num2 = 0; // number of times to print * in column 2
        int num3 = 0; // number of times to print * in column 3
        int num4 = 0; // number of times to print * in column 4

        // HINT: Printing to the console requires that you print from left to right starting
        // at the highest level and then moving from left to right...continuing to move from top
        // to bottom level of the pattern.  If you think of each column as a building, which building has
        // the most floors.
        //
        // For each building as you move from left to right...do you print ** or do you print two spaces.
        // You will need to print two spaces between each building to keep things manageable
        // You will also need to use a System.out.println() when you are finishing printing each
        // level.
        //
        // Since you are moving from the highest level to the lowest level, what is your for loop
        // going to look like.  You will need one for loop with four (4) if-else statements (one for each building)
        // inside the loop to help make the decision as to whether you will need to print the pattern
        // or spaces.
        //
        // When your loop has ended, you will then need to print a row of dashes at the bottom
        // of the pattern.

        int max = -1; // max number of *'s to print in any column

        System.out.println("printVerticalBars() method called....");

        // prompt user to enter four integers (selecting enter after each number)
        System.out.println();
        // read the numbers from the keyboard - remove comment tags to start
//       num1 = sc.nextInt();
//       num2 = sc.nextInt();
//       num3 = sc.nextInt();
//       num4 = sc.nextInt();

        // find the max  of all inputs

        // for loop to print out the max number of levels
        // if-else statement for building 1
        // if-else statement for building 2
        // if-else statement for building 3
        // if-else statement for building 4
        // end loop

        // print row of dashes


    }

} fix this code line by line  
// accountID = 3241967000000998225;
////////////////////////////////////////////
products = zoho.crm.searchRecords("Products","((Account_ID:equals:" + accountID + ")and(Product_Active:equals:true))");
classifications_list = List();
classifications_vs_catergories = Map();
catergories_vs_issueType = Map();
issueType_vs_recIds = Map();
///////////////////////////////////////////////////////////
for each  pro in products
{
	productName = pro.get("Product_Name").getPrefix("-");
	if(productName == null)
	{
		finalProductName = pro.get("Product_Name").trim();
	}
	else
	{
		finalProductName = productName.trim();
	}
	info finalProductName;
	queryMap = Map();
	queryMap.put("select_query","select Products, Classification, Problem_Category, Issue_Type, Required_Info_Type, Instructions, Multi_Option_Question, Output_Message, Output_Action, KB_Article from ChatBot_Actions where Products like '%" + finalProductName + "%'");
	response = invokeurl
	[
		url :"https://www.zohoapis.com/crm/v4/coql"
		type :POST
		parameters:queryMap.toString()
		connection:"zoho_crm"
	];
	// 	info response;
	//////////////////////////////////////////////////////////
	if(!isNull(response))
	{
		data = response.get("data");
		for each  val in data
		{
			products_list = val.get("Products").toList();
			if(products_list.contains(finalProductName))
			{
				classification = val.get("Classification");
				ProblemCategory = val.get("Problem_Category");
				IssueType = ifnull(val.get("Issue_Type"),"Empty");
				recId = val.get("id");
				///////////////////////////////////////////////
				if(!classifications_list.contains(classification))
				{
					classifications_list.add(classification);
				}
				////////////////////////////Classificaiton VS Categories/////////////////////////////
				if(classifications_vs_catergories.containKey(classification))
				{
					categories_list = classifications_vs_catergories.get(classification);
					if(!categories_list.contains(ProblemCategory))
					{
						categories_list.add(ProblemCategory);
						classifications_vs_catergories.put(classification,categories_list);
					}
				}
				else
				{
					categories_list = List();
					categories_list.add(ProblemCategory);
					classifications_vs_catergories.put(classification,categories_list);
				}
				//////////////////////////////////////////////////////////////////////////////
				////////////////////////////Categories VS Issue Types//////////////////////////
				keyCombination_issueType = classification + "/" + ProblemCategory;
				if(catergories_vs_issueType.containKey(keyCombination_issueType))
				{
					issueType_list = catergories_vs_issueType.get(keyCombination_issueType);
					if(!issueType_list.contains(IssueType))
					{
						issueType_list.add(IssueType);
						catergories_vs_issueType.put(keyCombination_issueType,issueType_list);
					}
				}
				else
				{
					issueType_list = List();
					issueType_list.add(IssueType);
					catergories_vs_issueType.put(keyCombination_issueType,issueType_list);
				}
				keyCombination = classification + "/" + ProblemCategory + "/" + IssueType;
				issueType_vs_recIds.put(keyCombination,recId);
			}
		}
	}
}
returnMap = Map();
returnMap.put("classifications",classifications_list);
returnMap.put("classificationsVsCategories",classifications_vs_catergories);
returnMap.put("catergoriesVsIssueTypes",catergories_vs_issueType);
returnMap.put("issueTypeVsrequireInfo",issueType_vs_recIds);
return returnMap;
add_filter( 'login_display_language_dropdown', '__return_false' );
# To check:
Dism /Online /Get-Featureinfo /Featurename:Recall

#To disable:
Dism /Online /Disable-Feature /Featurename:Recall
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "✨ :magic_wand::xero-unicorn: End of Year Celebration – A Sprinkle of Magic! :xero-unicorn: :magic_wand:✨",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Hi Milton Keynes!* \nGet ready to wrap up the year with a sprinkle of magic and a lot of fun at our End of Year Event! Here’s everything you need to know:"
			}
		},
		{
			"type": "section",
			"fields": [
				{
					"type": "mrkdwn",
					"text": "*:12_: When:*\nThursday 12th December"
				},
				{
					"type": "mrkdwn",
					"text": "*📍 Where:*\n<https://www.google.com/maps/place/Leonardo+Hotel+Milton+Keynes/@52.0383378,-0.7663002,17z/data=!4m9!3m8!1s0x4877aaa22fa26b5b:0x8191b0668324517d!5m2!4m1!1i2!8m2!3d52.0383345!4d-0.7637199!16s%2Fg%2F1wg5xhzv?entry=ttu&g_ep=EgoyMDI0MTAxMy4wIKXMDSoASAFQAw%3D%3D|*Leonardo Hotel, Milton Keynes*> \nMidsummer Blvd, Milton Keynes MK9 2HP"
				},
				{
					"type": "mrkdwn",
					"text": "*⏰ Time:*\n7 PM - 12 PM"
				}
			]
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*:magic_wand::xero-unicorn: Theme:*\n_A Sprinkle of Magic_ – Our theme is inspired by the Xero Unicorn, embracing creativity, inclusivity, and diversity. Expect unique decor, magical moments, and a fun-filled atmosphere!"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*:dress: Dress Code:*\nSmart casual – Show your personality, but no Xero tees or lanyards, please!\nIf you're feeling inspired by the theme, why not add a little 'Sprinkle of Magic' to your outfit? Think glitter, sparkles, or anything that shows off your creative side! (Totally optional, of course! ✨)"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🚍 Transport Info:*\n*Public Transport:* Bus routes 3, 4, 5, 6, & C1 all stop outside the venue. stop\n*Parking:* Off-site parking is available opposite the hotel on Midsummer Boulevard, approx 50m away. Standard bays (purple) are available from 50p per hour  \n*From the Xero office:* 5 minute drive or 15 minute walk. Please feel free to park in the Xero bays if allocated via Parkable."
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🎤 :food-party: Prepare to be dazzled by a live DJ, dance floor, chill-out zones, 3-course sit down meal and drinks! ✨🎶"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🎟 RSVP Now:*\nCheck your emails - Invite sent to you via Jomablue!\nMake sure you *RSVP by 5th November!*"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":question::question:Got questions? See the <https://docs.google.com/document/d/1iygJFHgLBRSdAffNsg3PudZCA45w6Wit7xsFxNc_wKM/edit|FAQs> doc or post in the Slack channel.\nWe can’t wait to celebrate with you! :partying_face: :xero-love:"
			}
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "✨ :magic_wand::xero-unicorn: End of Year Celebration – A Sprinkle of Magic! :xero-unicorn: :magic_wand:✨",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Hi Manchester!* \nGet ready to wrap up the year with a sprinkle of magic and a lot of fun at our End of Year Event! Here’s everything you need to know:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"fields": [
				{
					"type": "mrkdwn",
					"text": "*:22_: When:*\nFriday 22nd November"
				},
				{
					"type": "mrkdwn",
					"text": "*📍 Where:*\n<hhttps://www.google.com/maps/place/Impossible+-+Manchester/@53.4780444,-2.2533479,17z/data=!3m2!4b1!5s0x487bb1c2842b9745:0x3b61930895f80fcf!4m6!3m5!1s0x487bb1c2842aed53:0x59040b3a3f385d2a!8m2!3d53.4780445!4d-2.248477!16s%2Fg%2F11d_t4kcyq?entry=ttu&g_ep=EgoyMDI0MTAxMy4wIKXMDSoASAFQAw%3D%3D|*Impossible Manchester*> \n36 Peter Street, Manchester, M2 5QR"
				},
				{
					"type": "mrkdwn",
					"text": "*⏰ Time:*\n5:30PM - 10:30PM"
				}
			]
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*:magic_wand::xero-unicorn: Theme:*\n_A Sprinkle of Magic_ – Our theme is inspired by the Xero Unicorn, embracing creativity, inclusivity, and diversity. Expect unique decor, magical moments, and a fun-filled atmosphere!"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*:dress: Dress Code:*\nSmart casual – Show your personality, but no Xero tees or lanyards, please!\nIf you're feeling inspired by the theme, why not add a little 'Sprinkle of Magic' to your outfit? Think glitter, sparkles, or anything that shows off your creative side! (Totally optional, of course! ✨)"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🚍 Transport Info:*\n*Public Transport:* Via bus routes 101, 18, 216, 250, 33 - 1 min walk from bus stop\n*Parking:* 700+ parking spaces at NCP Great Northern Carpark- GT Northern Warehouse 2, Watson Street, Manchester, M3 4EE.\n*Tram Station:* St.Peter's Square- 5 min walk."
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🎤 :food-party: Entertainment & Food:*\nPrepare to be dazzled by a live DJ, dance floor, chill-out zones, 3-course sit down meal and drinks! ✨🎶"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🎟 RSVP Now:*\nCheck your emails - Invite sent to you via Jomablue!\nMake sure you RSVP by [insert RSVP deadline]!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":question::question:Got questions? See the <https://docs.google.com/document/d/1iygJFHgLBRSdAffNsg3PudZCA45w6Wit7xsFxNc_wKM/edit|FAQs> doc or post in the Slack channel.\nWe can’t wait to celebrate with you! :partying_face: :xero-love:"
			}
		}
	]
}
#include <iostream> 
using namespace std;

struct node{
    int data;
    struct node *link;
    
};
int main(){
    struct node* head = new node;
    
    head->data=45;
    head->link=NULL;
    
    cout << "new node " << head->data<<endl;
    
    struct node* current = new node;
    current->data = 98;
    current->link = NULL;
    
    head->link = current ;
    
    
    cout << "new node " << current->data<< endl;
}
#include <iostream> 
using namespace std;

struct node{
    int data;
    struct node *link;
    
};
int main(){
    struct node* head = new node;
    
    head->data=45;
    head->link=NULL;
    
    cout << "new node " << head->data<<endl;
    
    struct node* current = new node;
    current->data = 98;
    current->link = NULL;
    
    head->link = current ;
    
    
    cout << "new node " << current->data<< endl;
}
#include <iostream>
using namespace std;

struct node{
    int data;
    struct node* link;
};
int main()
{
    struct node* head = new node;
    
    head ->data=45;
    head ->link=NULL;
    
    cout<< "new node value is "<< head ->data;
}
<video controls="controls" style="max-width: 100%; height: auto;">
  <source src="your_url_goes_here" type="video/mp4" />
Your browser does not support our video.
</video>
SELECT Id,Name,InterviewLabel, InterviewStatus,CreatedDate FROM FlowInterview WHERE InterviewStatus = 'Error'
package patterns;

import java.util.Scanner;

public class Patterns {


    // All of the code for the main method is complete.  No modifications are necessary.

    public static void main(String[] args) {

        // call method to print design patterns
        printPatterns();

        // call method to print horizontal bars
        printHorizontalBars();

        // call method to print vertical bars
        printVerticalBars();

    } // end main

    // Complete the code for the following method according to the project specifications.
    public static void printPatterns()    {

        System.out.println("printPatterns() method called....");

        // nested for loop to print the following pattern goes below:
        //    # # # # # # # #
        //	    # # # # # # #
        //	      # # # # # #
        //	        # # # # #
        //	          # # # #
        //	            # # #
        //	              # #
        //	                #

        // NOTE: You can copy the following nested-for loop structure and change it based on
        // each of the four patterns that you need to draw

   Remove comments before coding
        for (int row = 1; row <= 8; row++)  // add code to complete the for loop
        {
            for ( int col = 1; col<= 8; col++) // add code to complete the for loop
            {
                if (row + col == 9 || row == col || row = 1 || row 8) // add condition to if-statement
                {
                    // You can swap the following print statements based on the logic you wish to use

                    System.out.print("#"); // print space in pattern (you can swap with print statement below to make logic easier
                }
                        else
                System.out.print("  "); // print character for pattern

                System.out.println(); // move to next line of the pattern been printed

        }
 */


        // Tested for loop to print the following pattern goes below:
        //    # # # # # # # #
        //	  # # # # # # #
        //	  # # # # # #
        //	  # # # # #
        //	  # # # #
        //	  # # #
        //	  # #
        //	  #


        for (int row = 1; row <= 8; row++)  // add code to complete the for loop
        {
            for ( int col = 1; col<= 8; col++) // add code to complete the for loop
            {
                if (row + col <= 9) // add condition to if-statement
                {
                    // You can swap the following print statements based on the logic you wish to use

                    System.out.print("#"); // print space in pattern (you can swap with print statement below to make logic easier
                }
                else
                    System.out.print("  "); // print character for pattern

                System.out.println(); // move to next line of the pattern been printed

                System.out.println


        // nested for loop to print the following pattern goes below:
        //(HINT: what do the #'s on the top and bottom have in common.  What is the
        // relationship between row and column values...plug in numbers for their location
        // to help find the answers to the logic you need to use..think in terms of the
        // row and column value)
        //
        //    # # # # # # # #
        //	    #         #
        //	      #     #
        //	        # #
        //	        # #
        //	      #     #
        //	    #         #
        //	  # # # # # # # #

                for (int row = 1; row <= 8; row++)  // add code to complete the for loop
                {
                    for ( int col = 1; col<= 8; col++) // add code to complete the for loop
                    {
                        if (row + col == 9 || row == col || row = 1 || row 8) // add condition to if-statement
                        {
                            // You can swap the following print statements based on the logic you wish to use

                            System.out.print("#"); // print space in pattern (you can swap with print statement below to make logic easier
                        }
                        else
                            System.out.print("  "); // print character for pattern

                        System.out.println(); // move to next line of the pattern been printed

                        System.out.println();

                Tested for loop to print the following pattern goes below:
        //    # # # # # # # #
        //    #
        //    #
        //    # # # # # # # #
        //	  # # # # # # # #
        //    #
        //    #
        //    # # # # # # #


    }

    // Complete the code for the following method according to the project specifications.
    public static void printHorizontalBars()
    {
        Scanner sc = new Scanner(System.in);
        int num1 = 0; // number of times to print * on line 1
        int num2 = 0; // number of times to print * on line 2
        int num3 = 0; // number of times to print * on line 3
        int num4 = 0; // number of times to print * on line 4

        System.out.println("printHorizontalBars() method called....");

        // prompt user to enter four integers (selecting enter after each number)

        // read the numbers from the keyboard - remove comments tags to start
//       num1 = sc.nextInt();
//       num2 = sc.nextInt();
//       num3 = sc.nextInt();
//       num4 = sc.nextInt();

        // for loop to print out the number of *s for line 1

        // for loop to print out the number of *s for line 2

        // for loop to print out the number of *s for line 3

        // for loop to print out the number of *s for line 4


    }


    // Complete the code for the following method according to the project specifications.
    public static void printVerticalBars()
    {
        Scanner sc = new Scanner(System.in);
        int num1 = 0; // number of times to print * in column 1
        int num2 = 0; // number of times to print * in column 2
        int num3 = 0; // number of times to print * in column 3
        int num4 = 0; // number of times to print * in column 4

        // HINT: Printing to the console requires that you print from left to right starting
        // at the highest level and then moving from left to right...continuing to move from top
        // to bottom level of the pattern.  If you think of each column as a building, which building has
        // the most floors.
        //
        // For each building as you move from left to right...do you print ** or do you print two spaces.
        // You will need to print two spaces between each building to keep things manageable
        // You will also need to use a System.out.println() when you are finishing printing each
        // level.
        //
        // Since you are moving from the highest level to the lowest level, what is your for loop
        // going to look like.  You will need one for loop with four (4) if-else statements (one for each building)
        // inside the loop to help make the decision as to whether you will need to print the pattern
        // or spaces.
        //
        // When your loop has ended, you will then need to print a row of dashes at the bottom
        // of the pattern.

        int max = -1; // max number of *'s to print in any column

        System.out.println("printVerticalBars() method called....");

        // prompt user to enter four integers (selecting enter after each number)
        System.out.println();
        // read the numbers from the keyboard - remove comment tags to start
//       num1 = sc.nextInt();
//       num2 = sc.nextInt();
//       num3 = sc.nextInt();
//       num4 = sc.nextInt();

        // find the max  of all inputs

        // for loop to print out the max number of levels
        // if-else statement for building 1
        // if-else statement for building 2
        // if-else statement for building 3
        // if-else statement for building 4
        // end loop

        // print row of dashes


    }

}
#include <iostream>
using namespace std;

int main(void){

}
FIRST IN THE PRODUCT PAGE ADD THE NEW BUTTON 
 <!---- // -------- NEW FAREHARBOR BLUE BUTTON -------- // ---->
      <div class="fhButton" style="margin-top: 1.5em !important;">
        <a href="<?php echo $fareHarborLink; ?>" style="font-weight: bold !important; width: 100% !important; font-family:Lato, sans-serif !important; font-size: 1em !important; box-shadow:none !important; padding: .15em 2em !important; border-radius: 3px !important;" class="fh-shape--square fh-size--small  fh-button-true-flat-blue fh-color--white">Book now</a>
      </div>


THEN IN THE THEME LIQUID FILE ADD THE SCRIPT
<!-------- // -------- FAREHARBOR SCRIPT TO OVERRIDE PREVIOUS SOFTWARE BLUE BUTTON - CREATED A NEW BLUE BUTTON -------- // -------->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
    $(document).ready(function() {
        // Object to map page slugs to FareHarbor links
        var pageToLinkMapping = {
            "knife-skills-vegetable-yaki-soba-vegan-5": "https://fareharbor.com/embeds/book/leedscookeryschool/items/580473/?full-items=yes&flow=1265884",
            "friday-night-takeaway-thai": "https://fareharbor.com/embeds/book/leedscookeryschool/items/580660/?full-items=yes&flow=1265866",
            "a-taste-of-mexico-3": "https://fareharbor.com/embeds/book/leedscookeryschool/items/580459/?full-items=yes&flow=1265859",
            "parent-and-kids-chinese-takeaway": "https://fareharbor.com/embeds/book/leedscookeryschool/items/580676/?full-items=yes&flow=1265838"
        };

        // Get the current page URL
        var currentUrl = window.location.pathname;
        
        // Extract the page slug (part after the last slash)
        var pageSlug = currentUrl.substring(currentUrl.lastIndexOf('/') + 1);

        // Default FareHarbor link (in case no match is found)
        var fareHarborLink = "https://fareharbor.com/embeds/book/leedscookeryschool/?full-items=yes";

        // Check if the page slug exists in the mapping
        if (pageToLinkMapping.hasOwnProperty(pageSlug)) {
            fareHarborLink = pageToLinkMapping[pageSlug];
        }

        // Update the href attribute of the booking button
        $('.fhButton a').attr('href', fareHarborLink);
    });
</script>
import axios from 'axios';
import { getItem } from '../../utility/localStorageControl';

const API_ENDPOINT = `${process.env.REACT_APP_API_ENDPOINT}/api`;

const authHeader = () => ({
  Authorization: `Bearer ${getItem('access_token')}`,
});

const client = axios.create({
  baseURL: API_ENDPOINT,
  headers: {
    Authorization: `Bearer ${getItem('access_token')}`,
    'Content-Type': 'application/json',
  },
});

class DataService {
  static get(path = '') {
    return client({
      method: 'GET',
      url: path,
      headers: { ...authHeader() },
    });
  }

  static post(path = '', data = {}, optionalHeader = {}) {
    return client({
      method: 'POST',
      url: path,
      data,
      headers: { ...authHeader(), ...optionalHeader },
    });
  }

  static patch(path = '', data = {}) {
    return client({
      method: 'PATCH',
      url: path,
      data: JSON.stringify(data),
      headers: { ...authHeader() },
    });
  }

  static put(path = '', data = {}) {
    return client({
      method: 'PUT',
      url: path,
      data: JSON.stringify(data),
      headers: { ...authHeader() },
    });
  }
}

/**
 * axios interceptors runs before and after a request, letting the developer modify req,req more
 * For more details on axios interceptor see https://github.com/axios/axios#interceptors
 */
client.interceptors.request.use((config) => {
  // do something before executing the request
  // For example tag along the bearer access token to request header or set a cookie
  const requestConfig = config;
  const { headers } = config;
  requestConfig.headers = { ...headers, Authorization: `Bearer ${getItem('access_token')}` };

  return requestConfig;
});

client.interceptors.response.use(
  (response) => response,
  (error) => {
    /**
     * Do something in case the response returns an error code [3**, 4**, 5**] etc
     * For example, on token expiration retrieve a new access token, retry a failed request etc
     */
    const { response } = error;
    const originalRequest = error.config;
    if (response) {
      if (response.status === 500) {
        // do something here
      } else {
        return originalRequest;
      }
    }
    return Promise.reject(error);
  },
);
export { DataService };
const scrollElm = document.scrollingElement;
scrollElm.scrollTop = 0;
if (document.prerendering) {
  document.addEventListener("prerenderingchange", initAnalytics, {
    once: true,
  });
} else {
  initAnalytics();
}
<style>
  html {
  font-family: avenir;
  margin: 2em;
  font-size: 180%;
  line-height: 1.5;
}

 
.navbar {
  display: flex;
  flex-wrap: wrap;
  width: max-content;
  gap: 1rem;
  border: 4px solid rebeccapurple;
  margin: 4em 0;
  padding: 0.25em 1em;
}
.navbar li {
  display: block; 
}
.navbar a {
  text-decoration: none;
  color: black;
}
.navbar a:hover {
  text-decoration: underline;
  text-decoration-color: orange;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.breadcrumbs {
  padding: 0;
  font-size: 84%;
}
.breadcrumbs li {
  display: inline-block; 
}
.breadcrumbs li::after {
  content: '>';
  font-size: 70%;
  padding: 0 0.5em;
  font-family: georgia, serif;
}
.breadcrumbs li:last-child::after {
  content:'';
}
.breadcrumbs a {
  color: black;
  text-underline-offset: 3px;
}
.breadcrumbs a:hover {
  text-decoration: underline;
  text-decoration-color: yellow;
  text-decoration-thickness: 1.1em;
  text-underline-offset: -0.9em;
  text-decoration-skip-ink: none;
}

</style>
<nav role="breadcrumb">
  <ol class="breadcrumbs">
    <li><a href="/">Home</a></li>
    <li><a href="/people">Blog</a></li>
    <li><a href="/contact">March</a></li>
    <li>March 9th Update</li>
  </ol>
</nav>

<main>
  <style>
    body {
  font-family: Avenir, Helevetica, sans-serif;
  margin: 1rlh 2rlh;
  font-size:0.9rem;
}
details {
  border: 1px solid grey;
  margin-block: 1rlh;
  padding: 1rlh;
  margin-trim: block;
}
details[open] summary {
  margin-block-end: 0.5rlh;
  color: red;
}
h1 {
  font-size: 1.1rem;
  font-weight: 400;
}
main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rlh;
}
code {
  background: #eee;
  padding: 0.2rlh;
  border-radius: 0.2rlh;
}
  </style>

  <section>
    <h1>Without name attributes</h1>
    <details open>
      <summary>Item 1</summary>
      <p>This is a <code>details</code> element, with a summary inside. It has an <code>open</code> attribute. This causes it to be open by default when the page loads, instead of closed.</p>
    </details>
    <details >
      <summary>Item 2</summary>
      <p>This is just like “Item 1” above, except without the <code>open</code> attribute.</p>
    </details>
    <details>
      <summary>Item 3</summary>
      <p>This is a third item.</p>
    </details>
  </section>
  
  <section>
      <button data-action="open">open all</button>
    <h1>With name attributes on each detail</h1>
    <details name="foobar" open>
      <summary>Item 1</summary>
      <p>In this column, all three items are named with the same name, using the <code>name</code> attribute. Which means any time a user clicks to open one item, any open item will automatically close.</p> 
      <p>Also, here the first item has the <code>open</code> attribute applied, so it’s open by default.</p> 
    </details>
    <details name="foobar">
      <summary>Item 2</summary>
      <p>Notice when you clicked this item, any open item automatically closed.</p>
    </details>
    <details name="foobar">
      <summary>Item 3</summary>
      <p>Using the <code>name</code> attribute can make for a better user experience. Users don’t have to manually manage a lot of open items. And developers don’t have to write any JavaScript to get this affect. The browser does the work.</p>
      <p>Take care, however, to make sure this is the best experience given your usecase. Think about users who might want or need to compare one item to another.</p>
    </details>
  </section>
</main>
<style>
  *{box-sizing: border-box;}

body {margin:0; background-color:#eee;
  font-family: 'Open Sans', sans-serif;
  font-size: 80%;
}

h1, p {margin: 1em 20px 0;}

.wrapper {
  display: flex; 
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
}

article {
  flex: 1 1 200px;
  min-width: 200px; 
  max-width: 400px;
  border: 1px solid #000;
  padding-bottom: 20px;
}

img {
  width: 100%;
}

.dark-pattern {
  visibility: hidden;
  margin-top: 0;
  margin-bottom: 0;
  padding-top:0;
  padding-bottom: 0;
  border-width-top: 0;
  border-bottom: 0;
}
</style>
<main class="wrapper">
  <article>
    <img src="http://labs.thewebahead.net/images/zeldman2.jpg"><h1>Headline</h1><p>All of these beautiful NYC by photos are <a href="https://www.flickr.com/photos/zeldman">Jeffrey Zeldman</a>.</p>
  </article>

  <article><img src="http://labs.thewebahead.net/images/zeldman1.jpg">
  <h1>At vero eros et accumsan</h1><p>Et iusto odio dignissim qui blandit praesent. Nulla non ipsum condimentum, iaculis tellus et, tristique magna.</p></article>
 
  <article>
  <img src="http://labs.thewebahead.net/images/zeldman5.jpg">
  <p>Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum.</p></article>
  
  <article>
  <img src="http://labs.thewebahead.net/images/zeldman6.jpg">
  <h1>Luptatum zzril delenit augue</h1><p>Duis dolore te feugait nulla facilisi.</p></article>

  <article><img src="http://labs.thewebahead.net/images/zeldman7.jpg"></article>

  <article><img src="http://labs.thewebahead.net/images/zeldman10.jpg">
  <h1> Duis commodo ex quam</h1>
  <p>Et molestie sapien viverra eu. Vestibulum commodo elit maximus dui egestas lobortis. Nullam fringilla ultricies nulla nec dictum. Suspendisse potenti. Maecenas blandit sollicitudin est, vitae finibus ex dictum id.</p></article>

  <article><img src="http://labs.thewebahead.net/images/zeldman11.jpg">
    <h1>Aenean</h1>
    <p>Mauris magna elit, finibus id accumsan et, eleifend vitae velit. Ut egestas, ante eu iaculis mollis, ipsum est fermentum libero, eu dignissim mauris est sit amet nulla.</p></article>  
  

  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
  <article class="dark-pattern"></article>
</main>
<h1>Accessible toggle checkbox</h1>
<br>
<style>
  .toggle {
  position: relative;
}
.toggle *,
.toggle *:before,
.toggle *:after {
  box-sizing: border-box;
}
.toggle input[type=checkbox] {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
}
.toggle input[type=checkbox]:focus ~ label .toggle__switch, .toggle input[type=checkbox]:hover ~ label .toggle__switch {
  background-color: #444;
}
.toggle input[type=checkbox]:checked:focus ~ label .toggle__switch, .toggle input[type=checkbox]:checked:hover ~ label .toggle__switch {
  background-color: #34690c;
}
.toggle input[type=checkbox]:checked ~ label .toggle__switch {
  background-color: #529c1a;
}
.toggle input[type=checkbox]:checked ~ label .toggle__switch:before {
  content: attr(data-unchecked);
  left: 0;
}
.toggle input[type=checkbox]:checked ~ label .toggle__switch:after {
  transform: translate3d(28px, 0, 0);
  color: #34690c;
  content: attr(data-checked);
}
.toggle label {
  user-select: none;
  position: relative;
  display: flex;
  align-items: center;
}
.toggle label .toggle__label-text {
  font-size: 1rem;
  padding-right: 30px;
}
.toggle .toggle__switch {
  font-size: 10px;
  height: 30px;
  -webkit-box-flex: 0;
  flex: 0 0 60px;
  border-radius: 30px;
  transition: background-color 0.3s cubic-bezier(0.86, 0, 0.07, 1);
  background: #636060;
  position: relative;
}
.toggle .toggle__switch:before {
  left: 30px;
  font-size: 10px;
  line-height: 30px;
  width: 30px;
  padding: 0 4px;
  color: #e6e6e6;
  content: attr(data-checked);
  position: absolute;
  top: 0;
  text-transform: uppercase;
  text-align: center;
}
.toggle .toggle__switch:after {
  font-weight: 700;
  top: 2px;
  left: 2px;
  border-radius: 15px;
  width: 28px;
  line-height: 26px;
  font-size: 10px;
  transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
  color: #34690c;
  content: attr(data-unchecked);
  position: absolute;
  z-index: 5;
  text-transform: uppercase;
  text-align: center;
  background: white;
  transform: translate3d(0, 0, 0);
}
</style>
<div class="toggle">
  <input id="toggle-demo" type="checkbox">
  <label for="toggle-demo">
    <div class="toggle__label-text">Toggle Me</div>
    <div class="toggle__switch" data-checked="Yes" data-unchecked="No"></div>    
  </label>
</div>
body:has(input[type="checkbox"]:checked) {
  background: blue;
  --primary-color: white;
}
body:has(input[type="checkbox"]:checked) form { 
  border: 4px solid white;
}
body:has(input[type="checkbox"]:checked) form:has(:focus-visible) {
  background: navy;
}
body:has(input[type="checkbox"]:checked) input:focus-visible {
  outline: 4px solid lightsalmon;
}
body:has(option[value="pony"]:checked) {
  --font-family: cursive;
  --text-color: #b10267;
  --body-background: #ee458e;
  --main-background: #f4b6d2;
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":magic_wand::xero-unicorn: End of Year Celebration – A Sprinkle of Magic! :xero-unicorn: :magic_wand:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Hey Wellington!* \nGet ready to wrap up the year with a sprinkle of magic and a lot of fun at our End of Year Event! Here’s everything you need to know:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"fields": [
				{
					"type": "mrkdwn",
					"text": "*:calendar-date-22: When:*\nFriday 22nd, November"
				},
				{
					"type": "mrkdwn",
					"text": "*📍 Where:*\n<https://maps.app.goo.gl/GLoBA1qohkzKJ6La9|*Shed 6*> \n12 Queens Wharf, Wellington Central"
				},
				{
					"type": "mrkdwn",
					"text": "*⏰ Time:*\n4:00 pm - 10:00 pm"
				}
			]
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*:magic_wand::xero-unicorn: Theme:*\n_A Sprinkle of Magic_ – Our theme is inspired by the Xero Unicorn, embracing creativity, inclusivity, and diversity. Expect unique decor, magical moments, and a fun-filled atmosphere!"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*:dress: Dress Code:*\n*Smart casual* – Show your personality, but no Xero tees or lanyards, please! \n\nIf you're feeling inspired by the theme, why not add a little 'Sprinkle of Magic' to your outfit? Think glitter, sparkles, or anything that shows off your creative side! (Totally optional, of course! ✨)"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🚍 Transport Info:*\n*Parking:* A 3 minute drive from the office, with Wilson Parking - Queens Wharf open 24 hours \n*Along the waterfront:* An 11 minute walk from Xero along the waterfront"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🎤 :hamburger: Entertainment & Food:*\nPrepare to be dazzled by live music, cozy chill-out zones, delicious bites, refreshing drinks, and plenty of surprises! "
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*🎟 RSVP Now:* Click <https://xero-wx.jomablue.com/reg/store/eoy_wlg|here> to RSVP! \nMake sure you RSVP by *_Friday, 8th November 2024_*"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":question:Got questions? See the <https://docs.google.com/document/d/1iygJFHgLBRSdAffNsg3PudZCA45w6Wit7xsFxNc_wKM/edit|FAQs> doc or post in the Slack channel.\n\nWe can’t wait to celebrate with you! :partying_face: :xero-love:"
			}
		}
	]
}
public static void main(Args _args)
    {
        #DMF
        Query						  query;
        DMFEntityName				  entityName = "Inventory movement journal headers and lines";
        SharedServiceUnitFileID		  fileId;
        List						  xsltFileList = new List(Types::String);
        boolean						  isGenerated = false;
        VLSAzureSMBFileStorageHandler azureFileStorageProcessor;
        CustParameters				  custParameters = CustParameters::find();
        
        // Update query
        query = new query(dmfutil::getdefaultqueryforentity(entityname));
        querybuilddatasource qbds = query.datasourcetable(tableNum(InventInventoryMovementJournalEntryEntity));

        // Export file
		// Definition group will be created if it is not existed
        DMFDefinitionGroupName definitionGroupName = 'Invent journal entity';

        try
        {
            DMFEntityExporter exporter = new DMFEntityExporter();

            //There are optional parameters also added
            fileId = exporter.exportToFile(
            entityName,//Entity label
            definitionGroupName,//Definition group to reuse
            '',//ExecutionId group to reuse,
            'CSV',//Source format to export in
            'VLSInventJournal',//Specify the field group fields to include in export.
            query.pack(),//Query criteria to export records
            curExt(),//Default curExt()
            null,//List of XSLT files
            true,//showErrorMessages
            false);//showSuccessMessages

            if (fileId != '')
            {
                //Get Azure blob url from guid
                str downloadUrl = DMFDataPopulation::getAzureBlobReadUrl(str2Guid(fileId));

                System.Uri uri = new System.Uri(downloadUrl);
                str fileExt;
                //Get file extension
                if (uri != null)
                {
                    fileExt = System.IO.Path::GetExtension(uri.LocalPath);
                }

                Filename filename = strFmt('InventJournal%1',fileExt);
                System.IO.Stream stream = File::UseFileFromURL(downloadUrl);
                //Send the file to user
                //File::SendFileToUser(stream, filename);

                DMFDefinitionGroup::find(definitionGroupName, true).delete();

                isGenerated = true;

                azureFileStorageProcessor   = new VLSAzureSMBFileStorageHandler();
                azureFileStorageProcessor.parmAccountName(custParameters.VLSOutboundAccountName);
                azureFileStorageProcessor.parmAccountKey(custParameters.VLSOutboundAccessKey);
                azureFileStorageProcessor.parmFileShareName(custParameters.VLSOutboundFileShareName);
                azureFileStorageProcessor.parmDestinationFileShareName(custParameters.VLSOutboundFileShareName);
                azureFileStorageProcessor.parmErrorFileShareName(custParameters.VLSOutboundFileShareName);
                azureFileStorageProcessor.openConnection();
                azureFileStorageProcessor.resetToRootDirectory();
                azureFileStorageProcessor.setDirectory(custParameters.VLSOutboundInProcess);

                azureFileStorageProcessor.uploadFromStream(stream, filename);
                info(strFmt("File %1 has been moved to Azure storage folder", filename));
			 }
            else
            {
                throw error("The file was not generated succefully.");
            }
        }
        catch
        {
            
            throw error("Data export execution failed.");
        }
    }
 #DMF
        SharedServiceUnitFileID fileId;
        DMFDefinitionGroupName definitionGroupName = "MyUniqueDefinitionGroupName";

        try
        {
            str x = "#FieldGroupName_AllFields";


            EntityName      entityName;
            DMFEntity       dmfEntity;


            select firstonly dmfEntity  order by EntityName asc where dmfEntity.TargetEntity == dataEntityViewStr(SalesOrderV3Entity);

            entityName = dmfEntity.EntityName;

            Query                query = new Query(DMFUtil::getDefaultQueryForEntity(entityName, "ExportTest"));

            DMFEntityExporter exporter = new DMFEntityExporter();
            fileId = exporter.exportToFile(entityName,
                                definitionGroupName,
                                '', //Optional: ExecutionID
                                "XML-Attribute", //Optional::SourceName
                                x, //Optional field selection
                                query.pack(), //Optional: Filtered Query
                                curExt() //Optional: DataAReaId
                                );


            if (fileId != '')
            {
                str downloadUrl = DMFDataPopulation::getAzureBlobReadUrl(str2Guid(fileId));

                System.Uri uri = new System.Uri(downloadUrl);
                str fileExt;

                if (uri != null)
                {
                    fileExt = System.IO.Path::GetExtension(uri.LocalPath);
                }
                
                Filename filename = strFmt('MyFirstExport%1',fileExt);
                System.IO.Stream stream = File::UseFileFromURL(downloadUrl);
                File::SendFileToUser(stream, filename);

            }
            else
            {
                throw error("DMF execution failed and details were written to the execution log");
            }
        }
        catch
        {
            error("error occurred while exporting");
        }
[
  {
    $project: {
      _id: 1,
      followUps: 1,
      duplicateNames: {
        $filter: {
          input: {
            $map: {
              input: "$followUps",
              as: "f",
              in: "$$f.name"
            }
          },
          as: "name",
          cond: {
            $and: [
              { $ne: ["$$name", "Check_in"] }, 
              {
                $gt: [
                  { $size: {
                      $filter: {
                        input: {
                          $filter: {
                            input: "$followUps",
                            as: "innerF",
                            cond: { $eq: ["$$innerF.name", "$$name"] }
                          }
                        },
                        as: "duplicate",
                        cond: { $eq: ["$$duplicate.name", "$$name"] }
                      }
                    }
                  },
                  1
                ]
              }
            ]
          }
        }
      }
    }
  },
  {
    $match: {
      $expr: { $gt: [{ $size: "$duplicateNames" }, 0] }
    }
  },
  {
    $project: {
      _id: 1
    }
  }
]
Are you ready to take your business into the future of finance? At Maticz, we specialize in revolutionary crypto development services designed to power up your business in the digital age. Whether you are seeking to embark your own crypto exchange, develop a custom blockchain, or create the next big thing in decentralized finance (DeFi) we have got you covered.

Why Choose Maticz?

Proven Expertise: With years of experience and track record of success, Maticz is trusted by businesses worldwide to deliver innovative crypto solutions.

Tailored Solutions: Our development services are designed to meet the specific needs of your business, ensuring seamless integration and long-term scalability.

Security First: We prioritize security at every step, protecting your platform and users with the latest in blockchain technology.

Cutting-Edge Technology: From NFT marketplaces to decentralized exchanges (DEXs) and tokenization platforms, we’re constantly innovating to stay ahead of the curve.

For Entrepreneurs and Enterprises Alike
Whether you're an entrepreneur looking to disrupt the market or an established business ready to adopt blockchain technology, Maticz offers end-to-end cryptocurrency development solutions tailored to your needs.

Your Vision, Our Expertise

Ready to launch your crypto project? Partner with Maticz, the cryptocurrency development company that’s powering the digital transformation of businesses across the globe.

Get a free live demo along with video guidelines and price plan,

Email: sales@maticz.com
Whatsapp: +91 93845 87998
Telegram: @maticzofficial
Skype: live:.cid.817b888c8d30b212
 
import pygame
import random
import time
speed = 15
x = 720
y = 480
black = pygame.Color(0, 0, 0)
white = pygame.Color(255, 255, 255)
red = pygame.Color(255, 0, 0)
green = pygame.Color(0, 255, 0)
blue = pygame.Color(0, 0, 255)
pygame.init()
(5, 0)
window = pygame.display.set_mode((x, y))
fps = pygame.time.Clock()
sp = [100, 50]
sb = [[100,50],
      [90, 50],
      [80, 50],
     [70, 50]]
fp = [random.randrange(1, (x//10)) * 10,
      random.randrange(1, (y//10)) * 10]
fruit_spawn = True
dr = 'RIGHT'
change_to = dr
while True:
    for event in pygame.event.get():
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_UP:
                sp[1] -= 10
            if event.key == pygame.K_DOWN:
                sp[1] += 10
            if event.key == pygame.K_LEFT:
                sp[0] -= 10
            if event.key == pygame.K_RIGHT:
                sp[0] += 10

                
#growth happens if tail not removed and fruit is eaten 
sb.insert(0, list(sp))
if sp[0] == fp[0] and sp[1] == fp[1]:
fruit_spawn = False
#tail constantly removed and no growth if fruit not eaten
else:
snake_body.pop()
if not fruit_spawn:
fp = [random.randrange(1,(x//10)) * 10, random.randrange(1,(y//10)) * 10]
fruit_spawn = True
window.fill(black)
for pos in sb:
pygame.draw.rect(window, green,
pygame.Rect(pos[0], pos[1], 10, 10))
pygame.draw.rect(window, white, pygame.Rect(fruit_position[0], fruit_position[1], 10, 10))
pygame.display.update()
fps.tick(snake_speed)
struct node {
    node* arr[26] = {nullptr};
    bool flag = false;
    vector<string> below;
    bool contains(char ch) {
        if (arr[ch - 'a']) return true;
        else return false;
    }
    void add(char ch, node* sub) {
        arr[ch - 'a'] = sub;
    }
    node* next(char ch) {
        return arr[ch - 'a'];
    }
    void end() {
        flag = true;
    }
    bool isend() {
        return flag;
    }
    void ins(string bel) {
        below.push_back(bel);
    }
    void put(vector<string>& res) {
        int count = 0;
        for (auto it : below) {
            res.push_back(it);
            if (++count == 3) break;
        }
    }
};

class Trie {
private:
    node* root = new node();
public:
    void insert(string word) {
        node* nod = root;
        for (int i = 0; i < word.length(); ++i) {
            if (!nod->contains(word[i])) {
                nod->add(word[i], new node()); 
            }
            nod = nod->next(word[i]);
            nod->ins(word);
        }
        nod->end();
    }

    vector<vector<string>> search(string word) {
        vector<vector<string>> res;
        node* nod = root;
        for (int i = 0; i < word.length(); ++i) {
            vector<string> ans;
            if (!nod->contains(word[i])) {
                break;
            }
            nod = nod->next(word[i]);
            nod->put(ans);
            res.push_back(ans);
        }
        while (res.size() < word.size()) {
            res.push_back({});
        }
        return res;
    }
};

class Solution {
public:
    vector<vector<string>> suggestedProducts(vector<string>& products, string searchWord) {
        sort(products.begin(), products.end());
        Trie a;
        for (auto it : products) {
            a.insert(it);
        }
        return a.search(searchWord);
    }
};
function lazyLoad() {
  const images = document.querySelectorAll('img[data-src]');
  const iframes = document.querySelectorAll('iframe[data-src]');
  const elements = [...images, ...iframes]; 

  const observer = new IntersectionObserver(entries => {
    entries.forEach(entry => {
      if (entry.isIntersecting) {
        const element = entry.target;
        if (element.tagName === 'IMG') {
          element.src = element.dataset.src;
        } else if (element.tagName === 'IFRAME') {
          element.src = element.dataset.src;
        }
        observer.unobserve(element);
      }
    });
  });

  elements.forEach(element => observer.observe(element));
}

document.addEventListener('DOMContentLoaded', lazyLoad);
import java.awt.*;
import java.awt.event.*;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;

// Main application class
class MiniGameApp {
    public static void main(String[] args) {
        // Start with Whack-A-Mole
        new WhackAMole();
    }
}

// Whack-A-Mole Game Class
class WhackAMole extends Frame implements ActionListener {
    private Button[] buttons = new Button[9];
    private int moleIndex = -1;
    private Random random = new Random();
    private Timer timer;
    private int score = 0;
    private Label scoreLabel;

    public WhackAMole() {
        // Frame setup
        setTitle("Whack-A-Mole");
        setSize(500, 500);
        setLayout(new GridLayout(4, 3));
        setBackground(new Color(255, 228, 196)); // Light peach background

        // Initialize buttons
        for (int i = 0; i < buttons.length; i++) {
            buttons[i] = new Button("");
            buttons[i].setBackground(new Color(211, 211, 211)); // Light gray
            buttons[i].setFont(new Font("Arial", Font.BOLD, 16));
            buttons[i].addActionListener(this);
            add(buttons[i]);
        }

        scoreLabel = new Label("Score: 0", Label.CENTER);
        scoreLabel.setFont(new Font("Arial", Font.BOLD, 18));
        scoreLabel.setBackground(new Color(255, 255, 224)); // Light yellow
        scoreLabel.setForeground(Color.BLUE); // Blue text
        add(scoreLabel);

        // Timer to spawn mole every second
        timer = new Timer();
        timer.scheduleAtFixedRate(new TimerTask() {
            @Override
            public void run() {
                spawnMole();
            }
        }, 0, 1000);

        // Button to switch to Rock-Paper-Scissors
        Button switchGameBtn = new Button("Switch to Rock-Paper-Scissors");
        switchGameBtn.setBackground(new Color(100, 149, 237)); // Cornflower blue
        switchGameBtn.setForeground(Color.WHITE); // White text
        switchGameBtn.setFont(new Font("Arial", Font.BOLD, 16));
        switchGameBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                dispose(); // Close the current game frame
                new RockPaperScissors(); // Open the Rock-Paper-Scissors game
            }
        });
        add(switchGameBtn);

        setVisible(true);
    }

    private void spawnMole() {
        // Reset previous mole
        if (moleIndex != -1) {
            buttons[moleIndex].setBackground(new Color(211, 211, 211)); // Light gray
            buttons[moleIndex].setLabel("");
        }

        // Spawn new mole at random index
        moleIndex = random.nextInt(buttons.length);
        buttons[moleIndex].setBackground(Color.GREEN); // Green for mole
        buttons[moleIndex].setLabel("Mole!");
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        Button clickedButton = (Button) e.getSource();
        // Check if the clicked button is the mole
        if (clickedButton == buttons[moleIndex]) {
            score++;
            scoreLabel.setText("Score: " + score);
            clickedButton.setBackground(new Color(211, 211, 211)); // Reset to light gray
            clickedButton.setLabel("");
        }
    }
}

// Rock-Paper-Scissors Game Class
class RockPaperScissors extends Frame implements MouseListener {
    Image rockImg, paperImg, scissorImg;
    Canvas rockCanvas, paperCanvas, scissorCanvas;
    TextField userChoiceField, computerChoiceField, resultField;
    String userChoice, computerChoice;
    Random random;

    RockPaperScissors() {
        random = new Random();
        setSize(600, 600);
        setTitle("Rock Paper Scissors Game");
        setLayout(new BorderLayout());
        setBackground(new Color(135, 206, 250)); // Sky blue background

        // Create a panel for the images
        Panel imagePanel = new Panel();
        imagePanel.setLayout(new GridLayout(1, 3));

        rockCanvas = createCanvas("rock.png");
        paperCanvas = createCanvas("paper.png");
        scissorCanvas = createCanvas("scissors.png");

        imagePanel.add(rockCanvas);
        imagePanel.add(paperCanvas);
        imagePanel.add(scissorCanvas);

        // Create a panel for user choice, computer choice, and result
        Panel infoPanel = new Panel();
        infoPanel.setLayout(new GridLayout(4, 1));

        userChoiceField = new TextField("Your Choice: ");
        userChoiceField.setEditable(false); // Make it read-only
        computerChoiceField = new TextField("Computer's Choice: ");
        computerChoiceField.setEditable(false); // Make it read-only
        resultField = new TextField("Result: ");
        resultField.setEditable(false); // Make it read-only

        infoPanel.add(userChoiceField);
        infoPanel.add(computerChoiceField);
        infoPanel.add(resultField);

        // Button to switch back to Whack-A-Mole
        Button switchGameBtn = new Button("Switch to Whack-A-Mole");
        switchGameBtn.setBackground(new Color(255, 99, 71)); // Tomato color
        switchGameBtn.setForeground(Color.WHITE); // White text
        switchGameBtn.setFont(new Font("Arial", Font.BOLD, 16));
        switchGameBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                dispose(); // Close the current game frame
                new WhackAMole(); // Open the Whack-A-Mole game
            }
        });
        infoPanel.add(switchGameBtn);

        // Add panels to the frame
        add(imagePanel, BorderLayout.CENTER);
        add(infoPanel, BorderLayout.SOUTH);

        setVisible(true);
    }

    private Canvas createCanvas(String imgPath) {
        Canvas canvas = new Canvas() {
            public void paint(Graphics g) {
                Image img = Toolkit.getDefaultToolkit().getImage(imgPath);
                g.drawImage(img, 0, 0, 100, 100, this);
            }
        };
        canvas.setSize(100, 100);
        canvas.addMouseListener(this);
        return canvas;
    }

    public void mouseClicked(MouseEvent e) {
        // Determine user choice based on the clicked canvas
        if (e.getSource() == rockCanvas) {
            userChoice = "rock";
        } else if (e.getSource() == paperCanvas) {
            userChoice = "paper";
        } else if (e.getSource() == scissorCanvas) {
            userChoice = "scissor";
        }

        // Update user choice field
        userChoiceField.setText("Your Choice: " + userChoice);
        
        // Set computer choice only after user choice is made
        setComputerChoice();

        // Determine the result based on user and computer choices
        String result = determineWinner(userChoice, computerChoice);
        resultField.setText("Result: " + result);
        computerChoiceField.setText("Computer's Choice: " + computerChoice);
    }

    private void setComputerChoice() {
        int b = random.nextInt(3);
        if (b == 0) computerChoice = "rock";
        else if (b == 1) computerChoice = "paper";
        else computerChoice = "scissor";
    }

    public String determineWinner(String userChoice, String computerChoice) {
        if (userChoice.equals(computerChoice)) return "It's a tie!";
        if (userChoice.equals("rock")) return computerChoice.equals("scissor") ? "You win!" : "You lose!";
        if (userChoice.equals("paper")) return computerChoice.equals("rock") ? "You win!" : "You lose!";
        return computerChoice.equals("paper") ? "You win!" : "You lose!";
    }

    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mousePressed(MouseEvent e) {}
    public void mouseReleased(MouseEvent e) {}
}
# run the command:
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

# Select the device in the Safely Remove Hardware dialog and click Stop. The device can then be safely unplugged.
⚡️ Awesome LWC Collection
   

About the project
The repository should provide a collection of ready-to-use Lightning Web Components that might help your SFDX project and is intended to grow over time. Additionally, it also includes an initial configuration of Prettier, linting rules, git hooks and unit tests as well as useful VS Code settings. The setup really focuses on LWC development.

Components available
The following list of components is part of this repo. All components contain corresponding unit tests and docs.

Base64 To PDF
Content Document Table
CSV To Datatable
Custom Datatable
Custom Map View
Custom Slider
Drag & Drop Example
Hello World
iFrame
Local Development Wrapper
Multi Select Combobox
Open Record Page Flow Action
Render 3D Elements (Three.js)
Take User Profile Picture (Webcam)
Visualforce To PDF
# Run these two commands from an elevated command prompt:
MD C:\Drivers_Backup
pnputil /export-driver * C:\Drivers_Backup
<a class="slds-button slds-button_brand" href="{!RecordLink}" target="_self">Finish</a>
#include <iostream>
using namespace std;

// Function to sort the array using insertion sort algorithm.
void processSelectionSort(int arr[], int n) {
  
  for (int i = 0 ;i<n;i++){
    int minIndex=i;
     for (int j = i ;j<n;j++){
        if(arr[j]<arr[minIndex]){
           minIndex = j;
        }
    }
    std::swap(arr[i],arr[minIndex]);
  }
}

void displayArray(int arr[], int n) {
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
}

// Function to dynamically allocate an array and fill it with random values.
void fillDynamicArrayWithRandomValues(int** arr, int* n) {
    cout << "Enter the size of the array: ";
    cin >> *n;
    *arr = new int[*n];
    srand(time(0)); // Seed for random number generation
    for (int i = 0; i < *n; i++) {
        (*arr)[i] = rand() % 1000; // Fill with random numbers between 0 and 999
    }
}

int main() {
    int* arr;
    int n;
    fillDynamicArrayWithRandomValues(&arr, &n);
    cout << "Unsorted array: ";
    displayArray(arr, n);
    processSelectionSort(arr, n);
    cout << "Sorted array: ";
    displayArray(arr, n);
    delete[] arr; // Deallocate dynamically allocated memory
    return 0;
}
<style>
  .noto--exploding-head::after {

  display: inline-block;

  width: 5em;

  height: 5em;

  vertical-align: -0.125em;

  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128'%3E%3Cdefs%3E%3Cpath id='notoExplodingHead0' fill='%2333a3c3' d='M119.45 65.8c-1.27 14.33-7.2 26.51-17.34 35.5c-10.6 9.3-25 14.5-40.4 14.5c-17.97 0-36.84-7.28-48-22.71c.1.17.2.34.31.5c.35.55.7 1.08 1.07 1.61c.27.39.53.78.81 1.16q.885 1.2 1.83 2.34c.3.36.61.7.91 1.05c.43.49.87.97 1.31 1.44a46 46 0 0 0 2.92 2.84c.33.3.67.58 1 .87c.57.48 1.14.95 1.72 1.41c.34.27.69.53 1.04.79c.59.44 1.2.86 1.81 1.28c.28.19.56.39.84.58c.85.55 1.71 1.08 2.59 1.58c.33.19.67.37 1 .55c.65.36 1.31.7 1.97 1.04c.32.16.65.33.97.48c.93.45 1.87.87 2.83 1.27c.25.1.5.19.74.29c.77.31 1.55.6 2.34.88c.33.12.67.23 1 .35c.87.29 1.75.57 2.63.82c.16.05.32.1.47.14c1.03.29 2.06.54 3.1.78c.31.07.61.13.92.2c.83.18 1.66.33 2.49.48c.27.05.53.1.79.14c1.06.17 2.12.31 3.18.43c.23.03.46.04.68.07q1.305.135 2.61.21c.3.02.6.04.89.05c1.07.05 2.15.09 3.22.09c15.4 0 29.8-5.2 40.4-14.5c.7-.62 1.38-1.26 2.03-1.9c.22-.22.44-.45.66-.68c.42-.43.85-.87 1.26-1.31c.26-.28.5-.57.75-.86c.35-.4.7-.8 1.04-1.22c.26-.32.51-.65.76-.97c.31-.39.61-.78.91-1.19c.25-.35.5-.71.74-1.06c.27-.39.54-.78.8-1.18c.24-.38.48-.76.71-1.14c.24-.39.48-.78.71-1.18s.45-.81.67-1.21c.21-.39.42-.78.62-1.18c.22-.42.42-.85.63-1.29c.18-.39.36-.78.54-1.18c.2-.45.39-.9.58-1.36c.16-.39.31-.78.46-1.17c.18-.47.36-.95.52-1.43c.13-.38.26-.77.39-1.16c.16-.5.32-1 .47-1.51c.11-.38.21-.76.32-1.15c.14-.53.28-1.06.41-1.59c.09-.37.17-.74.25-1.12c.12-.56.24-1.12.35-1.69c.07-.35.12-.71.18-1.06c.1-.6.2-1.2.28-1.81c.04-.32.08-.64.11-.97c.08-.65.16-1.3.22-1.96c.02-.25.03-.5.05-.75c.06-.74.1-1.49.14-2.24h-2.21z'/%3E%3C/defs%3E%3Cpath fill='%2300ffdd' d='M103.06 60.5c7.19-3.2 21.36-9.27 21.36-9.27s-13.29-5.46-20.26-8.47c3.03-2.47 17.55-9.52 17.55-9.52l-22.15 1.83l12.22-29.53S92.54 20.15 85.07 22.02c.03-3.43.1-12.51.1-12.51s-6.81 7.46-10.19 9.97C71.05 13.65 63.54 4.72 63.54 4.72s-6.71 8.21-10.41 13.87C50.09 16.13 41.94 4.58 41.94 4.58s1.88 14.07 1.72 17.74c-7.8-1.87-22.21-8.37-22.21-8.37S27.69 25.79 30 31.86c-4.23-.03-18.39-.8-23.45-1.11c4.09 3.1 21.17 15.44 21.17 15.44L3.58 50.87s17.17 4.15 24.14 7.16c-1.7 1.38-6.13 4.93-9.69 7.77h91.4c-2.31-1.83-4.44-3.59-6.37-5.3'/%3E%3ClinearGradient id='notoExplodingHead1' x1='64.117' x2='64.117' y1='60.706' y2='67.834' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23630b73'/%3E%3Cstop offset='1' stop-color='%23039be5'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23notoExplodingHead1)' d='M48.28 45.33h31.67v20.48H48.28z'/%3E%3Cpath fill='%23ffea5c' d='M120.13 54.86c.19-.5.3-1.03.3-1.59c0-2.5-2.03-4.53-4.53-4.53c-2.07 0-3.8 1.4-4.34 3.3a4.51 4.51 0 0 0-2.99 4.24c0 2.5 2.03 4.53 4.53 4.53c.29 0 .57-.03.85-.09c.62.32 1.31.52 2.06.52c2.5 0 4.53-2.03 4.53-4.53c0-.65-.16-1.28-.41-1.85'/%3E%3Cpath fill='%233b4cee' d='M103.31 6.31a4.197 4.197 0 0 0-2.44 5.42c.49 1.29 1.54 2.18 2.77 2.54A4.203 4.203 0 0 0 109 16.6a4.197 4.197 0 0 0 2.44-5.42c-.49-1.29-1.54-2.18-2.77-2.54c-.87-2.09-3.23-3.14-5.36-2.33'/%3E%3Cpath fill='%23007300' d='M19.42 49.18a3.45 3.45 0 1 0-6.84-.65c0 .52.12 1 .32 1.44c-2 .1-3.64 1.69-3.76 3.74a3.98 3.98 0 0 0 3.74 4.2c1.35.08 2.58-.53 3.36-1.52c.53.32 1.15.52 1.81.56a3.98 3.98 0 0 0 4.2-3.74c.11-1.87-1.1-3.52-2.83-4.03'/%3E%3Cellipse cx='14.87' cy='17' fill='%23f73762' rx='5' ry='4.5'/%3E%3Cellipse cx='113.28' cy='24.83' fill='%23ff17c8' rx='5' ry='4.5'/%3E%3Cpath fill='%23d2d' d='M99.74 31.65c-.86-.48-1.11-1.62-.76-2.54c.53-1.38.86-2.85.94-4.37c.46-8.78-7.23-15.98-17.13-15.88c-3.49.03-6.74.99-9.49 2.59c-2.29-4.48-7.2-7.56-12.89-7.5c-5.9.07-10.88 3.5-12.94 8.28c-1.49-.48-3.07-.74-4.7-.73c-8.02.07-13.82 4.78-13.24 13.57c.1 1.49 1.28 4.3 1.28 4.3s-2.41.59-4.39 3.93c-1.61 2.71-1.78 7.08-.38 9.96c2.19 4.51 8.27 6.63 12.79 4.46c.64-.31 1.37-.7 2.03-.43c.33.14 1.71 5.2 14.13 7.78c7.16 1.49 15.56-3.76 16.03-3.77c.54-.01 1.02.32 1.47.62c0 0 3.32 3.81 10.75 2.03c7.01-1.67 7.69-6.43 8.29-6.62c.48-.15 8.7 2.43 12.17-5.44c1.52-3.52-1.07-8.63-3.96-10.24'/%3E%3Cpath fill='%23731983' d='M29.45 24.11c.06 1.25.35 4.6 1.88 5.54c1.03.63 1.95.93 2.76 1.03c1.57.19 2.52-1.75 1.46-2.92c-1.16-1.27-2.41-3.45-2.89-7.1c-.69-5.15 3.36-7.74 3.36-7.74s-6.96 2.82-6.57 11.19'/%3E%3Cpath fill='%23630b73' d='M103.66 41.91c1-2.26.66-5.45-1.16-7.49c0 0 1.11 2.89-.29 5.76c-1.42 2.91-4.43 5.63-7.57 4.88c-1.96-.47-.04-3.69-2.8-8.43c.14 4.47.05 14.6-13.07 15.44c-2.4.15-8.15-1.92-8.49-5.4c-.76-7.58 6.44-6.53 7.47-6.37c2.47.37 5.17-.7 5.58-2.65c.37-1.77-.49-2.47-1.3-3.17c-2.32-1.98-5.97-1.61-8.55.03c-3.92 2.5-5.73 9.12-8.84 12.33c-3.63 3.74-9.51 4.64-14.52 3.2c-8.58-2.47-11.26-13.41-11.26-13.41c-1.12 2.86-.13 6.62.56 8.3c-8.55 1.77-12.82-2.68-14.14-3.98c.14.8.37 1.59.73 2.33c2.19 4.51 8.27 6.63 12.79 4.46c.64-.31 1.37-.7 2.03-.43c.33.14 1.71 5.2 14.13 7.78c7.16 1.49 15.56-3.76 16.03-3.77c.54-.01 1.02.32 1.47.62c0 0 3.32 3.81 10.75 2.03c7.01-1.67 7.69-6.43 8.29-6.62c.48-.16 8.7 2.42 12.16-5.44'/%3E%3Cpath fill='%23731983' d='M67.06 5.42s1.33 1.9 1.6 2.89c1.05 3.87-.93 6.44-1.5 7.49c-.3.56-.57 1.21-.36 1.8c.23.64.93.98 1.59 1.08c1.78.29 3.63-.69 4.62-2.19c.97-1.5 2.74-7.52-5.95-11.07m31.92 23.69c.53-1.38.86-2.85.94-4.37c.18-3.38-.86-6.51-2.76-9.1c.95 1.73 1.19 3.88.79 5.84c-.55 2.67-2.26 5-4.24 6.87c-2.41 2.27-.7 3.32.69 3.32c3.35-.01 4.39-2.07 4.58-2.56'/%3E%3Cpath fill='%23039be5' d='M70.5 65.8v-6.72c0-1.26-1.12-2.28-2.5-2.28s-2.5 1.02-2.5 2.28v6.72zm-9.88 0V55.56c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5V65.8z'/%3E%3CradialGradient id='notoExplodingHead2' cx='63.72' cy='-2088.9' r='56.957' gradientTransform='matrix(1 0 0 -1 0 -2026)' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='.5' stop-color='%23bdc4c7'/%3E%3Cstop offset='.919' stop-color='%23375353'/%3E%3Cstop offset='1' stop-color='%23a700b5'/%3E%3C/radialGradient%3E%3Cpath fill='url(%23notoExplodingHead2)' d='M63.72 118.8c15.4 0 29.8-5.2 40.4-14.5c10.83-9.61 16.87-22.86 17.53-38.5H5.79c1.48 36.38 30.74 53 57.93 53'/%3E%3Cpath fill='%2333a3c3' d='M13.54 92.86c.15.25.33.48.49.73c-.1-.17-.21-.34-.31-.5c-.06-.08-.13-.15-.18-.23'/%3E%3Cuse href='%23notoExplodingHead0'/%3E%3Cuse href='%23notoExplodingHead0'/%3E%3Cpath fill='%2333a3c3' d='M121.51 68.04c.06-.74.11-1.49.14-2.24h-.01c-.03.75-.08 1.5-.13 2.24'/%3E%3CradialGradient id='notoExplodingHead3' cx='63.72' cy='-2088.9' r='56.957' gradientTransform='matrix(1 0 0 -1 0 -2026)' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='.5' stop-color='%23bdc4c7'/%3E%3Cstop offset='.919' stop-color='%23375353'/%3E%3Cstop offset='1' stop-color='%23a700b5'/%3E%3C/radialGradient%3E%3Cpath fill='url(%23notoExplodingHead3)' d='M121.51 68.04c.06-.74.11-1.49.14-2.24h-.01c-.03.75-.08 1.5-.13 2.24'/%3E%3Cpath fill='%23370037' d='M77.93 104.94c0 5.6-6.19 8.89-13.82 8.89s-13.82-3.29-13.82-8.89s6.19-11.69 13.82-11.69s13.82 6.09 13.82 11.69'/%3E%3Ccircle cx='41.6' cy='75.13' r='15.51' fill='%23fdd'/%3E%3Cellipse cx='41.6' cy='75.13' fill='%23370037' rx='6.67' ry='6.77'/%3E%3Ccircle cx='86.6' cy='75.13' r='15.51' fill='%23fdd'/%3E%3Cellipse cx='86.62' cy='75.21' fill='%23370037' rx='6.67' ry='6.77'/%3E%3C/svg%3E");

}
</style>
</head>
<main class="noto--exploding-head">
  </main>
star

Wed Oct 16 2024 16:37:09 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Wed Oct 16 2024 15:45:51 GMT+0000 (Coordinated Universal Time)

@Rehbar #javascript

star

Wed Oct 16 2024 15:33:04 GMT+0000 (Coordinated Universal Time)

@Rehbar #javascript

star

Wed Oct 16 2024 15:30:05 GMT+0000 (Coordinated Universal Time)

@shivamp

star

Wed Oct 16 2024 15:27:00 GMT+0000 (Coordinated Universal Time)

@shivamp

star

Wed Oct 16 2024 14:59:23 GMT+0000 (Coordinated Universal Time)

@usman13

star

Wed Oct 16 2024 13:06:21 GMT+0000 (Coordinated Universal Time)

@webisko #php

star

Wed Oct 16 2024 10:42:51 GMT+0000 (Coordinated Universal Time) https://www.ntlite.com/community/index.php?threads/windows-11.2235/page-55#post-47349:~:text=admin%20mode%20and-,use%20Dism%20/Online%20/Get%2DFeatureinfo%20/Featurename%3ARecall%20to%20check%20yours.%0A%0AIF%20it%20is%20enabled%2C%20use%20Dism%20/Online%20/Disable%2DFeature%20/Featurename%3ARecall%20to%20disable%20it,-I%20have%20this

@Curable1600 #windows

star

Wed Oct 16 2024 10:09:42 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Wed Oct 16 2024 10:07:47 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Wed Oct 16 2024 09:05:06 GMT+0000 (Coordinated Universal Time) https://gamma.app/docs/Gioi-thieu-chung-ve-Truong-Nhat-ngu-Akamonkai-0lf8ui8pskyuc1w?mode

@hoangvip

star

Wed Oct 16 2024 09:04:26 GMT+0000 (Coordinated Universal Time) https://gamma.app/docs/Gioi-thieu-chung-ve-Truong-Nhat-ngu-Akamonkai-0lf8ui8pskyuc1w?mode

@hoangvip

star

Wed Oct 16 2024 05:12:52 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Wed Oct 16 2024 05:12:52 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Wed Oct 16 2024 03:14:34 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Tue Oct 15 2024 22:01:50 GMT+0000 (Coordinated Universal Time) https://community.shopify.com/c/shopify-discussions/how-to-add-my-own-video-to-product-page-not-youtube-video/td-p/558698

@caughlan

star

Tue Oct 15 2024 21:23:25 GMT+0000 (Coordinated Universal Time) https://salesforce.stackexchange.com/questions/337563/cant-delete-flow-version-because-its-referenced-by-deleted-flow-interviews

@dannygelf #flow #salesforce #slds

star

Tue Oct 15 2024 17:04:14 GMT+0000 (Coordinated Universal Time)

@shivamp

star

Tue Oct 15 2024 14:37:49 GMT+0000 (Coordinated Universal Time)

@Belle #c++

star

Tue Oct 15 2024 14:08:05 GMT+0000 (Coordinated Universal Time)

@Shira

star

Tue Oct 15 2024 11:10:40 GMT+0000 (Coordinated Universal Time)

@wheedo

star

Tue Oct 15 2024 08:41:59 GMT+0000 (Coordinated Universal Time)

@wheedo

star

Tue Oct 15 2024 08:01:45 GMT+0000 (Coordinated Universal Time) https://medium.com/geekculture/top-nft-business-ideas-60e2913e264c

@LilianAnderson #nftbusiness #nftmonetaryvalue #startupopportunities #nftentrepreneurship #nftbusinessideas2024

star

Tue Oct 15 2024 07:25:45 GMT+0000 (Coordinated Universal Time)

@ziaurrehman #html

star

Tue Oct 15 2024 04:39:37 GMT+0000 (Coordinated Universal Time) https://developer.mozilla.org/en-US/docs/Web/API/Document/scrollingElement

@cbmontcw

star

Tue Oct 15 2024 04:37:59 GMT+0000 (Coordinated Universal Time) https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering

@cbmontcw

star

Tue Oct 15 2024 04:34:30 GMT+0000 (Coordinated Universal Time) https://codepen.io/jensimmons/pen/dybKOxm

@cbmontcw

star

Tue Oct 15 2024 04:29:38 GMT+0000 (Coordinated Universal Time) https://codepen.io/jensimmons/pen/poGBroL

@cbmontcw

star

Tue Oct 15 2024 04:18:46 GMT+0000 (Coordinated Universal Time) https://codepen.io/jensimmons/pen/XmYyeP

@cbmontcw

star

Tue Oct 15 2024 04:16:36 GMT+0000 (Coordinated Universal Time) https://codepen.io/jemin/pen/RwaqNoz?editors

@cbmontcw

star

Tue Oct 15 2024 04:10:24 GMT+0000 (Coordinated Universal Time) https://webkit.org/blog/13096/css-has-pseudo-class/#styling-form-states-without-js

@cbmontcw

star

Tue Oct 15 2024 04:08:58 GMT+0000 (Coordinated Universal Time) https://webkit.org/blog/13096/css-has-pseudo-class/

@cbmontcw ##css ##themes ##lightdark

star

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

@FOHWellington

star

Mon Oct 14 2024 16:56:21 GMT+0000 (Coordinated Universal Time) https://dynacodeing.wordpress.com/2020/03/04/exporting-the-data-from-data-entities-through-x-code/

@pavankkm

star

Mon Oct 14 2024 16:54:35 GMT+0000 (Coordinated Universal Time) https://community.dynamics.com/forums/thread/details/?threadid

@pavankkm

star

Mon Oct 14 2024 16:03:20 GMT+0000 (Coordinated Universal Time) https://www.thiscodeworks.com/Face_DandR

@Praanesh #python

star

Mon Oct 14 2024 12:29:45 GMT+0000 (Coordinated Universal Time)

@CodeWithSachin #aggregation #mongodb #$objecttoarray #$addfiels

star

Mon Oct 14 2024 12:29:37 GMT+0000 (Coordinated Universal Time) https://maticz.com/cryptocurrency-development-company

@jamielucas #drupal

star

Mon Oct 14 2024 11:32:07 GMT+0000 (Coordinated Universal Time)

@Alexlotl

star

Mon Oct 14 2024 11:28:23 GMT+0000 (Coordinated Universal Time)

@utp #c++

star

Mon Oct 14 2024 10:32:36 GMT+0000 (Coordinated Universal Time) https://www.google.com/search?q

@cbmontcw

star

Mon Oct 14 2024 07:45:40 GMT+0000 (Coordinated Universal Time)

@dark

star

Mon Oct 14 2024 06:26:47 GMT+0000 (Coordinated Universal Time) https://woshub.com/hide-safely-remove-hardware-icon-windows/#:~:text=To%20safely%20remove,be%20safely%20unplugged.

@Curable1600 #windows

star

Mon Oct 14 2024 05:53:14 GMT+0000 (Coordinated Universal Time) https://github.com/waynechungvs/awesome-lwc-collection

@WayneChung

star

Mon Oct 14 2024 05:31:47 GMT+0000 (Coordinated Universal Time) https://travelsaga.com/new-year-party-dubai

@travelsaga #newyearparty #dubainewyearparty #newyearcelebration #newyeareve

star

Mon Oct 14 2024 05:07:45 GMT+0000 (Coordinated Universal Time) https://www.elevenforum.com/t/driverstoreexplorer-shows-many-entries-how-to-remove-non-essential-drivers.24260/#:~:text=Export%20all%20your%20drivers%20%22just%20in%20case%22.%20To%20do%20so%2C%20run%20these%20two%20commands%20from%20an%20elevated%20command%20prompt%3A%0A%0AMD%20C%3A%5CDrivers_Backup%0Apnputil%20/export%2Ddriver%20*%20C%3A%5CDrivers_Backup

@Curable1600 #windows

star

Mon Oct 14 2024 02:33:17 GMT+0000 (Coordinated Universal Time) https://salesforcetime.com/2024/10/12/using-returl-to-redirect-users-when-flows-finish/

@WayneChung

star

Mon Oct 14 2024 00:28:29 GMT+0000 (Coordinated Universal Time)

@deshmukhvishal2 #cpp

star

Sun Oct 13 2024 21:44:58 GMT+0000 (Coordinated Universal Time)

@EPICCodeMaster #css

Save snippets that work with our extensions

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