Snippets Collections
type RemoveNaughtyChildren<T> = {
  [K in keyof T as K extends `naughty_${string}` ? never : K]: T[K];
};
.center-five-columns,
.center-seven-columns {
    display: flex;
    column-gap: 30px;
    row-gap: 50px;
    justify-content: center;
    flex-wrap: wrap;
}

.center-five-columns .flex_column,
.center-seven-columns .flex_column {
    width: 100% !important;
}

@media (min-width: 641px) {
    .center-seven-columns .flex_column,
    .center-five-columns .flex_column {
        width: calc(50% - 15px) !important;
    }
}

@media (min-width: 800px) {
    .center-seven-columns .flex_column,
    .center-five-columns .flex_column {
        width: calc(33.33% - 20px) !important;
    }
}

@media (min-width: 1251px) {
    .center-seven-columns .flex_column {
        width: calc(14.28% - 25.72px) !important;
    }

    .center-five-columns .flex_column {
        width: calc(20% - 24px) !important;
    }
}

@media (max-width: 640px) {
    .center-seven-columns .flex_column,
    .center-five-columns .flex_column {
        width: 380px !important;
    }
}
package tests;

import com.adak.ir.LoggingUtils;
import com.epam.reportportal.annotations.attribute.Attribute;
import com.epam.reportportal.annotations.attribute.Attributes;
import com.epam.reportportal.annotations.attribute.MultiKeyAttribute;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.ITestListener;
import org.testng.ITestResult;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Listeners;

import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;

@Listeners(BasePage.TestListener.class)
public class BasePage {
    public static final Logger LOGGER = LoggerFactory.getLogger(BasePage.class);
    public static AppiumDriver driver;


    @BeforeClass
    public void Android_setUp() throws MalformedURLException {
        LOGGER.info("آماده سازی دستگاه");

        DesiredCapabilities capabilities = new DesiredCapabilities();

        capabilities.setCapability("appium:automationName", "UIAutomator2");
        capabilities.setCapability("appium:platformVersion", "12");
        capabilities.setCapability("appium:deviceName","RF8NB25E39B");
        capabilities.setCapability("udid","RF8NB25E39B");

        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability(MobileCapabilityType.APP, "/Users/adak/Documents/easypayment_direct_v6.3.4.apk");

        //capabilities.setCapability("appium:app", "/Users/qtroom/Test-project/My/ap_otp/apps/easypayment_direct_v6.4.2.apk");
        capabilities.setCapability("appPackage", "com.sibche.aspardproject.app");
        //capabilities.setCapability("appActivity", "com.sibche.aspardproject.app.ui.activity.LauncherActivity");
        capabilities.setCapability("autoAcceptAlerts", "true");
        driver = new AndroidDriver(new URL("http://localhost:4723/wd/hub"), capabilities);
        driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));

    }
    @Attributes(attributes = { @Attribute(key = "Platform", value = "Android"),
            @Attribute(key = "key2", value = "value2") }, multiKeyAttributes = { @MultiKeyAttribute(keys = { "k1", "k2" }, value = "v") })

    public static class TestListener implements ITestListener {
        @Override
        public void onTestStart(ITestResult result) {
            LOGGER.info("Test Started: " + result.getName());
        }

        @Override
        public void onTestSuccess(ITestResult result) {
            LOGGER.info("Test Passed: " + result.getName());
        }

        @Override
        public void onTestFailure(ITestResult result) {
            LOGGER.info("Test Failed: " + result.getName());
            captureScreenshot(result.getMethod().getMethodName());
        }

        private void captureScreenshot(String methodName1) {
            LoggingUtils.logBase64(((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64), methodName1);
        }
        }



    @AfterClass
    public void tearDown() {
        if(driver != null) {
            ((AndroidDriver) driver).closeApp();
            driver.quit();
        }
    }
}
package tests;

import com.adak.ir.LoggingUtils;
import com.epam.reportportal.annotations.Step;
import com.epam.reportportal.testng.ReportPortalTestNGListener;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.appium.java_client.AppiumBy;
import org.junit.Assert;
import org.openqa.selenium.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

import static java.lang.Thread.sleep;


@Listeners({ReportPortalTestNGListener.class})
public class AppiumAndroidTest extends BasePage {
    public static final Logger LOGGER = LoggerFactory.getLogger(AppiumAndroidTest.class);


    @Test
    void easypayment() throws InterruptedException, IOException {

        navigateToSplashPage();
        inputNubmer();

     //   Home();
    }


    @Step
    public void navigateToSplashPage() {


        String elementText = "فارسی";
        By byText = AppiumBy.androidUIAutomator("new UiSelector().text(\"" + elementText + "\")");
        WebElement element = driver.findElement(byText);
        element.click();
        String screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
        LoggingUtils.logBase64(screenshot, "صفحه معرفی");
        LOGGER.info(" صفحه معرفی");
    }
    @Step
    public void inputNubmer() throws InterruptedException, IOException {

        String baseUrl = "http://192.168.2.112:8090/api/v1/%s";
        String assignBodyTemplate = "{\"operator\": \"%s\", \"simType\": \"%s\", \"appName\": \"%s\"}";
        HttpClient client = HttpClient.newBuilder().build();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(String.format(baseUrl, "assign")))
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(String.format(assignBodyTemplate, "MCI", "CREDIT", "MY_MCI")))
                .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        ObjectMapper objectMapper = new ObjectMapper();
        JsonNode jsonNode = objectMapper.readTree(response.body());
        driver.findElement(By.id("com.sibche.aspardproject.app:id/edit_text")).sendKeys(jsonNode.get("number").asText());
        driver.findElement(By.id("com.sibche.aspardproject.app:id/btn_action")).click();


        request = HttpRequest.newBuilder()
                .uri(URI.create(String.format(baseUrl, "watch?token=" + jsonNode.get("token").asText())))
                .header("Content-Type", "application/json")
                .GET()
                .build();
        response = client.send(request, HttpResponse.BodyHandlers.ofString());
        objectMapper = new ObjectMapper();
        jsonNode = objectMapper.readTree(response.body());
        String code = jsonNode.get("code").asText();
        driver.findElement(By.id("com.sibche.aspardproject.app:id/et_pin_code")).sendKeys(code);
        LOGGER.info("لاگین");



        String screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
        LoggingUtils.logBase64(screenshot, "تست otp");
        LOGGER.info(" تست otp");
        //  driver.findElement(By.id("com.sibche.aspardproject.app:id/favorites_container")).isDisplayed();
        sleep(500);
        driver.findElement(By.id("com.sibche.aspardproject.app:id/barcode_view")).isEnabled();

        boolean isWizard = false;
        boolean isFavorites = false;

        try {
            isWizard = driver.findElement(By.id("com.sibche.aspardproject.app:id/wizardPositiveBtn")).isDisplayed();
        } catch (NoSuchElementException e) {
            // Element not found
        }

        try {
            isFavorites = driver.findElement(By.id("com.sibche.aspardproject.app:id/favorites_container")).isDisplayed();
        } catch (NoSuchElementException e) {
            // Element not found
        }

        if (isWizard || isFavorites) {
            LOGGER.info("PASS");
        } else {
            LOGGER.error("Test failed");
            Assert.fail("Test failed");

        }
        String screenshot2 = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
        LoggingUtils.logBase64(screenshot2, "نهایی");
        LOGGER.info(" صفحه نهایی");
    }


}
#include<stdio.h>

