Snippets Collections
function mynew_product_subcategories( $args = array() ) {
	$parentid = get_queried_object_id();
	$args = array(
	    'parent' => $parentid
	);
	$terms = get_terms( 'product_cat', $args );
	if ( $terms ) {   
	    echo '<ul class="product-cats">';
	        foreach ( $terms as $term ) {              
	            echo '<li class="category">';                        
	                woocommerce_subcategory_thumbnail( $term ); 
	                echo '<h2>';
	                    echo '<a href="' .  esc_url( get_term_link( $term ) ) . '" class="' . $term->slug . '">';
	                        echo $term->name;
	                    echo '</a>';
	                echo '</h2>';                                                        
	            echo '</li>';                                                        
	    }
	    echo '</ul>';
	}
}
 
add_action( 'woocommerce_before_shop_loop', 'mynew_product_subcategories', 50 );
Function COUNTConditionColorCells(CellsRange As Range, ColorRng As Range)
'make the worksheet always update
Application.Volatile
'define my variables

Dim Work As Boolean
Dim dbw As String
Dim CFCELL As Range
Dim CF1 As Single
Dim CF2 As Double
Dim CF3 As Long

Work = False
'for the first conditional format to the number of conditions in the range
For CF1 = 1 To CellsRange.FormatConditions.Count
    'if the first condition colour is in the range then start counting
    If CellsRange.FormatConditions(CF1).Interior.ColorIndex = ColorRng.Interior.ColorIndex Then
    Work = True
Exit For
    End If
Next CF1
CF2 = 0
CF3 = 0
If Work = True Then
For Each CFCELL In CellsRange
    'count the colours in the range
    dbw = CFCELL.FormatConditions(CF1).Formula1
    dbw = Application.ConvertFormula(dbw, xlA1, xlR1C1)
    dbw = Application.ConvertFormula(dbw, xlR1C1, xlA1, , ActiveCell.Resize(CellsRange.Rows.Count, CellsRange.Columns.Count).Cells(CF3 + 1))
    If Evaluate(dbw) = True Then CF2 = CF2 + 1
        CF3 = CF3 + 1
Next CFCELL
Else
COUNTConditionColorCells = "NO-COLOR"
Exit Function
    End If
COUNTConditionColorCells = CF2
End Function
Description: Originally a popular extension for Firefox, NoScript allows you to selectively enable and disable JavaScript, Java, Flash, and other executable content.
import React, { useEffect, useState } from 'react';

const MyTable = ({ filterValues }) => {
  const [intradata, setIntradata] = useState(null);
  const [data, setData] = useState(null);
  const [selectedGroup, setSelectedGroup] = useState('summary');
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);
  const [columns, setColumns] = useState([]);
  const [validGroups, setValidGroups] = useState([]);
  


  
 // Updated parseDate function