int main()
{
    int i,j,k,m,n,p,q,sum;
    printf("Enter Rows and Columns of Matrix 1:");
    scanf("%d%d",&m,&n);
    printf("Enter Rows and Columns of Matrix 2:");
    scanf("%d%d",&p,&q);
    int a[m][n],b[p][q],c[m][q];
    if(n != p){
        printf("Can't Multiply Matrices");
    }
    else{
    printf("Enter Matrix 1:\n");
    for(i=0;i<m;i++){
        for(j=0;j<n;j++){
            scanf("%d",&a[i][j]);
        }
    }
    printf("Enter Matrix 2:\n");
    for(i=0;i<p;i++){
        for(j=0;j<q;j++){
            scanf("%d",&b[i][j]);
        }
    }
    printf("Matrix 1:\n");
    for(i=0;i<m;i++){
        for(j=0;j<n;j++){
            printf("%d\t",a[i][j]);
        }
        printf("\n");
    }
    printf("Matrix 2:\n");
    for(i=0;i<p;i++){
        for(j=0;j<q;j++){
            printf("%d\t",b[i][j]);
        }
        printf("\n");
    }
    for(i=0;i<m;i++){
        for(j=0;j<q;j++){
            sum = 0;
            for(k=0;k<m;k++){
                sum = sum + a[i][k] * b[k][j];
            }
                c[i][j] = sum;
         }
    }
    printf("Matrix 3:\n");
    for(i=0;i<m;i++){
        for(j=0;j<q;j++){
            printf("%d\t",c[i][j]);
        }
        printf("\n");
    }
    }

    return 0;
}
<script is:inline>
    document.getElementById('wf-form-Digital-Wings-Contact-Page-Form').addEventListener('submit', function (event) {
      if (window.grecaptcha.getResponse().length > 0) { return; }
      event.preventDefault();
    });
</script>
"Insert what you want to showe in here" * 10 // change number to whatever many time you want to show something//
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

//Make a new model Use pascal case in naming. Also make the name in singular
//create model > npx prisma format > npx prisma migrate dev

model Issue {
  id          Int      @id @default(autoincrement())
  title       String   @db.VarChar(255)
  description String   @db.Text
  status      Status   @default(OPEN)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}

//enum is set of constanst values
enum Status {
  OPEN
  IN_PROGRESS
  CLOSED
}
get-command -Module ISEScriptingGeek
<iframe src="https://sabine725.substack.com/embed" width="480" height="320" style="border:1px solid #EEE; background:white;" frameborder="0" scrolling="no"></iframe>
<?php 
class WP_Skills_MetaBox_MyCustomMetaBox {
  private $screen = array(
	'post',
	'page',
  );

  private $meta_fields = array(
    array(
      'label' => 'My Custom Field',
      'id' => 'my_custom_field',
      'type' => 'text',
      'default' => '',
    )
  );

  public function __construct() {
    add_action('add_meta_boxes', array($this, 'add_meta_boxes'));
    add_action('admin_footer', array($this, 'media_fields'));
    add_action('save_post', array($this, 'save_fields'));
  }

  public function add_meta_boxes() {
    foreach ($this->screen as $single_screen) {
      add_meta_box(
        'MyCustomMetaBox',
        __('My Custom MetaBox', 'text-domain'),
        array($this, 'meta_box_callback'),
        $single_screen,
        'normal',
        'default'
      );
    }
  }

  public function meta_box_callback($post) {
    wp_nonce_field('MyCustomMetaBox_data', 'MyCustomMetaBox_nonce');
    echo 'Lorem ipsum dolor sit amet.';
    $this->field_generator($post);
  }
  public function media_fields() { ?>
    <script>
      jQuery(document).ready(function($) {
        if (typeof wp.media !== 'undefined') {
          var _custom_media = true,
            _orig_send_attachment = wp.media.editor.send.attachment;
          $('.new-media').click(function(e) {
            var send_attachment_bkp = wp.media.editor.send.attachment;
            var button = $(this);
            var id = button.attr('id').replace('_button', '');
            _custom_media = true;
            wp.media.editor.send.attachment = function(props, attachment) {
              if (_custom_media) {
                if ($('input#' + id).data('return') == 'url') {
                  $('input#' + id).val(attachment.url);
                } else {
                  $('input#' + id).val(attachment.id);
                }
                $('div#preview' + id).css('background-image', 'url(' + attachment.url + ')');
              } else {
                return _orig_send_attachment.apply(this, [props, attachment]);
              };
            }
            wp.media.editor.open(button);
            return false;
          });
          $('.add_media').on('click', function() {
            _custom_media = false;
          });
          $('.remove-media').on('click', function() {
            var parent = $(this).parents('td');
            parent.find('input[type="text"]').val('');
            parent.find('div').css('background-image', 'url()');
          });
        }
      });
    </script>
  <?php 
  }

  public function field_generator($post) {
    $output = '';
    foreach ($this->meta_fields as $meta_field) {
      $label = '<label for="' . $meta_field['id'] . '">' . $meta_field['label'] . '</label>';
      $meta_value = get_post_meta($post->ID, $meta_field['id'], true);
      if (empty($meta_value)) {
        if (isset($meta_field['default'])) {
          $meta_value = $meta_field['default'];
        }
      }
      switch ($meta_field['type']) {

        default:
          $input = sprintf(
            '<input %s id="%s" name="%s" type="%s" value="%s">',
            $meta_field['type'] !== 'color' ? 'style="width: 100%"' : '',
            $meta_field['id'],
            $meta_field['id'],
            $meta_field['type'],
            $meta_value
          );
      }
      $output .= $this->format_rows($label, $input);
    }
    echo '<table class="form-table"><tbody>' . $output . '</tbody></table>';
  }

  public function format_rows($label, $input) {
    return '<tr><th>' . $label . '</th><td>' . $input . '</td></tr>';
  }

  public function save_fields($post_id) {
    if (!isset($_POST['mycustommetabox_nonce']))
      return $post_id;
    $nonce = $_POST['mycustommetabox_nonce'];
    if (!wp_verify_nonce($nonce, 'mycustommetabox_data'))
      return $post_id;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
      return $post_id;
    foreach ($this->meta_fields as $meta_field) {
      if (isset($_POST[$meta_field['id']])) {
        switch ($meta_field['type']) {
          case 'email':
            $_POST[$meta_field['id']] = sanitize_email($_POST[$meta_field['id']]);
            break;
          case 'text':
            $_POST[$meta_field['id']] = sanitize_text_field($_POST[$meta_field['id']]);
            break;
        }
        update_post_meta($post_id, $meta_field['id'], $_POST[$meta_field['id']]);
      } else if ($meta_field['type'] === 'checkbox') {
        update_post_meta($post_id, $meta_field['id'], '0');
      }
    }
  }
}

if (class_exists('WP_Skills_MetaBox_MyCustomMetaBox')) {
  new WP_Skills_MetaBox_MyCustomMetaBox;
};
#include<stdio.h>

int main()
{
    int a[3][3],b[3][3],c[3][3];
    int i,j;
    printf("Enter Matrix 1:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            scanf("%d",&a[i][j]);
        }
    }
    printf("Enter Matrix 2:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            scanf("%d",&b[i][j]);
        }
    }
    printf("Matrix 1:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",a[i][j]);
        }
        printf("\n");
    }
    printf("Matrix 2:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",b[i][j]);
        }
        printf("\n");
    }
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            c[i][j] = a[i][j] + b [i][j];
        }
    }
    printf("Matrix 3:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",c[i][j]);
        }
        printf("\n");
    }
    return 0;
}
#include<stdio.h>

int main()
{
    int arr[3][3];
    int i,j,sr,sc;
    printf("Enter Matrix:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            scanf("%d",&arr[i][j]);
        }
    }
    printf("Matrix is:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",arr[i][j]);
        }
        printf("\n");
    }
    for(i=0;i<3;i++){
        sr = 0;
        sc = 0;
        for(j=0;j<3;j++){
        sr = sr + arr[i][j];
        sc = sc + arr[j][i];
        }
        printf("The Sum of Row is:-----%d\n",sr);
        printf("The Sum of Coloumn is:-%d\n",sc);
    }
    return 0;
}
Question: 
Write a C program to create a binary tree as shown in bellow, with the following elements: 50, 17, 72, 12, 23, 54, 76, 9, 14, 25 and 67. After creating the tree, perform an in-order traversal to display the elements. 

Answer:

#include <stdio.h>
#include <stdlib.h>

struct Node 
{
    int data;
    struct Node* left;
    struct Node* right;
};

struct Node* createNode(int value)
{
    struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
    newNode -> data = value;
    newNode -> left = NULL;
    newNode -> right = NULL;
    
    return newNode;
}
void inOrderTraversal(struct Node* root)
{
    if(root!=NULL) {
        inOrderTraversal(root -> left);
        printf("%d ", root -> data);
        inOrderTraversal(root -> right);
    }
}

int main() {
   struct Node* root = createNode(50);
   root -> left = createNode(17);
   root -> right = createNode(72);
   
   root -> left -> left = createNode(12);
   root -> left -> right = createNode(23);
   
   root -> left -> left -> left = createNode(9);
   root -> left -> left -> right = createNode(14);
   
   root -> left -> right -> right = createNode(25);
   
   root -> right -> left = createNode(54);
   root -> right -> right = createNode(76);
   root -> right -> left -> right = createNode(67);
   inOrderTraversal(root);

    return 0;
}

//OUTPUT:

In-Order Traversal: 
9 12 14 17 23 25 50 54 67 72 76 
/** @type {import('next').NextConfig} */

const isProd = process.env.NODE_ENV === 'production';
const nextConfig = {
  basePath: isProd ? '/Deploy-a-Next.js-App-to-GitHub-Pages': '',
  output: 'export',
  distDir: 'dist',
  images: {
    unoptimized: true,
  },
}
module.exports = nextConfig
#include <bits/stdc++.h>
using namespace std;

// tree node is defined
class TreeNode {
public:
    int val;
    TreeNode* left;
    TreeNode* right;
    TreeNode(int data)
    {
        val = data;
        left = NULL;
        right = NULL;
    }
};

// inorder traversal to check if the given 
// sorted subsequence exists in the BST
void DoesSeqExistRec(TreeNode* root, vector<int> sequence, int& index)
{
    //base case
    if (!root)
        return;

    // traverse left subtree first as it's inorder traversal
    DoesSeqExistRec(root->left, sequence, index);

    // If current node matches with current sequence 
    // element(sequence[index]) then move
    // to the next element in the sequenece
    if (root->val == sequence[index])
        index++;

    // traverse right subtree
    DoesSeqExistRec(root->right, sequence, index);
}

// function to check whether the sequence exists or not
bool DoesSeqExist(TreeNode* root, vector<int> sequence)
{

    int index = 0;

    // recursive function to check if all elements 
    // of the sequence are in the BST or not
    DoesSeqExistRec(root, sequence, index);

    //if after the inorder traversal as we have discussed, 
    //index reaches towards the end
    //then the BST contains the sequence other wise not
    if (index == sequence.size())
        return true;
    else
        return false;
}

int main()
{
    TreeNode* root = new TreeNode(16);
    
    root->left = new TreeNode(3);
    root->left->right = new TreeNode(13);
    root->left->right->left = new TreeNode(10);
    root->left->right->left->left = new TreeNode(7);
    root->right = new TreeNode(20);
    root->right->left = new TreeNode(18);

    vector<int> sequence1{ 7, 13, 18, 20 };

    if (DoesSeqExist(root, sequence1))
        cout << "Yes the sequence exists in the binary search tree\n";
    else
        cout << "No, the sequence exists in the binary search tree";

    vector<int> sequence2{ 7, 13, 14, 20 };

    if (DoesSeqExist(root, sequence2))
        cout << "Yes the sequence exists in the binary search tree\n";
    else
        cout << "No, the sequence doesn't exist in the binary search tree";

    return 0;
}
#include<stdio.h>

int main()
{
    int n=6,i,j,temp,flag;
    int arr[n] = {60,34,76,23,89,29};
    for(i=0;i<n-1;i++){
        flag = 0;
        for(j=0;j<n-1;j++){
            if(arr[j]>arr[j+1]){
                temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
                flag = 1;
            }
        }
        if(flag==0){
            break;
        }
    }
    for(i=0;i<n;i++){
        printf("%d ",arr[i]);
    }
    return 0;
}
Function ExcelToCsv ($File) {
    $Excel = New-Object -ComObject Excel.Application
    $wb = $Excel.Workbooks.Open($File)

    $x = $File | Select-Object Directory, BaseName
    $n = [System.IO.Path]::Combine($x.Directory, (($x.BaseName, 'csv') -join "."))

    foreach ($ws in $wb.Worksheets) {
        $ws.SaveAs($n, 6)
    }
    $Excel.Quit()
}

Get-ChildItem C:\Junk\*.xlsx |
    ForEach-Object{
        ExcelToCsv -File $_
    }
#include<stdio.h>

int main()
{
    int arr[8],i,flag=0,n;
    printf("Enter 8 Elements of array:\n");
    for(i=0;i<8;i++){
        printf("arr[%d] = ",i);
        scanf("%d",&arr[i]);
    }
    printf("Enter the element to search in array:");
    scanf("%d",&n);
    for(i=0;i<8;i++){
        if(arr[i] == n){
            flag = 1;
            break;
        }
        else{
            flag = 0;
        }
    }
    if(flag==1){
        printf("The element is found at location : %d",i);
    }
    else{
        printf("Element not found");
    }
    return 0;
}
Calendar = 
  
VAR CalTable = CALENDARAUTO ()
VAR MyCal =
    ADDCOLUMNS (
        CalTable,
        "Index", MONTH ( [Date] ),
        "Month", FORMAT ( [Date], "mmm" ),
        "Qtr", FORMAT ( [Date], "\QQ" ),
        "Year", FORMAT ( [Date], "yyyy" )
    )
RETURN
    MyCal
document.onreadystatechange = function () {
  if (document.readyState === "complete") {
    // Here fire whatever you want when all rendered
  }
}
<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<article>
<articleinfo>
  <title>OLS Tutorial</title>
</articleinfo>

<sect1>
<title>Introduction</title>
<para>This is a paragraph.
</para>

<para>This is <emphasis>emphasized</emphasis> text. This is
<emphasis role="strong">strongly emphasized</emphasis> text.
</para>
<note>
<para>This is not a very <emphasis>brilliant</emphasis> document!</para>
</note>
<para>some text  DocBook stylesheets are in
<filename>/usr/share/sgml/docbook/docbook-xsl-1.51.1</filename>
</para>

<para>Use <indexterm><primary>xsltproc</primary><secondary>XSLT
processing</secondary></indexterm><footnote><para>Don't volunteer to show
indexing if you don't work with it regularly.</para></footnote>
<command>xsltproc</command> to process your files.  See the 
<link linkend="installation">Installation section</link> for more info.
</para>

<para>Use <command>xsltproc</command> to process your files.  See
<xref linkend="installation"/> for more info.
</para>

<warning>
<para>Don't use the 802.11 network while presenting!</para>
</warning>

<para>SOme more text.
</para>

<example>
  <title>My example</title>
  <programlisting>
    print "Hello, my &amp; world!"
  </programlisting>
</example>

<para>This is a paragraph.
</para>
   <itemizedlist>
   <listitem>
   <para>This is my first item
   </para>

      <itemizedlist>
      <listitem>
      <para>item a
      </para>
      </listitem>
      <listitem>
      <para>item b
      </para>
      </listitem>
      </itemizedlist>

   </listitem>
   <listitem> <para>This is my second item.  </para>
   <para>This is another paragraph.
   </para></listitem>
   
   <listitem>
   <para>
   </para>
   </listitem>
   </itemizedlist>
<sect2 >
<title>Purpose</title>
<para>There is little purpose to this document.
</para>
</sect2>

<sect2 os="windows;mac">
<title>Scope</title>
<para>The scope of this document is a intro to DocBook.
</para>
</sect2>
</sect1>

<sect1 id="installation"> 
<title>Installation</title>
<para>This is another paragraph. Here is an XML file:
</para>

<para os="windows">On Windows, you install this .EXE.
</para>
<para os="mac">On the Mac, you double-click some icon.
</para>
<para os="linux">On Linux, you install this RPM.
</para>

<para category="general">Download <command>xsltproc</command> from
<ulink url="ftp://xmlsoft.org/">xmlsoft.org</ulink>. You need both
<filename>libxml2</filename> and <filename>libxslt</filename>
</para>