const parseDate = (dateString) => {
  console.log('Parsing date:', dateString);
  try {
    // Check if the date string is in Persian format (contains non-numeric characters)
    const isPersianFormat = /[^\d]/.test(dateString);

    if (isPersianFormat) {
      // Parse Persian date
      const match = dateString.match(/(\d+)/g);

      if (!match || match.length !== 3) {
        throw new Error(`Invalid date format for end_date: ${dateString}`);
      }

      const [year, month, day] = match.map(Number);

      // Convert Persian date to Gregorian date
      const gregorianYear = year + 621; // Add 621 to convert to Gregorian year
      const gregorianMonth = month - 1; // Months are zero-based
      const gregorianDay = day;

      return new Date(gregorianYear, gregorianMonth, gregorianDay);
    } else {
      // Parse Gregorian date
      const [year, month, day] = dateString.match(/(\d+)/g).map(Number);

      return new Date(year, month - 1, day); // Months are zero-based
    }
  } catch (error) {
    console.error('Error parsing date:', error);
    // Log additional information about the problematic date
    console.log('Problematic date:', dateString);

    // Provide a fallback date (e.g., current date) in case of parsing failure
    return new Date();
  } 
};

  useEffect(() => {
    console.log('Selected Group:', selectedGroup);
    console.log('Filter04 Value:', filterValues.filter04);
    const fetchData = async () => {
      try {
        // Fetch intradatacols
        const intradatacolsResponse = await fetch('http://5.34.198.87:8000/api/options/intradatacols');
        if (!intradatacolsResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradatacolsResponse.status}`);
        }

        const intradatacolsData = await intradatacolsResponse.json();
        console.log('API Response for intradatacols:', intradatacolsData);
        setData(intradatacolsData);

        const groups = Object.keys(intradatacolsData.groups);
        setValidGroups(groups);

        const initialColumns = intradatacolsData.groupscolumn[selectedGroup] || [];
        setColumns(initialColumns);

        if (!groups.includes(selectedGroup)) {
          console.error(`Invalid selectedGroup: ${selectedGroup}`);
          return;
        }

        // Fetch intradata
        const intradataResponse = await fetch('http://5.34.198.87:8000/api/options/intradata');
        if (!intradataResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradataResponse.status}`);
        }

        const intradataData = await intradataResponse.json();
        console.log('API Response for intradata:', intradataData);

        setIntradata(intradataData.data);
      } catch (error) {
        console.error('Error fetching data:', error);
        setError(error.message || 'An error occurred while fetching data.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  },  [selectedGroup, filterValues.filter04]);

  useEffect(() => {
    
    console.log('intradata:', intradata);
    console.log('columns:', columns);
    console.log('data:', data);
  }, [intradata, columns, data]);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  if (!intradata || !data || !data.groups || !data.groupscolumn) {
    return <div>No data available</div>;
  }

 // Filter the intradata based on filterValues
const filteredData = intradata.filter((item) => {
  // Check filter01
  if (filterValues.filter01 && item.ua_instrument_id.toString().toLowerCase() !== filterValues.filter01.toString().toLowerCase()) {
    console.log(`ua_instrument_id Filter: ${item.ua_instrument_id} !== ${filterValues.filter01}`);
    return false;
  }

  // Check filter02
  if (filterValues.filter02 && item.option_status.toLowerCase() !== filterValues.filter02.toLowerCase()) {
    console.log(`Filter02: ${item.option_status} !== ${filterValues.filter02}`);
    return false;
  }

// Check option type filter (filter04)
if (filterValues.filter04  && item.option_type.toLowerCase().includes(filterValues.filter04.toLowerCase())) {
  console.log(`Option type Filter: ${item.option_type} does not include ${filterValues.filter04}`);
  console.log('Item Option Type:', item.option_type);
console.log('Filter04 Value:', filterValues.filter04);

  return false;
}

  // Check date range filter
  if (filterValues.startDate && filterValues.endDate) {
    const itemDate = parseDate(item.end_date);

    if (isNaN(itemDate.getTime())) {
      console.error(`Invalid date format for end_date: ${item.end_date}`);
      return false;
    }

    const startDate = parseDate(filterValues.startDate);
    const endDate = parseDate(filterValues.endDate);

    console.log('Item Date:', itemDate);
    console.log('Start Date:', startDate);
    console.log('End Date:', endDate);

    console.log('Column Values:', item[columns[0]]);

    return itemDate >= startDate && itemDate <= endDate;
  }
    return true;
  });

  console.log('Filtered Data:', filteredData);
  console.log('Filtered Data for Rendering:', filteredData);
  

  return (
    <div className="container mt-4">
      <div className="btn-group mb-3">
        {validGroups.map((groupKey) => (
          <button
            key={groupKey}
            type="button"
            className={`btn ${selectedGroup === groupKey ? 'bg-blue-500 text-white' : 'bg-blue-200'}`}
            onClick={() => setSelectedGroup(groupKey)}
          >
            {data.groups[groupKey]}
          </button>
        ))}
      </div>

      <div className="table-container overflow-x-auto" style={{ maxHeight: '400px' }}>
        <table className="table-auto w-full border-collapse border border-gray-800">
          <thead className="bg-gray-800 text-white">
            <tr>
              {columns.map((column, index) => (
                <th key={index} className="py-2 px-4 border border-gray-800">
                  {data.fields[column]}
                </th>
              ))}
            </tr>
          </thead>
          <tbody>
            {filteredData.length > 0 ? (
              filteredData.map((item, itemIndex) => (
                <tr key={itemIndex} className={itemIndex % 2 === 0 ? 'bg-gray-100' : 'bg-white'}>
                  {columns.map((column, columnIndex) => (
                    <td key={columnIndex} className="py-2 px-4 border border-gray-800">
                      {item[column] instanceof Date ? item[column].toLocaleDateString() : item[column]}
                    </td>
                  ))}
                </tr>
              ))
            ) : (
              <tr>
                <td colSpan={columns.length} className="py-2 px-4 border border-gray-800">
                  No matching data
                </td>
              </tr>
            )}
          </tbody>
        </table>
      </div>
    </div>
  );
};

export default MyTable;
class A
{
    static int b =10;// static
    int c=20;//Instance
    public static void main(String[] args)
    {
        int a=30;//Local
        System.out.println(a);//local
        System.out.println(A.b);//static
        A r= new A();
        System.out.println(r.c);//Instace 
        
        
        
    }
}
class A
{
    static int b =10;// static
    int c=20;//Instance
    public static void main(String[] args)
    {
        int a=30;//Local
        System.out.println(a);//local
        System.out.println(A.b);//static
        A r= new A();
        System.out.println(r.c);//Instace 
        
        
        
    }
}
GlideSecurityManager.get().enableElevatedRole('security_admin');
doThingOne(function() {
  doThingTwo(function() {
    doThingThree(function() {
      doThingFour(function() {
        // Oh no
      });
    });
  });
});
<script>
document.addEventListener('DOMContentLoaded', function() {
  // Select all <a> tags with the specified href and class
    var links = document.querySelectorAll('a[href="https://fareharbor.com/embeds/book/vrxtra/?full-items=yes"].wp-block-button__link');
  links.forEach(function(link) {
    link.removeAttribute('onclick');
  });
});
</script>
class B 
{
    public static void main(String[] args)
    {
       int a = 1900;
       Integer b=Integer.valueOf(a);
       System.out.println(a+b);
    }
}
class B 
{
    public static void main(String[] args)
    {
       int a = 1900;
       Integer b=Integer.valueOf(a);
       System.out.println(a+b);
    }
}
class B 
{
    public static void main(String[] args)
    {
       int a = 1900;
       Integer b=Integer.valueOf(a);
       System.out.println(a+b);
    }
}
class F
{
    public static void main(String[] args)
    {
        Integer a = new Integer(100);
        int b=a.intValue();
        System.out.println(a+b);
    }
}
<?php

namespace MIN\MinSitecore\Hooks;

use TYPO3\CMS\Core\Utility\DebugUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

class CkeditorConfigHook {

    public function process(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
        $typo3Version = VersionNumberUtility::getNumericTypo3Version();

        if (version_compare($typo3Version, '11.5', '<')) {
            // Für TYPO3-Versionen vor 11.0
            $configFile = 'EXT:min_sitecore/Configuration/RTE/min.yaml';
        } else {
            // Für TYPO3 11.0 und höher
            $configFile = 'EXT:min_sitecore/Configuration/RTE/main_v5.yaml';
        }

        // Lade die CKEditor-Konfiguration
        $this->loadCkeditorConfig($configFile);
    }

    protected function loadCkeditorConfig($configFile) {
        // Hier die Logik implementieren, um die YAML-Konfigurationsdatei zu laden
        // Möglicherweise müssen Sie die geladene Konfiguration mit der globalen RTE-Konfiguration zusammenführen
    }
}
class CkeditorConfigHook {

    public function process(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
        $typo3Version = VersionNumberUtility::getNumericTypo3Version();
        // DebugUtility::debug($typo3Version, 'Aktuelle TYPO3-Version');
        if (version_compare($typo3Version, '11.5', '<')) {
            // Load CKEditor 4 configuration
            $this->loadCkeditor4Config($pageRenderer);
        } else {
            // Load CKEditor 5 configuration
            $this->loadCkeditor5Config($pageRenderer);
        }
    }
    static function loadCkeditor4Config($pageRenderer) {
        $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['min'] = 'FILE:EXT:min_sitecore/Configuration/RTE/min.yaml';
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('RTE.default.preset = min');
        // DebugUtility::debug('Lade CKEditor 4 Konfiguration', 'CKEditor Konfiguration');
    }
    static function loadCkeditor5Config($pageRenderer) {
        $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['min'] = 'FILE:EXT:min_sitecore/Configuration/RTE/main_v5.yaml';
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('RTE.default.preset = min');
        // DebugUtility::debug('Lade CKEditor 5 Konfiguration', 'CKEditor Konfiguration');
    }
}
.div{
left: calc(-50vw - -50%);
position: relative;
width: 100vw;
}
.expanding-div {
    width: 200px;
    overflow: hidden;
    max-height: 0; /* Initial max height */
    transition: max-height 0.5s ease; /* Animation transition property */
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.expanding-div:hover {
    max-height: 500px; /* Adjust the max height as needed */
}
<link rel="preconnect" href="https://fonts.googleapis.com">

<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
# Handle pagination with Selenium
# Scrape Website (www.audible.com)

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import pandas as pd
import time

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.audible.com/search"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specific website
driver.get(website)

# Wait for some time to ensure the page is loaded
time.sleep(5)

try:
    # Wait for the container to be present
    container = WebDriverWait(driver, 10).until(
        EC.presence_of_element_located((By.CLASS_NAME, 'adbl-impression-container'))
    )

    # Wait for the products to be present within the container
    products = WebDriverWait(container, 10).until(
        EC.presence_of_all_elements_located((By.XPATH, './/li[contains(@class, "productListItem")]'))
    )

    book_title = []
    author_name = []
    run_time = []
    release_date = []

    for product in products:
        try:
            # Wait for the book title element to be present within each product
            book_title_elem = WebDriverWait(product, 5).until(
                EC.presence_of_element_located((By.XPATH, './/h3[contains(@class, "bc-heading")]'))
            )

            # Append book title
            book_title.append(book_title_elem.text)
            
            # Append author name
            author_name_elem = product.find_element(By.XPATH, './/li[contains(@class, "authorLabel")]')
            author_name.append(author_name_elem.text)

            # Append run time
            run_time_elem = product.find_element(By.XPATH, './/li[contains(@class, "runtimeLabel")]')
            run_time.append(run_time_elem.text)

            # Append release date
            release_date_elem = product.find_element(By.XPATH, './/li[contains(@class, "releaseDateLabel")]')
            release_date.append(release_date_elem.text)

        except TimeoutException:
            print("Timeout occurred while waiting for element within product.")
            # Handle the timeout situation here (e.g., skip this product or log the issue)

    # Create DataFrame and save to CSV
    df = pd.DataFrame({'book_title': book_title,
                       'author_name': author_name,
                       'run_time': run_time,
                       'release_date': release_date})

    df.to_csv('amazon_audible.csv', index=False)
    print(df)

except TimeoutException:
    print("Timeout occurred while waiting for container element.")
    # Handle the timeout situation here (e.g., retry navigating to the page or log the issue)

finally:
    # Quit the driver
    driver.quit()

# Import necessary libraries
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import pandas as pd
from selenium.common.exceptions import NoSuchElementException, TimeoutException

# Set the path to chromedriver.exe
path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()

# Add the --headless option to run Chrome in headless mode (optional)
# options.add_argument("--headless")

# Add the --detach option to keep the browser open after the script finishes
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

try:
    # Wait for the "All matches" button to be clickable
    all_matches_button = WebDriverWait(driver, 10).until(
        EC.element_to_be_clickable((By.XPATH, '//label[@analytics-event="All matches"]'))
    )

    # Click on the "All matches" button
    all_matches_button.click()

    # Wait for the matches to load (adjust the timeout as needed)
    WebDriverWait(driver, 10).until(
        EC.presence_of_all_elements_located((By.TAG_NAME, "tr"))
    )

    # Get all match elements
    matches = driver.find_elements(By.TAG_NAME, "tr")

    date = []
    home_team = []
    score = []
    away_team = []

    # Extract data from each match
    for match in matches:
        date.append(match.find_element("xpath", "./td[1]").text)
        home_team.append(match.find_element("xpath", "./td[2]").text)
        score.append(match.find_element("xpath", "./td[3]").text)
        away_team.append(match.find_element("xpath", "./td[4]").text)

except (NoSuchElementException, TimeoutException) as e:
    print(f"Error: {e}")

finally:
    # Close the WebDriver when you're done
    driver.quit()

# Create a DataFrame from the scraped data
df = pd.DataFrame({'date': date,
                   'home_team': home_team,
                   'score': score,
                   'away_team': away_team})

# Save the DataFrame to a CSV file
df.to_csv('football_data.csv', index=False)

# Print the DataFrame
print(df)
# ---------------------------    Chrome   ---------------------------------

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
import pandas as pd
import time

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

all_matches_button = driver.find_element("xpath", '//label[@analytics-event="All matches"]')
all_matches_button.click()

dropdown = Select(driver.find_element(By.ID, "country"))
dropdown.select_by_visible_text('Spain')

time.sleep(3)

matches = driver.find_elements(By.TAG_NAME, "tr")

date = []
home_team = []
score = []
away_team = []

for match in matches:
    date.append(match.find_element("xpath", "./td[1]").text)
    home_team.append(match.find_element("xpath", "./td[2]").text)
    score.append(match.find_element("xpath", "./td[3]").text)
    away_team.append(match.find_element("xpath", "./td[4]").text)

# Close the WebDriver when you're done
driver.quit()

df = pd.DataFrame({'date': date,
                   'home_team': home_team,
                   'score': score,
                   'away_team': away_team})
df.to_csv('football_data.csv', index=False)
print(df)
# ---------------------------    Chrome   ---------------------------------

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

all_matches_button = driver.find_element("xpath", '//label[@analytics-event="All matches"]')
all_matches_button.click()

matches = driver.find_elements(By.TAG_NAME, "tr")

date = []
home_team = []
score = []
away_team = []

for match in matches:
    date.append(match.find_element("xpath", "./td[1]").text)
    home_team.append(match.find_element("xpath", "./td[2]").text)
    home = match.find_element("xpath","./td[2]").text
    print(home)
    score.append(match.find_element("xpath", "./td[3]").text)
    away_team.append(match.find_element("xpath", "./td[4]").text)

# Close the WebDriver when you're done
# driver.quit()

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
import pandas as pd
import time

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

all_matches_button = driver.find_element("xpath", '//label[@analytics-event="All matches"]')
all_matches_button.click()

dropdown = Select(driver.find_element(By.ID, "country"))
dropdown.select_by_visible_text('Spain')

time.sleep(3)

matches = driver.find_elements(By.TAG_NAME, "tr")

date = []
home_team = []
score = []
away_team = []

for match in matches:
    date.append(match.find_element("xpath", "./td[1]").text)
    home_team.append(match.find_element("xpath", "./td[2]").text)
    score.append(match.find_element("xpath", "./td[3]").text)
    away_team.append(match.find_element("xpath", "./td[4]").text)

# Close the WebDriver when you're done
driver.quit()

df = pd.DataFrame({'date': date,
                   'home_team': home_team,
                   'score': score,
                   'away_team': away_team})
df.to_csv('football_data.csv', index=False)
print(df)
import React, { useState } from 'react';

const DateFilter = ({ onFilterChange }) => {
  const [startDate, setStartDate] = useState('');
  const [endDate, setEndDate] = useState('');

  const handleFilterClick = () => {
    // Convert the selected dates to timestamps or any format that matches your API
    const startTimestamp = startDate ? new Date(startDate).getTime() : null;
    const endTimestamp = endDate ? new Date(endDate).getTime() : null;

    // Call the callback function to pass the filter values to the parent component
    onFilterChange({ startDate: startTimestamp, endDate: endTimestamp });
  };

  return (
    <div>
      <label>Start Date:</label>
      <input type="date" value={startDate} onChange={(e) => setStartDate(e.target.value)} />

      <label>End Date:</label>
      <input type="date" value={endDate} onChange={(e) => setEndDate(e.target.value)} />

      <button onClick={handleFilterClick}>Apply Filter</button>
    </div>
  );
};

export default DateFilter;
import React, { useEffect, useState } from 'react';

const MyTable = ({ filterValues }) => {
  const [intradata, setIntradata] = useState(null);
  const [data, setData] = useState(null);
  const [selectedGroup, setSelectedGroup] = useState('summary');
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);
  const [columns, setColumns] = useState([]);
  const [validGroups, setValidGroups] = useState([]);

  useEffect(() => {
    const fetchData = async () => {
      try {
        // Fetch intradatacols
        const intradatacolsResponse = await fetch('http://5.34.198.87:8000/api/options/intradatacols');
        if (!intradatacolsResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradatacolsResponse.status}`);
        }

        const intradatacolsData = await intradatacolsResponse.json();
        console.log('API Response for intradatacols:', intradatacolsData);
        setData(intradatacolsData);

        const groups = Object.keys(intradatacolsData.groups);
        setValidGroups(groups);

        const initialColumns = intradatacolsData.groupscolumn[selectedGroup] || [];
        setColumns(initialColumns);

        if (!groups.includes(selectedGroup)) {
          console.error(`Invalid selectedGroup: ${selectedGroup}`);
          return;
        }

        // Fetch intradata
        const intradataResponse = await fetch('http://5.34.198.87:8000/api/options/intradata');
        if (!intradataResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradataResponse.status}`);
        }

        const intradataData = await intradataResponse.json();
        console.log('API Response for intradata:', intradataData);

        setIntradata(intradataData.data);
      } catch (error) {
        console.error('Error fetching data:', error);
        setError(error.message || 'An error occurred while fetching data.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  }, [selectedGroup]);

  useEffect(() => {
    console.log('intradata:', intradata);
    console.log('columns:', columns);
    console.log('data:', data);
  }, [intradata, columns, data]);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  if (!intradata || !data || !data.groups || !data.groupscolumn) {
    return <div>No data available</div>;
  }

  // Filter the intradata based on filterValues
  const filteredData = intradata.filter((item) => {
    // Check filter01
    if (filterValues.filter01 && item.ua_instrument_id.toString().toLowerCase() !== filterValues.filter01.toString().toLowerCase()) {
      console.log(`ua_instrument_id Filter: ${item.ua_instrument_id} !== ${filterValues.filter01}`);
      return false;
    }

    // Custom function to parse date in the format "yyyyMMdd"
const parseCustomDate = (dateString) => {
  const year = dateString.substr(0, 4);
  const month = dateString.substr(4, 2) - 1; // Months are zero-based
  const day = dateString.substr(6, 2);

  return new Date(year, month, day);
};

// Check date range filter
if (filterValues.startDate && filterValues.endDate) {
  const itemDate = parseCustomDate(item.end_date); // Parse using custom function

  if (isNaN(itemDate.getTime())) {
    console.error(`Invalid date format for end_date: ${item.end_date}`);
    return false;
  }

  const startDate = parseInt(filterValues.startDate, 10);
  const endDate = parseInt(filterValues.endDate, 10);

  console.log('Item Date:', itemDate);
  console.log('Start Date:', startDate);
  console.log('End Date:', endDate);

  console.log('Column Values:', item[columns[0]]);

  return itemDate >= startDate && itemDate <= endDate;
}
return true;
});

console.log('Filtered Data:', filteredData);
  console.log('Filtered Data for Rendering:', filteredData);

return (
<div className="container mt-4">
  <div className="btn-group mb-3">
    {validGroups.map((groupKey) => (
      <button
        key={groupKey}
        type="button"
        className={`btn ${selectedGroup === groupKey ? 'bg-blue-500 text-white' : 'bg-blue-200'}`}
        onClick={() => setSelectedGroup(groupKey)}
      >
        {data.groups[groupKey]}
      </button>
    ))}
  </div>

  <div className="table-container overflow-x-auto" style={{ maxHeight: '400px' }}>
    <table className="table-auto w-full border-collapse border border-gray-800">
      <thead className="bg-gray-800 text-white">
        <tr>
          {columns.map((column, index) => (
            <th key={index} className="py-2 px-4 border border-gray-800">
              {data.fields[column]}
            </th>
          ))}
        </tr>
      </thead>
      <tbody>
        {filteredData.length > 0 ? (
          filteredData.map((item, itemIndex) => (
            <tr key={itemIndex} className={itemIndex % 2 === 0 ? 'bg-gray-100' : 'bg-white'}>
              {columns.map((column, columnIndex) => (
                <td key={columnIndex} className="py-2 px-4 border border-gray-800">
                  {item[column] instanceof Date ? item[column].toLocaleDateString() : item[column]}
                </td>
              ))}
            </tr>
          ))
        ) : (
          <tr>
            <td colSpan={columns.length} className="py-2 px-4 border border-gray-800">
              No matching data
            </td>
          </tr>
        )}
      </tbody>
    </table>
  </div>
</div>
);
};

export default MyTable;
SELECT
SubscriberKey, EmailAddress, Consent_Level_Summary__c, Region, LanguageCode

FROM (
SELECT
DISTINCT LOWER(Email__c) AS EmailAddress, c.Id AS SubscriberKey, c.Consent_Level_Summary__c, 
CASE WHEN i.Region__c IS NOT NULL THEN i.Region__c ELSE lkup.Region END AS Region,
CASE WHEN c.Language__c IS NOT NULL THEN c.Language__c END AS LanguageCode, 

ROW_NUMBER() OVER(PARTITION BY c.ID ORDER BY i.LastModifiedDate DESC) as RowNum

FROM ep_mr_en_us_w170049_MASTER mstr 
JOIN ent.Interaction__c_Salesforce i ON LOWER(mstr.EmailAddress) = LOWER(i.Email__c)
JOIN ent.Contact_Salesforce_1 c ON LOWER(c.Email) = LOWER(i.Email__c)
INNER JOIN ENT.CountryCode_Language_Lookup lkup ON mstr.Mailing_Country__c = lkup.CountryCode

WHERE
    mstr.EmailAddress IS NOT NULL
)t2

WHERE RowNum = 1
document.getElementById('myButton').addEventListener('click', function () {
    console.log('Button clicked!');
});
curl https://ollama.ai/install.sh | sh
        const fetchData = async () => {
            try {
                const res = await fetch('https://api.example.com/data')
                const data = await res.json()

            } catch (error) {
                console.error("error:", error)
            }
            console.log("end of async fetching data")
        }
        fetchData()
        console.log("After Fetching data asynchronous")
SELECT EmailAddress,AMC_Status__c,Job_Role__c,AMC_Last_Activity_Date__c, Industry_Level_2_Master__c, Industry__c, SubscriberKey, Consent_Level_Summary__c,
Region, Mailing_Country__c, LanguageCode, CreatedDate, FirstName, LastName, SegmentRegion

FROM [ep_mr_en_us_w170049_MASTER_JOIN_INCLUDED_Contacts]
SELECT a.EmailAddress
FROM (
        SELECT b.EmailAddress
        FROM [ep_mr_en_us_w170049_MASTER] b
        WHERE 1 = 1
        AND LOWER(
            RIGHT (
                b.EmailAddress,
                LEN(b.EmailAddress) - CHARINDEX('@', b.EmailAddress)
            )
        ) IN (
            SELECT LOWER(x.Domain)
            FROM ent.[Dealer Domains] x
    )
) a
 
UNION ALL
SELECT a.EmailAddress
FROM (
    SELECT b.EmailAddress
    FROM [ep_mr_en_us_w170049_MASTER] b
    WHERE 1 = 1
    AND LOWER(
        RIGHT (
            b.EmailAddress,
            LEN(b.EmailAddress) - CHARINDEX('@', b.EmailAddress)
            )
        ) IN (
            SELECT LOWER(x.Domain)
            FROM ent.[Cat_Agency_Domains] x
    )
) a
 
UNION ALL
SELECT a.EmailAddress
FROM (
    SELECT b.EmailAddress
    FROM [ep_mr_en_us_w170049_MASTER] b
    WHERE 1 = 1
    AND LOWER(
        RIGHT (
            b.EmailAddress,
            LEN(b.EmailAddress) - CHARINDEX('@', b.EmailAddress)
            )
        ) IN (
            SELECT LOWER(x.Domain)
            FROM ent.[Competitor Domains] x
    )
) a
<?php

namespace MIN\MinSitecore\Hooks;

use TYPO3\CMS\Core\Utility\VersionNumberUtility;

class CkeditorConfigHook {

    /**
     * Adjusts CKEditor configuration based on TYPO3 version
     *
     * @param array $parameters
     * @param \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer
     */
    public function process(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
        $typo3Version = VersionNumberUtility::getNumericTypo3Version();
        
        if (version_compare($typo3Version, '11.5', '<')) {
            // Load CKEditor 4 configuration
            $this->loadCkeditor4Config($pageRenderer);
        } else {
            // Load CKEditor 5 configuration
            $this->loadCkeditor5Config($pageRenderer);
        }
    }

    protected function loadCkeditor4Config($pageRenderer) {
        // Implement CKEditor 4 specific configuration
    }

    protected function loadCkeditor5Config($pageRenderer) {
        // Implement CKEditor 5 specific configuration
    }
}
dataLayer.push({
  ecommerce: {
    currencyCode: "EUR",
    purchase: {
      actionField: {
        coupon: "",
        affiliation: "Online Store",
        transaction_id: 4091243,
        revenue: 5.37,
        new: 1,
        shipping: 4.99,
        id: "4091243",
        option: "paypal_payment_method_handler",
        tax: 1.02
      },
      products: [
        {
          quantity: 1,
          item_name: "Baby-Gießer Glitter",
          item_id: 2000578486402,
          id: "2000578486402",
          name: "Baby-Gießer Glitter",
          type: "product",
          p_id: "",
          variant: "",
          brand: "Simba",
          price: 1.4,
          category: "Sandspielzeug"
        }
      ]
    }
  },
  session-: "380c5d93a281755852731a6997eeff34",
  google_tag_params: {ecomm_totalvalue: 6.39, ecomm_pagetype: "purchase"}
})
Vorher: 
<INCLUDE_TYPOSCRIPT: source="DIR:./Ext" extensions="typoscript">
Nachher:
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:min_theme_minbase/Configuration/TypoScript/Ext" extensions="typoscript">
# Search:
source="DIR:./
# Replace typoscript: 
source="DIR:EXT:min_theme_minbase/Configuration/TypoScript/
# Replace tsconfig: 
source="DIR:EXT:min_theme_minbase/Configuration/PageTS/

min_sitecore/Configuration/TypoScript/Menu/Language/
min_sitecore/Configuration/TypoScript/Menu/Breadcrumb/
min_sitecore/Configuration/TypoScript/Menu/Service_Sitemap_Menus/
Vorher: [request.getPageArguments().get('nav') == 'drop']
Nachher: [request && request.getPageArguments() && request.getPageArguments().get('nav') == 'drop']
# Search:
request.getPageArguments().get(
# Replace:
request && request.getPageArguments() && request.getPageArguments().get(
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>Cashapp-hack-unlimited-money-adder-hack-software</id>
    <version>1.0.0</version>
    <title>Cash app hack unlimited money $$ cash app money adder hack software</title>
    <authors>Alex</authors>
    <owners></owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Cash app hack unlimited money $$ cash app money adder hack software:

VISIT HERE TO HACK &gt;&gt;&gt;&gt;&gt; https://gamedips.xyz/cashapp-new

Cash App free money is one of the very searched terms in Google and users are looking to locate techniques for getting free profit their Cash App balance with limited additional effort.Observe that there are numerous different survey and rewards sites that you can participate and get paid in Cash App balance using a number of methods. These easy ways can put balance in your account with a few work.Ways to get free money on Cash App, you can find survey and opinion rewards sites that will help you out. You can get free Cash App money sent to your Cash App wallet if you're using the Cash App payment option. Redeem your points for Cash App.Alternatively, you can even receive a telephone call from someone who claimed to be a Cash App representative. They then sent a text with an url to update your Cash App password. After you enter your real password on the form, the hackers gained full use of your Cash App account.

Cash App Hack,cash app hack apk ios,cash app hacked,cash app hack apk,cash app hack 2021,cash app hacks 2020,cash app hack no human verification,cash app hacks that really work,cash app hack wrc madison,cash app hack apk download,cash app hack august 2020,cash app hack april 2020,cash app hack activation code,cash app hack apk 2021,cash app hack april 2021,cash app bitcoin hack,cash app boost hack,big cash app hack,big cash app hack version,big cash app hack mod apk download,big cash app hack 2020,big cash app hack 2019,free bitcoin cash app hack</description>
  </metadata>
</package>
import connectDb from "@/middleware/mongoose";
import User from "@/models/User";
import bycrypt from 'bcryptjs'

const handler = async (req, res) => {
    try {
        if (req.method == 'POST') {
            const salt = await bycrypt.genSalt(10);
            const encrypted = await bycrypt.hash(req.body.password, salt)
            console.log(req.body.password)
    
            let user =  new User({
                username:req.body.name,
                email:req.body.email,
                password:encrypted
            })
            
            await user.save()
            res.status(200).json({ success: true, msg: "success", user})
        }
        else {
            res.status(400).json({ success: false, error: "Bad Request" })
        }
    } catch (error) {
        res.status(500).json({ success: false, error })
    }
};
export default connectDb(handler);
fn main() {
    let my_number = 100;
    println!("{}", my_number as u8 as char);
}
fn main() {
    let first_letter = 'A';
    let space = ' '; // A space inside ' ' is also a char
    let other_language_char = 'Ꮔ'; // Thanks to Unicode, other languages like Cherokee display just fine too
    let cat_face = '😺'; // Emojis are chars too
}
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import Product from "@/models/Product";
import connectDb from "@/middleware/mongoose";

const handler = async (req, res) => {
  // Queiries
};
export default connectDb(handler);
Mouse.OverrideCursor = Cursors.Wait;

// do stuff
Mouse.OverrideCursor = null;
 
HTML

 <nav>
      <ul>
          <li class="item">Home</li>
          <li class="item">Content</li>
          <li class="item">About</li>
          <li class="item">Contact Us</li>

      </ul>
  </nav>


  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script>
  <script src="script.js"></script>


CSS


body{
    background-color: #fff;
    overflow: hidden;
}
.container{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    
}
.item{
    color: grey;
    font-size: large;
    font-weight: bolder;
    cursor: pointer;
}


JS


let itemList = document.querySelectorAll(".item");


itemList.forEach(function (item, index) {

    let animation = gsap.to(item, {color: "black",x:3,y: -3, ease: "", duration:0.3, paused:true  })
    
    item.addEventListener("mouseenter", function() {
        animation.play()
    })
    item.addEventListener("mouseleave", function() {
        animation.reverse()
    })
})

// dllmain.cpp : Defines the entry point for the DLL application.
#include <windows.h>
#include <stdio.h>
#include "pch.h"

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID lpvReserved)
{
    switch (fdwReason)
    {
    case DLL_PROCESS_ATTACH:
        MessageBox(NULL, L"DLL INjection!", L"BOX", MB_OKCANCEL);
        break;
    }

    return TRUE;
}
Franklin Roosefelt said it best, “war is young men dying and old men talking”
Section Access;
AUTHORIZATION:
LOAD * INLINE [
    ACCESS, 	NTNAME,				REDUCTION
    ADMIN, 		SA\QL,				ALL
	USER,  		SA\QLDESARROLLO,	1
];
Section Application;

REDUCTION:
LOAD * INLINE [
	REDUCTION,	FORMAT
	1,			A
	2,			B
];
<script>
    document.addEventListener("DOMContentLoaded", function() {
      var lazyImages = document.querySelectorAll('.lazy-load');

      var options = {
        root: null,
        rootMargin: '0px',
        threshold: 0.5 // Adjust the threshold as needed
      };

      var observer = new IntersectionObserver(function(entries, observer) {
        entries.forEach(function(entry) {
          if (entry.isIntersecting) {
            var lazyImage = entry.target;
            lazyImage.src = lazyImage.getAttribute('src');
            lazyImage.classList.add('loaded');
            observer.unobserve(lazyImage); // Stop observing once the image is loaded
          }
        });
      }, options);

      lazyImages.forEach(function(img) {
        observer.observe(img);
      });
    });
  </script>
star

Sat Feb 03 2024 15:10:39 GMT+0000 (Coordinated Universal Time) https://wpinsideblog.com/woocommerce/podkategorii-arxiv/comment-page-2/#comments

@markyuri

star

Fri Feb 02 2024 17:46:16 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=NflzVqndxW4&t=172s

@darshcode #excel

star

Fri Feb 02 2024 14:07:43 GMT+0000 (Coordinated Universal Time) https://codepen.io/pen/

@hyperlinc #undefined

star

Fri Feb 02 2024 14:04:32 GMT+0000 (Coordinated Universal Time) https://codepen.io/pen/

@hyperlinc #undefined

star

Fri Feb 02 2024 13:15:11 GMT+0000 (Coordinated Universal Time) https://filetransfer.io/data-package/FoEYUA55#link

@Jevin2090

star

Fri Feb 02 2024 12:44:18 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/c/67442e8f-2540-469e-a8fa-9fdb4a1e2ee3

@Ashutosh56

star

Fri Feb 02 2024 10:44:47 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Fri Feb 02 2024 08:48:02 GMT+0000 (Coordinated Universal Time) https://www.objgen.com/json/local/design

@Kamalesh_Code

star

Fri Feb 02 2024 05:47:08 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Fri Feb 02 2024 05:47:08 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 22:43:53 GMT+0000 (Coordinated Universal Time)

@RahmanM

star

Thu Feb 01 2024 17:35:58 GMT+0000 (Coordinated Universal Time) https://stasonmars.ru/javascript/polnoe-ponimanie-syncronnogo-i-asyncronnogo-javascript-s-async-await/

@kaipaeff

star

Thu Feb 01 2024 14:52:16 GMT+0000 (Coordinated Universal Time)

@Shira

star

Thu Feb 01 2024 13:54:58 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 13:54:28 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 13:54:27 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 13:36:24 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 12:12:18 GMT+0000 (Coordinated Universal Time)

@madeinnature

star

Wed Jan 31 2024 22:54:45 GMT+0000 (Coordinated Universal Time)

@davidmchale #css #full-width #breakout

star

Wed Jan 31 2024 22:53:51 GMT+0000 (Coordinated Universal Time)

@davidmchale #css #height #animate

star

Wed Jan 31 2024 20:02:32 GMT+0000 (Coordinated Universal Time) https://app.unbounce.com/5593455/global_scripts/046bfc8e-1b1d-415c-ad4d-36da4799d284

@JimmyM #undefined

star

Wed Jan 31 2024 19:54:47 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:50:47 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:50:21 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:49:52 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:43:56 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:29:42 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 31 2024 19:27:42 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 31 2024 18:12:27 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Wed Jan 31 2024 17:26:50 GMT+0000 (Coordinated Universal Time)

@ibukun

star

Wed Jan 31 2024 17:08:51 GMT+0000 (Coordinated Universal Time) https://ollama.ai/download/linux

@krymnlz #none

star

Wed Jan 31 2024 17:07:05 GMT+0000 (Coordinated Universal Time)

@ibukun

star

Wed Jan 31 2024 15:15:55 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Wed Jan 31 2024 15:14:41 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Wed Jan 31 2024 14:09:25 GMT+0000 (Coordinated Universal Time)

@madeinnature

star

Wed Jan 31 2024 13:03:08 GMT+0000 (Coordinated Universal Time) https://tagassistant.google.com/

@jennymohrstade #javascript

star

Wed Jan 31 2024 12:02:29 GMT+0000 (Coordinated Universal Time)

@madeinnature

star

Wed Jan 31 2024 11:46:26 GMT+0000 (Coordinated Universal Time)

@madeinnature

star

Wed Jan 31 2024 11:38:19 GMT+0000 (Coordinated Universal Time) https://www.fuget.org/packages/Cashapp-hack-unlimited-money-adder-hack-software/1.0.0

@ElfCookie85

star

Wed Jan 31 2024 11:33:10 GMT+0000 (Coordinated Universal Time)

@Hritujeet

star

Wed Jan 31 2024 11:17:56 GMT+0000 (Coordinated Universal Time) https://dhghomon.github.io/easy_rust/Chapter_7.html

@CrazDragon

star

Wed Jan 31 2024 11:16:22 GMT+0000 (Coordinated Universal Time) https://dhghomon.github.io/easy_rust/Chapter_7.html

@CrazDragon

star

Wed Jan 31 2024 10:25:27 GMT+0000 (Coordinated Universal Time)

@Hritujeet

star

Wed Jan 31 2024 10:03:45 GMT+0000 (Coordinated Universal Time)

@lafcha #c#

star

Wed Jan 31 2024 07:14:56 GMT+0000 (Coordinated Universal Time)

@Zohaib77 #html #css #javascript

star

Tue Jan 30 2024 18:49:47 GMT+0000 (Coordinated Universal Time)

@diptish

star

Tue Jan 30 2024 13:18:06 GMT+0000 (Coordinated Universal Time)

@animalpeace

star

Tue Jan 30 2024 12:43:17 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/shorts/ytHHIKxMep0

@abcabcabc

star

Tue Jan 30 2024 12:41:48 GMT+0000 (Coordinated Universal Time)

@matiasgalvan92

star

Tue Jan 30 2024 11:09:59 GMT+0000 (Coordinated Universal Time) https://www.myhomeconstructions.com/wp-admin/admin.php?page

@sandeepv

Save snippets that work with our extensions

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