<para id="foo" category="expert"><indexterm><primary>foo</primary></indexterm>
This section talks about installation
</para>

<programlisting>

<![CDATA[ <?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd">

<article>
<articleinfo>
<title>My First DocBook Article</title>
</articleinfo>

<sect1 id="installation">
<title>Installation</title>
<para>To install DocBook, you do the following...
</para>
<para >On Windows, you install this .EXE.
</para>
<para >On Linux, you install this RPM.
</para>
</sect1>
</article>
]]>   
</programlisting>
</sect1>

<sect1 id="troubleshooting" os="linux" >
<title>Troubleshooting</title>
<para><indexterm><primary>troubleshooting</primary></indexterm>this is some text on troubleshooting
</para>
<para ><indexterm><primary>foo</primary></indexterm>
This section talks about installation
</para>

</sect1>

<index/>

</article>
#include<stdio.h>

int main()
{
    int n=6,i,j,temp;
    int arr[n] = {77,42,35,12,101,5};

    for(i=0;i<n-1;i++){
        for(j=0;j<n-1;j++){
            if(arr[j] > arr[j+1]){
                temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
            }
        }
    }
    for(i=0;i<n;i++){
        printf("%d ",arr[i]);
    }


    return 0;
}
# Initialize the smallest_input with a large value
smallest_input = float('inf')

# Use a while loop to get user input until 0 is entered
while True:
    user_input = float(input("Enter a value (enter 0 to finish): "))
    
    # Check if the user wants to finish
    if user_input == 0:
        break
    
    # Compare with the current smallest_input
    if user_input < smallest_input:
        smallest_input = user_input

# Display the result
print("The smallest input is:", smallest_input)
.item:after {
    content: ' ';
    border-left: 1px solid var(--color-border);
    position: absolute;
    left: 0;
    top: calc(50% + 25px);
    height: calc(50% - 25px);
  }
<script>
import moment from "moment";
export default {
  name: "TheFooter",
  computed: {
    year() {
      return moment().year();
    }
  }
}
</script>
- Random variables
- Probability distribution functions (PDFs)
- Mean, Variance, Standard Deviation
- Covariance and Correlation 
- Bayes Theorem
- Linear Regression and Ordinary Least Squares (OLS)
- Gauss-Markov Theorem
- Parameter properties (Bias, Consistency, Efficiency)
- Confidence intervals
- Hypothesis testing
- Statistical significance 
- Type I & Type II Errors
- Statistical tests (Student's t-test, F-test)
- p-value and its limitations
- Inferential Statistics 
- Central Limit Theorem & Law of Large Numbers
- Dimensionality reduction techniques (PCA, FA)
WazirX clone script is a software solution replicating the features and functionalities of the WazirX cryptocurrency exchange platform. It enables the creation of a similar platform for buying, selling, and trading cryptocurrencies. Beleaf Technologies, a pioneer in providing WazirX clone script services, offers a bespoke solution to launch your cryptocurrency platform. Dive into the future of digital assets with our expertly crafted and customizable script, ensuring a stellar trading experience for your users.

To Contact
Telegram: https://t.me/BeleafTech                      
Whatsapp: +91 80567 86622
Skype: live:.cid.62ff8496d3390349
Mail to: business@beleaftechnologies.com
${true ? "this part run when true" : "this part run when false" }
$files = Get-ChildItem -Path "C:\Folder\*.txt"
$output = @()
foreach ($file in $files) {
    $output += Get-Content -Path $file.FullName
}
Set-Content -Path "C:\Folder\output.txt" -Value $output
/*
 * script to export data in all sheets in the current spreadsheet as individual csv files
 * files will be named according to the name of the sheet
 * author: Michael Derazon
*/

function onOpen() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
  ss.addMenu("csv", csvMenuEntries);
};

function saveAsCSV() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheets = ss.getSheets();
  // create a folder from the name of the spreadsheet
  var folder = DriveApp.createFolder(ss.getName().toLowerCase().replace(/ /g,'_') + '_csv_' + new Date().getTime());
  for (var i = 0 ; i < sheets.length ; i++) {
    var sheet = sheets[i];
    // append ".csv" extension to the sheet name
    fileName = sheet.getName() + ".csv";
    // convert all available sheet data to csv format
    var csvFile = convertRangeToCsvFile_(fileName, sheet);
    // create a file in the Docs List with the given name and the csv data
    folder.createFile(fileName, csvFile);
  }
  Browser.msgBox('Files are waiting in a folder named ' + folder.getName());
}

function convertRangeToCsvFile_(csvFileName, sheet) {
  // get available data range in the spreadsheet
  var activeRange = sheet.getDataRange();
  try {
    var data = activeRange.getValues();
    var csvFile = undefined;

    // loop through the data in the range and build a string with the csv data
    if (data.length > 1) {
      var csv = "";
      for (var row = 0; row < data.length; row++) {
        for (var col = 0; col < data[row].length; col++) {
          if (data[row][col].toString().indexOf(",") != -1) {
            data[row][col] = "\"" + data[row][col] + "\"";
          }
        }

        // join each row's columns
        // add a carriage return to end of each row, except for the last one
        if (row < data.length-1) {
          csv += data[row].join(",") + "\r\n";
        }
        else {
          csv += data[row];
        }
      }
      csvFile = csv;
    }
    return csvFile;
  }
  catch(err) {
    Logger.log(err);
    Browser.msgBox(err);
  }
}
{
  "manifest": {
    "a": {
      "stylesheet": {
        "colors": {
          "primary": "black",
          "secondary": "#C89E56",
          "tertiary": "#C89E56"
        },
        "images": {
          "favicon": {
            "url": "https://cdn.myocv.com/ocvapps/a100879096/files/Badge-Icon@2x.png",
            "altText": ""
          },
          "titleImage": {
            "url": "https://cdn.myocv.com/ocvapps/a100879096/files/Badge-Icon@2x.png",
            "altText": ""
          }
        }
      },
      "homeOrder": [
        "slider",
        "featureBar",
        "welcome",
        "newsDigest",
        "jailInfo",
        "careerOp",
        "downloadOurApp"
      ],
      "baseLayout": [
        "{component}"
      ],
      "features": {
        "news": {
          "type": "newsDigestList",
          "url": "https://apps.myocv.com/feed/digest/a100879096/facebook",
          "title": "Social Media",
          "config": {
            "displayDate": true,
            "type": "newsDigestList",
            "limit": 10
          }
        },
        "contact": {
          "type": "contacts",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/contact_contactUs.json",
          "title": "Contact Us",
          "limit": 10
        },
        "faq": {
          "type": "blogFAQ",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/blog_fAQs.json",
          "title": "FAQ",
          "config": {
            "limit": 10
          }
        },
        "joinOurTeam": {
          "title": "Join Our Team",
          "type": "form",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/form_joinOurTeam.json",
          "formID": "joinOurTeam"
        },
        "submitATip": {
          "title": "Submit A Tip",
          "type": "form",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/form_submitATip.json",
          "formID": "submitATip"
        },
        "sexOffender": {
          "title": "Sex Offenders Map",
          "type": "sexOffendersMap",
          "url": "https://myocv.s3.amazonaws.com/ocvapps/a100879096/sexOffenders-TX.json",
          "config": {
            "zoom": 10,
            "clusterSize": 3
          }
        },
        "inmateSearch": {
          "title": "Inmate Search",
          "type": "feedList",
          "url": "https://apps.myocv.com/feed/rtjb/a100879096/inmates",
          "config": {
            "submitATipLink": true,
            "backgroundColor": "#eee",
            "showImage": "top",
            "blogKey": "inmates",
            "limit": 10,
            "appID": "a100879096",
            "type": "rtjb",
            "displayDate": false,
            "truncation": true,
            "sort": "nameAZ",
            "showSort": false,
            "showSearch": true
          }
        },
        "caseReport": {
          "title": "Case Report",
          "type": "form",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/form_caseReport.json",
          "formID": "caseReport"
        },
        "closePatrolRequest": {
          "title": "Close Patrol Request",
          "type": "form",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/form_closePatrolRequest.json",
          "formID": "closePatrolRequest"
        },
        "livestockOwnerLocation": {
          "title": "Livestock Owner/Location",
          "type": "form",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/form_livestockOwnerLocation.json",
          "formID": "livestockOwnerLocation"
        },
        "crashReports": {
          "title": "Crash Reports",
          "type": "webview",
          "url": "https://cris.dot.state.tx.us/public/Purchase/app/home",
          "external": true
        },
        "backgroundCheck": {
          "title": "Background Check",
          "type": "webview",
          "url": "https://publicsite.dps.texas.gov/ConvictionNameSearch/",
          "external": true
        },
        "fingerprints": {
          "title": "Fingerprints",
          "type": "webview",
          "url": "https://www.identogo.com/services/live-scan-fingerprinting",
          "external": true
        },
        "civilServicesFees": {
          "title": "Civil Services Fees",
          "type": "page",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/page_civilServiceFees.json"
        },
        "sheriffTaxSales": {
          "title": "Sheriff Tax Sales",
          "type": "page",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/page_sheriffTaxSales.json"
        },
        "crimePrevention": {
          "title": "Crime Prevention",
          "type": "blogList",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/blog_crimePrevention.json",
          "config": {
            "blogKey": "blog_crimePrevention",
            "limit": 4,
            "appID": "a100879096",
            "type": "blog",
            "displayDate": false,
            "truncation": false,
            "sort": "dateDesc",
            "showSort": false,
            "showSearch": false
          }
        },
        "payCitations": {
          "title": "Pay Citations",
          "type": "blogList",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/blog_payCitations.json",
          "config": {
            "blogKey": "blog_payCitations",
            "limit": 4,
            "appID": "a100879096",
            "type": "blog",
            "displayDate": false,
            "truncation": false,
            "sort": "dateDesc",
            "showSort": false,
            "showSearch": false
          }
        },
        "jailInformation": {
          "title": "Jail Information",
          "type": "blogList",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/blog_jailInformation.json",
          "config": {
            "blogKey": "blog_jailInformation",
            "limit": 10,
            "appID": "a100879096",
            "type": "blog",
            "displayDate": false,
            "truncation": false,
            "sort": "dateDesc",
            "showSort": false,
            "showSearch": false
          }
        },
        "recordsSubmenu": {
          "navHeader": "Records Request",
          "type": "submenu",
          "dropdown": [
            "caseReport",
            "crashReports",
            "backgroundCheck",
            "closePatrolRequest",
            "livestockOwnerLocation"
          ]
        },
        "resourcesSubmenu": {
          "navHeader": "Resources",
          "type": "submenu",
          "dropdown": [
            "crimePrevention",
            "civilServicesFees",
            "fingerprints",
            "payCitations",
            "sheriffTaxSales"
          ]
        }
      },
      "views": {
        "navbar": {
          "type": "navbar",
          "config": {
            "hideSearch": true,
            "title": "Wheeler County<br/> Sheriff's Office TX",
            "socialMedia": [
              {
                "icon": "facebook",
                "url": "https://www.facebook.com/WheelerCountySO/"
              }
            ],
            "items": [
              "contact",
              "recordsSubmenu",
              "faq",
              "resourcesSubmenu"
            ]
          }
        },
        "footer": {
          "type": "footer",
          "config": {
            "vertical": "sheriff",
            "title": "Wheeler County Sheriff's Office TX",
            "socialMedia": [
              {
                "icon": "facebook",
                "url": "https://www.facebook.com/WheelerCountySO/"
              }
            ],
            "item1": {
              "title": "CONTACT",
              "address": "7944 US-83,<br/> WHEELER, TX 79096",
              "phoneName": "Phone: ",
              "phone": "(806) 826-5537",
              "businessHours": "HOURS: 8:00 A.M. - 5:00 P.M. CST <br/>MONDAY THROUGH FRIDAY."
            },
            "item2": {
              "title": "RESOURCES",
              "options": [
                {
                  "feature": "joinOurTeam",
                  "featureText": "Join Our Team"
                }
              ]
            },
            "item3": {
              "buttonColor": "#C89E56",
              "buttonText": "DOWNLOAD OUR APP",
              "buttonTextColor": "#0F2445",
              "buttonBorderColor": "#C89E56",
              "buttonLink": "https://apps.myocv.com/share/a100879096"
            }
          }
        },
        "slider": {
          "type": "slider",
          "config": {
            "interval": 6000,
            "height": "600px",
            "media": [
              {
                "mediaURL": "https://cdn.myocv.com/ocvapps/a100879096/files/Header%203@2x.png",
                "mediaAlt": "Wheeler CSO Car"
              }
            ]
          }
        },
        "downloadOurApp": {
          "type": "slider",
          "config": {
            "interval": 6000,
            "externalURL": "https://apps.myocv.com/share/a100879096",
            "height": "600px",
            "media": [
              {
                "mediaURL": "https://cdn.myocv.com/ocvapps/a100879096/files/downloadourapp.png",
                "mediaAlt": "Download Our App"
              }
            ]
          }
        },
        "featureBar": {
          "title": "Quick Links",
          "type": "featureBar",
          "config": {
            "items": [
              {
                "title": "Submit A Tip",
                "feature": "submitATip",
                "icon": "submit"
              },
              {
                "title": "Sex Offender",
                "feature": "sexOffender",
                "icon": "personSearch"
              },
              {
                "title": "Inmate Search",
                "feature": "inmateSearch",
                "icon": "jail"
              },
              {
                "title": "Join Our Team",
                "feature": "joinOurTeam",
                "icon": "team"
              }
            ],
            "showVertical": false,
            "showHeading": true,
            "titleColor": "white",
            "headingColor": "white",
            "tileColor": "#C89E56",
            "bgColor": "#181818",
            "verticalColor": "#C89E56",
            "textColor": "white"
          }
        },
        "welcome": {
          "title": "Wheeler County Sheriff's Office TX",
          "type": "welcome",
          "characteristics": "Integrity | Professionalism | Commitment | Honesty | Trust | Respect",
          "subTitle": "As a Sheriff's Office, we value:",
          "imageCaption": "Sheriff Johnny Carter",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/page_wEBWelcome.json",
          "config": {
            "showCaption": true,
            "titleColor": "black",
            "showSubTitle": true
          }
        },
        "newsDigest": {
          "title": "Social Media",
          "type": "newsDigest",
          "feature": "news",
          "config": {
            "titleColor": "white",
            "displayDate": true,
            "socialBar": false,
            "socialBarName": "socialBar",
            "bgColor": "black",
            "buttonTextColor": "black",
            "buttonBgColor": "#C89E56",
            "backgroundSize": "cover",
            "buttonText": "View More Posts",
            "buttonLink": "news"
          }
        },
        "jailInfo": {
          "title": "Jail Information",
          "type": "twoColumnButton",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/page_jailInfo.json",
          "config": {
            "bgColor": "#eee",
            "textColor": "black",
            "titleColor": "black",
            "align": "center",
            "buttons": [
              {
                "buttonFeature": "jailInformation",
                "buttonText": "Learn More",
                "buttonTextColor": "black",
                "buttonColor": "#C89E56"
              }
            ]
          }
        },
        "careerOp": {
          "title": "Career Opportunities",
          "type": "twoColumnButton",
          "url": "https://cdn.myocv.com/ocvapps/a100879096/public/page_careerOpportunities.json",
          "config": {
            "row": "row-reverse",
            "bgColor": "#eee",
            "titleColor": "black",
            "align": "center",
            "buttons": [
              {
                "buttonFeature": "joinOurTeam",
                "buttonText": "Apply Now",
                "buttonTextColor": "black",
                "buttonColor": "#C89E56"
              }
            ]
          }
        }
      }
    }
  },
  "lookup": {
    "web": {
      "4.1.0": {
        "1": "a",
        "dev": "a",
        "prod": "a"
      }
    },
    "ios": [],
    "android": []
  }
}
{% set listOfServices = craft.entries({
    section: 'services',
    orderBy: 'serviceCategory ASC, title ASC',
    site: 'tphMain1000',
}).all() %}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define placementlelo vector<int>
#define all(a) (a).begin() , (a).end()
#define sz(a) ((int)((a).size()))

const ll INF = 4e18;

vector<placementlelo> dp(1e4+1 , placementlelo(1e4+1 , -1));

int f(int i , int j , int s , int r , string &x , string &y , string &y1)
{
    if(i>j)return 0;
    if(dp[i][j] != -1)return dp[i][j];

    int mini = 1e9;
    for(int k=i; k<=j; k++)
    {
        
        if(y1.find(x.substr(i , k-i+1)) != string::npos)mini = min(mini , r+f(k+1 , j , s , r , x , y , y1));
        if(y.find(x.substr(i , k-i+1)) != string::npos)mini = min(mini , s+f(k+1 , j , s , r , x , y , y1));
    }

    return mini;
}
int solve(int s , int r , string x, string y)
{
    string y1 = y;
    reverse(all(y1));
    return f(0 , sz(x)-1 , s, r , x , y , y1);
}

int32_t main(){

    ios_base::sync_with_stdio(false);  
    cin.tie(NULL);

    string x , y;
    cin >> x >> y;
    int s, r;
    cin >> s >> r;
    int ans = solve(s , r, x , y);
    cout << ans;

    return 0;

}
php artisan migrate --path=/database/migrations/2023_12_06_093021_up2_posts_table.php
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n, m; // Replace semicolons with commas
    cin >> n >> m; // Remove the extra semicolon
   
    vector<vector<int>> cust;
    for(int i=0; i<n; i++){
        int q, p;
        cin >> q >> p;
        cust.push_back({p, q});
    }
    
    vector<vector<int>> rice;
    for(int i=0; i<m; i++){
        int q, p;
        cin >> q >> p;
        rice.push_back({p, q});
    }
    
    sort(cust.begin(), cust.end());
    sort(rice.begin(), rice.end());
    
    vector<int> placementlelo(m, 0);
    
    int ans = 0;
    
    for(int i=0; i<n; i++){
        int quan = -1;
        int index = -1;
        for(int j=0; j<m; j++){
            if(!placementlelo[j]){
               
                if(rice[j][0] > cust[i][0]) break;
                
                if(rice[j][1] > cust[i][1]){
                    if(quan == -1){
                        quan = rice[j][1];
                        index = j;
                    }
                    else{
                        if(quan > rice[j][1]){
                            index = j;
                            quan = rice[j][1];
                        }
                    }
                }
            }
        }
        
        if(index != -1){
            placementlelo[index] = 1;
            ans++;
        }
    }
    
    cout << ans;
    return 0; // Add a return statement at the end of main
}
#include <bits/stdc++.h>
using namespace std;
// calculating hamming distance
int hamdis(string& s1,string& s2) 
{
		int dis= 0;
	int n=s1.length();
		for (int i = 0; i < n ; i++) 
		{
				if (s1[i] != s2[i]) 
				{
						dis++;
				}
		}
		return dis;
}
// checking string is binary or not
bool checkbinary(string& s) {
		for (int i = 0; i <s.length() ; i++) 
	{
				if (s[i] != '0' and  s[i]!= '1') {
						return false;
				}
		}
		return true;
}
// finding min cost and distance
void findminimum(string& str, int a, int b) {
		if (!checkbinary(str))
		{
				cout << "INVALID"<<endl;
				return;
		}	
    
		string orig = str;
		sort(str.begin(), str.end());
     
		int origcost = 0;
		int count01 = 0;
		int count10 = 0;
     int m=str.length() - 1;
		for (int i = 0; i <m ; i++)
			{
				if (str[i] == '0' && str[i + 1] == '1') {
						count01++;
						origcost += a;
				} else if (str[i] == '1' && str[i + 1] == '0') {
						count10++;
						origcost += b;
				}
		}

	
		int minHammingDistance = hamdis(str, orig);

		cout << minHammingDistance << endl;
}

int main() {
		int T;
		cin >> T;

		for (int t = 0; t < T; t++) {
				string binaryStr;
				int A, B;

				cin >> binaryStr;
				cin >> A >> B;

				findminimum(binaryStr, A, B);
		}

		return 0;
}
/* eslint-disable max-lines */
import { useDashboardData } from "api/hooks/dashboard/useDashboardData";
import { useEffect, useState } from "react";
import { isAdminSite } from "utils/appUtils";
import { getColumnTotal } from "utils/helper";

import { rowsPerPageOptions } from "constants/data";
import { SubHeading } from "constants/enums";
import { images } from "constants/images";
import { paymentHistoryColumns } from "pages/bookings/paymentHistoryTable";
import { Box, Card, Loader, IconButton, Image } from "uiCore";
import { DetailsCard } from "uiCore/detailsCard/DetailsCard";

import { excelDownload } from "../downloadList";
import { BookingFilter } from "../Filter";
import { PaymentDetailsDialog } from "../PaymentDetailsModel";
import { BookingTable } from "../Table";
import { useStyle } from "./style";

export interface FilterProps {
  gameId?: string;
  courtId?: string;
  startDate?: string;
  endDate?: string;
  createdEndDate?: string;
  createdStartDate?: string;
}

export interface Props {
  isUpcomingBooking?: boolean;
}

export const ManageBookings = ({ isUpcomingBooking = false }: Props) => {
  const [upcomingLimit, setUpcomingLimit] = useState(10);
  const [bookingHistoryLimit, setBookingHistoryLimit] = useState(10);
  const initialFilterData = {
    page: 1,
    limit: upcomingLimit,
    gameId: "",
    courtId: "",
    startDate: "",
    endDate: "",
    createdEndDate: "",
    createdStartDate: "",
    isClear: false,
    isUpcoming: isUpcomingBooking,
  };

  const [filterData, setFilterData] = useState(initialFilterData);
  const [totalAmount, setTotalAmount] = useState(0);

  const [filterOpen, setFilterOpen] = useState(false);
  const classes = useStyle({ filterOpen });
  const [queryData, setQueryData] = useState(filterData);
  const [openPaymentDetailModal, setOpenPaymentDetailModal] = useState(false);
  const [isFilterApplied, setIsFilterApplied] = useState(false);
  const [selectedOrderId, setSelectedOrderId] = useState("");
  const [selectedGameId, setSelectedGameId] = useState("");
  const [selectedCourtId, setSelectedCourtId] = useState("");
  const [isExcelDataLoading, setIsExcelDataLoading] = useState(false);

  const { dashboardData, isDashboardLoading, isDashboardSuccess } =
    useDashboardData(queryData);

  useEffect(() => {
    if (dashboardData?.data?.paymentLogs?.length) {
      const amount = getColumnTotal(dashboardData.data.paymentLogs, "amount");
      setTotalAmount(amount);
    }
  }, [dashboardData]);

  useEffect(() => {
    if (filterData.isClear) {
      isFilterApplied && setQueryData({ ...filterData });
      setFilterData({ ...filterData, isClear: false });
      setIsFilterApplied(false);
    }
  }, [filterData]);

  useEffect(() => {
    setQueryData({
      ...initialFilterData,
      limit: isUpcomingBooking ? upcomingLimit : bookingHistoryLimit,
      isUpcoming: isUpcomingBooking,
    });
    setFilterData(initialFilterData);
  }, [isUpcomingBooking]);

  const handleFilter = () => {
    setFilterOpen(!filterOpen);
  };

  const handleSetFilterData = (filterProps: FilterProps) => {
    setFilterData((prev) => ({
      ...prev,
      ...filterProps,
    }));
  };

  const handleFilterSubmit = () => {
    let dateData = {};
    if (filterData.startDate && !filterData.endDate) {
      dateData = { endDate: filterData.startDate };
    }

    if (filterData.createdStartDate && !filterData.createdEndDate) {
      dateData = { createdEndDate: filterData.createdStartDate };
    }
    setQueryData((prev) => ({
      ...prev,
      ...filterData,
      isUpcoming: isUpcomingBooking,
      ...dateData,
    }));
    setFilterOpen(false);
    setIsFilterApplied(true);
  };
  const handleFilterClear = () => {
    setFilterData({
      ...initialFilterData,
      isClear: true,
      isUpcoming: isUpcomingBooking,
    });
  };

  const handlePageChange = (newPage: number) => {
    setQueryData({ ...queryData, page: newPage + 1 });
  };
  const handlePageSizeChange = (limit: number) => {
    if (queryData.isUpcoming) {
      setUpcomingLimit(limit);
    } else {
      setBookingHistoryLimit(limit);
    }
    setQueryData({ ...queryData, page: 1, limit });
  };

  const closePaymentDetailsDialog = () => {
    setOpenPaymentDetailModal(false);
  };

  const handleExport = async () => {
    const totalCount = isUpcomingBooking
      ? dashboardData?.data?.totalUpcomingBookings
      : dashboardData?.data?.totalBooking;
    if (totalCount && dashboardData?.data?.paymentLogs?.length) {
      try {
        await excelDownload({
          totalCount,
          queryData,
          setIsExcelDataLoading,
        });
      } finally {
        setIsExcelDataLoading(false);
      }
    }
  };

  const {
    courtId,
    createdEndDate,
    createdStartDate,
    endDate,
    gameId,
    startDate,
  } = filterData;

  const buttonDisable =
    !gameId &&
    !courtId &&
    !startDate &&
    !endDate &&
    !createdStartDate &&
    !createdEndDate;

  return (
    <>
      <Box className={classes.topCardsGroup}>
        {!isUpcomingBooking && (
          <>
            <DetailsCard
              label={isAdminSite ? "Total Earnings" : "Total Paid"}
              isLoading={isDashboardLoading}
              data={dashboardData?.data?.totalEarning}
              rupeesIcon
              decimal={2}
              icon={images.totalAmount.default}
            />
            <DetailsCard
              label="Total Bookings"
              isLoading={isDashboardLoading}
              data={dashboardData?.data?.totalBooking}
              icon={images.booking.default}
              isTotalBooking
            />
          </>
        )}
        <DetailsCard
          label="Total Amount"
          isLoading={isDashboardLoading}
          rupeesIcon
          data={
            dashboardData?.data?.paymentLogs.length > 0
              ? Number(totalAmount)
              : 0
          }
          icon={images.totalAmount.default}
          decimal={2}
        />
      </Box>
      <Card
        title={
          isUpcomingBooking
            ? SubHeading.upcomingBookings
            : SubHeading.bookingHistory
        }
        headerActionClassName={classes.DashboardHeaderAction}
        sx={{ boxShadow: 5 }}
        action={
          <Box
            sx={{
              display: "flex",
              justifyContent: "space-between",
              alignItems: "center",
            }}
          >
            <IconButton
              onClick={handleExport}
              id="export-image"
              title="Export"
              color="primary"
              disabled={dashboardData?.data?.paymentLogs?.length === 0}
            >
              {isExcelDataLoading ? (
                <Loader size={22} />
              ) : (
                <Image src={images.download.default} />
              )}
            </IconButton>
            {(dashboardData?.data?.paymentLogs?.length > 0 ||
              !buttonDisable) && (
              <IconButton onClick={handleFilter} color="primary" title="Filter">
                <Image
                  src={images.filter.default}
                  className={classes.dashboardFilterIcon}
                />
              </IconButton>
            )}
          </Box>
        }
      >
        <Box className={classes.dashboardMain}>
          <Box className={classes.dashboardCard}>
            <Box className={classes.top}>
              <Box className={classes.dashboardFilter}>
                <Box className={classes.dashboardFilterIconMain}>
                  {filterOpen && (
                    <BookingFilter
                      selectedGameId={selectedGameId}
                      setSelectedGameId={setSelectedGameId}
                      selectedCourtId={selectedCourtId}
                      setSelectedCourtId={setSelectedCourtId}
                      gameId={filterData.gameId}
                      courtId={filterData.courtId}
                      endDate={filterData.endDate}
                      startDate={filterData.startDate}
                      createdEndDate={filterData.createdEndDate}
                      createdStartDate={filterData.createdStartDate}
                      handleFilterSubmit={handleFilterSubmit}
                      handleFilterClear={handleFilterClear}
                      handleSetFilterData={handleSetFilterData}
                    />
                  )}
                </Box>
              </Box>
            </Box>
            <Box className={classes.bottom}>
              <Box className={classes.tablesection}>
                <BookingTable
                  rowData={dashboardData?.data?.paymentLogs}
                  columns={paymentHistoryColumns(
                    setOpenPaymentDetailModal,
                    setSelectedOrderId,
                    isUpcomingBooking
                  )}
                  page={queryData.page - 1}
                  rowCount={
                    queryData.isUpcoming
                      ? dashboardData?.data?.totalUpcomingBookings
                      : dashboardData?.data?.totalBooking
                  }
                  pageSize={queryData.limit}
                  onPageSizeChange={handlePageSizeChange}
                  onPageChange={handlePageChange}
                  rowsPerPageOptions={rowsPerPageOptions}
                  loading={isDashboardLoading || !isDashboardSuccess}
                />
              </Box>
            </Box>
          </Box>
        </Box>
      </Card>
      <PaymentDetailsDialog
        closePaymentDetailsDialog={closePaymentDetailsDialog}
        openPaymentDetailModal={openPaymentDetailModal}
        selectedOrderId={selectedOrderId}
      />
    </>
  );
};
LOOKUPVALUE(
    Products[UnitPrice],
    PRODUCTS[ProductID], ORDER_DETAILS[ProductID]
        )
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>flex yapı</title>
	<style type="text/css">
		.container{
			margin: auto;
			display: flex;
			width: 80%;
			flex-direction: column;
			height: 80%;
			position: relative;

		}
		.header{
			text-align: center;
			background-color: pink;
			width: 100%;
			border: 1px solid black;
			height: 25vh;
			margin-bottom: 5px;
		}
		.middleContainer{
			display:flex;
			flex-direction: row;
			width: 100%;
			justify-content: space-evenly;
			flex-wrap: wrap;
		}
		.box{
			width: 30%;
			height: 25vh;
			background-image: url(https://r.resimlink.com/fe0sC.png);
			margin-bottom: 2px;
		}
		.footer{
			text-align: center;
			background-color: whitesmoke;
			width: 100%;
			border: 1px solid black;
			height: 15vh;
			margin-bottom: 5px;
			background-image: url(https://r.resimlink.com/KIZis6lGL.png);
		}
		
        .metin2 {
           position: absolute;
           top: 85%;
           left: 32%;
        }
        .deneme{
        	background-image: url(https://r.resimlink.com/WfpQin-wy4Y.png);
        }
        .başlık{
        	background-image: url(https://r.resimlink.com/KIZis6lGL.png);
        }
        .metin3 {
           position: absolute;
           top: 92%;
           left: 32%;  
        }
        .metin4 {
           position: absolute;
           top: 92%;
           left: 53%;  
        }
        .font{
        	position: absolute;
            top: 10%;
            left: 26%;
        	font-size:70px;
        	font-weight: bolder;
        	font-style: Math Sans Bold;
        }
	</style>
 
</head>
<body background="https://r.resimlink.com/rfYMb.png">

    <div class="container">
    	<div class="header">
    		  <div class="başlık" style="height: 100%; width: 100%;">
        <div class="font"><a>KAMP MALZEMELERİ</a></div>
        <a href="https://r.resimlink.com/sGwEMYp9.png">→ site logosu ←</a>
        </div>
    	</div>
    	<div class="middleContainer">
    		<div class="box"><img src="çadır.png" style="height: 100%; width: 100%;"></div>
    		<div class="box"><img src="lamba.png" style="height: 100%; width: 100%;"></div>
    		<div class="box"><img src="sandalye.png" style="height: 100%; width: 100%;"></div>
    		<div class="box"><img src="bıçak.png" style="height: 100%; width: 100%;"></div>
    		<div class="box"><img src="ocak.png" style="height: 100%; width: 100%;"></div>
    		<div class="box"><img src="masa.png" style="height: 100%; width: 100%;"></div>
        </div>
        <div class="footer"><img src="çerçeve.png" style="height: 100%; width: 100%;"></div>
        <div class="metin2"><a style="font-size:32px" href="https://www.youtube.com/@efeturda6627">→ YOUTUBE ←</a></div>
        <div class="metin3"><a style="font-size:32px" href="mailto:omerfaruksevci1726@gmail.com">→ GMAİL İÇİN ←</a></div>
        <div class="metin4"><a style="font-size:32px" href="https://www.instagram.com/umraniye75cmtal/">→ İNSTAGRAM  ←</a></div>
    </div>
</body>
</html>
  void reverse(int arr[],int low,int high)
    {
        while(low<=high)
        {
            int temp=arr[low];
            arr[low]=arr[high];
            arr[high]=temp;
            low++;
            high--;
        }
    }
    //Function to rotate an array by d elements in counter-clockwise direction. 
    void rotateArr(int arr[], int d, int n)
    {
        if(d>n)
        {
            d=d%n;
        }
        reverse(arr,0,d-1);
        reverse(arr,d,n-1);
        reverse(arr,0,n-1);
    }
 struct Node* reverseList(struct Node *head)
    {
        if(!head or head->next==NULL)
        {
            return head;
        }
        Node* chotahead=reverseList(head->next);
        head->next->next=head;
        head->next=NULL;
        return chotahead;
    }
CALCULATE(
    [Revenue],
    FILTER(
        ALL( 'Calendar'[Year] ),
        'Calendar'[Year] IN { 1996, 1998 }
    )
)
volumes_from:
  - service_name
  - service_name:ro
  - container:container_name
  - container:container_name:rw
star

Sun Dec 10 2023 12:32:56 GMT+0000 (Coordinated Universal Time) https://ayedot.com/6239/MiniBlog/Day-8--Filtering-The-Children-part-3--Typehero-Advent-of-TypeScript-Challenge-

@gabe_331

star

Sun Dec 10 2023 10:56:14 GMT+0000 (Coordinated Universal Time)

@omnixima #css

star

Sun Dec 10 2023 10:13:12 GMT+0000 (Coordinated Universal Time)

@mehran

star

Sun Dec 10 2023 10:12:40 GMT+0000 (Coordinated Universal Time)

@mehran

star

Sun Dec 10 2023 09:24:37 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sun Dec 10 2023 08:38:04 GMT+0000 (Coordinated Universal Time) https://answers.netlify.com/t/know-if-recaptcha-v2-was-checked-or-not/41271/14

@Kiwifruit #forms #recaptcha #captcha

star

Sun Dec 10 2023 06:56:21 GMT+0000 (Coordinated Universal Time)

@SabsZinn123

star

Sun Dec 10 2023 04:54:59 GMT+0000 (Coordinated Universal Time)

@Jeremicah

star

Sun Dec 10 2023 01:23:36 GMT+0000 (Coordinated Universal Time) https://jdhitsolutions.com/blog/powershell/4169/friday-fun-updated-ise-scripting-geek-module/

@baamn #powershell

star

Sun Dec 10 2023 00:19:56 GMT+0000 (Coordinated Universal Time) https://sabine725.substack.com/publish/settings

@sabinesmith

star

Sun Dec 10 2023 00:02:44 GMT+0000 (Coordinated Universal Time) https://wp-skills.com/tools/meta-box-generator

@dmsearnbit

star

Sat Dec 09 2023 21:08:57 GMT+0000 (Coordinated Universal Time) https://www.thiscodeworks.com/extension/initializing?newuser

@Joshuapower297

star

Sat Dec 09 2023 20:28:27 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 20:15:34 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 20:10:19 GMT+0000 (Coordinated Universal Time)

@Mohamedshariif #java

star

Sat Dec 09 2023 18:41:06 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=mJuz45RXeXY

@devbymohsin

star

Sat Dec 09 2023 17:44:36 GMT+0000 (Coordinated Universal Time) https://www.includehelp.com/data-structure-tutorial/check-if-given-sorted-subsequence-exits-in-the-binary-search-tree-or-not.aspx

@AtulPatil

star

Sat Dec 09 2023 17:22:39 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 16:47:49 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/en-us/answers/questions/597931/convert-xlsx-to-csv-using-powershell

@baamn #powershell

star

Sat Dec 09 2023 15:37:33 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 15:23:14 GMT+0000 (Coordinated Universal Time)

@marcopinero #javascript

star

Sat Dec 09 2023 14:59:34 GMT+0000 (Coordinated Universal Time) https://www.cellml.org/Members/stevens/docs/sample.xml/view

@johnyjohny_

star

Sat Dec 09 2023 14:29:46 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 13:28:05 GMT+0000 (Coordinated Universal Time)

@msaadshahid

star

Sat Dec 09 2023 12:58:01 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/defi-development-company

@jonathandaveiam #defi #decentralizedfinance

star

Sat Dec 09 2023 11:03:08 GMT+0000 (Coordinated Universal Time) https://github.com/passavlasso/log-bee-front

@robota1989

star

Sat Dec 09 2023 11:01:40 GMT+0000 (Coordinated Universal Time) https://github.com/passavlasso/log-bee-front

@robota1989

star

Sat Dec 09 2023 09:37:38 GMT+0000 (Coordinated Universal Time) https://medium.com/lunartechai/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7

@miskat80

star

Sat Dec 09 2023 09:37:02 GMT+0000 (Coordinated Universal Time) https://www.beleaftechnologies.com/wazirx-clone-script-development

@Gracesparkle

star

Sat Dec 09 2023 08:42:44 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v

@devbymohsin #javascript #basicjs

star

Sat Dec 09 2023 07:01:14 GMT+0000 (Coordinated Universal Time)

@devbymohsin #javascript #basicjs

star

Sat Dec 09 2023 06:08:50 GMT+0000 (Coordinated Universal Time) https://ezcode.tistory.com/48

@wheedo #mysq

star

Sat Dec 09 2023 05:07:33 GMT+0000 (Coordinated Universal Time) https://ubuntu.com/server/docs/security-users

@neuromancer

star

Sat Dec 09 2023 00:04:06 GMT+0000 (Coordinated Universal Time) https://www.google.com/search?q

@baamn

star

Fri Dec 08 2023 21:37:44 GMT+0000 (Coordinated Universal Time) https://www.drzon.net/posts/export-all-google-sheets-to-csv/

@baamn ##google #apps #script

star

Fri Dec 08 2023 17:03:44 GMT+0000 (Coordinated Universal Time)

@bfpulliam #react.js

star

Fri Dec 08 2023 12:23:21 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Fri Dec 08 2023 12:22:54 GMT+0000 (Coordinated Universal Time)

@zaryabmalik

star

Fri Dec 08 2023 12:19:13 GMT+0000 (Coordinated Universal Time)

@Bisma_Shahzad #php

star

Fri Dec 08 2023 12:10:58 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Fri Dec 08 2023 11:13:25 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Fri Dec 08 2023 10:39:54 GMT+0000 (Coordinated Universal Time)

@chiragwebelight #reactj

star

Fri Dec 08 2023 09:49:57 GMT+0000 (Coordinated Universal Time)

@nikahafiz #ms.pbi #dax #dax.lookupvalue

star

Fri Dec 08 2023 09:20:34 GMT+0000 (Coordinated Universal Time)

@Deas #html #css

star

Fri Dec 08 2023 06:39:55 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/problems/rotate-array-by-n-elements-1587115621/1?itm_source=geeksforgeeks&itm_medium=article&itm_campaign=bottom_sticky_on_article

@nistha_jnn #c++

star

Fri Dec 08 2023 04:20:55 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Fri Dec 08 2023 00:44:05 GMT+0000 (Coordinated Universal Time) https://github.com/compose-spec/compose-spec/blob/master/spec.md

@lbarosi

Save snippets that work with our extensions

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