Snippets Collections
////////////////**** FILTER FUNCTION*****///////////////////
const MyNum = [1,2,3,4,5,6,7,8,9,10]
   
   
   
const  mynums = MyNum
                .map((num) => num  * 10)
                .map((num) => num  + 1)
                .filter((num) => num  >= 40)
                
console.log(mynums);
                
//////// reduce function ///////////////////////
                
const NUM = [1, 2, 3, 4];
const mytotal = NUM.reduce(function (acc, currval) {
    console.log(`acc: ${acc} and currval: ${currval}`);
    return acc + currval;
}, 0); // zero is the acc's initial value
console.log(mytotal);

const mytot = NUM.reduce((acc, curr) => acc+curr, 0 )
console.log(mytot);

const shoppingCart = [
    {
        itemName: "js course",
        price: 2999
    },
    {
        itemName: "py course",
        price: 999
    },
    {
        itemName: "mobile dev course",
        price: 5999
    },
    {
        itemName: "data science course",
        price: 12999
    },
]

const priceToPay = shoppingCart.reduce((acc, item) => acc + item.price, 0)

console.log(priceToPay);
    $cnpp = cnplanpriceTable::getOneByPlan('A_PP_FREE1');

    $ads = cnadTable::getInstance()
      ->createQuery()
      ->andWhere('userid = ?', 1107924)
      ->andWhere('hw_pay_plan LIKE ?', '%A_PA_FREE1%')
      ->execute([], Doctrine::HYDRATE_ON_DEMAND);
    $this->log('Found ' . count($ads) . ' ads');

    foreach ( $ads as $cnad )
    {
      $cnad->setPlan($cnpp);
      $cnad->save();

      $cnexp = cnexpirationTable::getItem($cnad, 'ad_plan');
      $cnexp->setValue('A_PP_FREE1');
      $cnexp->save();
      $this->log('Processed ' . $cnad->getLinkId());
    }
const getWeekOfYear = (date: Date): number => {
  const startOfYear = new Date(date.getFullYear(), 0, 1);
  const days = Math.floor(
    (date.getTime() - startOfYear.getTime()) / (24 * 60 * 60 * 1000)
  );
  return Math.ceil((days + startOfYear.getDay() + 1) / 7);
};
///////////***********FILTER , MAP AND REDUCE ********////////////

 const coding = ["js", "ruby", "java", "python", "cpp"]


 const values = coding.forEach( (item) => {
   console.log(item);
     return item
 } )

 console.log(values);

/////////////////*********** FILTER FUNCTION **********************////////////
const myNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

// const newNums = myNums.filter( (num) => {
//  return num > 4
// } )

const newNums = []

 myNums.forEach( (num) => {
     if (num > 4) {
         newNums.push(num)
    }
 } )

console.log(newNums);


const books = [
    { title: 'Book One', genre: 'Fiction', publish: 1981, edition: 2004 },
    { title: 'Book Two', genre: 'Non-Fiction', publish: 1992, edition: 2008 },
    { title: 'Book Three', genre: 'History', publish: 1999, edition: 2007 },
    { title: 'Book Four', genre: 'Non-Fiction', publish: 1989, edition: 2010 },
    { title: 'Book Five', genre: 'Science', publish: 2009, edition: 2014 },
    { title: 'Book Six', genre: 'Fiction', publish: 1987, edition: 2010 },
    { title: 'Book Seven', genre: 'History', publish: 1986, edition: 1996 },
    { title: 'Book Eight', genre: 'Science', publish: 2011, edition: 2016 },
    { title: 'Book Nine', genre: 'Non-Fiction', publish: 1981, edition: 1989 },
  ];

  let userBooks  = books.filter( (bk) => bk.genre === 'History')
  console.log(userBooks);
  
  userBook = books.filter( (bk) => { 
    return bk.publish >= 1995 && bk.genre === "History"
})
  console.log(userBook);
#include <iostream>

int main() {
    int a, b, f1=0, f2=1, i;

    std::cout << "Введите число a: ";
    std::cin >> a;
    
    std::cout << "Введите число b: ";
    std::cin >> b;
    
    for(i = a; i <= b; i++)
        std::cout << i << " " ;
        
    std::cout << std::endl;    
    
    if( a == 0 )
        std::cout << 0 << " " ;
        
    while( f2 <= b ){
        if( f2 >= a )
            std::cout << f2 << " " ;
        i = f2;
        f2 = f1 + f2;
        f1 = i;
        }    
        
    return 0;
}
if (!function_exists('media_sideload_image')) {
    require_once(ABSPATH . 'wp-admin/includes/image.php');
    require_once(ABSPATH . 'wp-admin/includes/file.php');
    require_once(ABSPATH . 'wp-admin/includes/media.php');
}


add_action('gform_after_submission_2', 'create_gallery_post_after_submission', 10, 2);
function create_gallery_post_after_submission($entry, $form) {
    // Include necessary functions for media handling
    if (!function_exists('media_sideload_image')) {
        require_once(ABSPATH . 'wp-admin/includes/image.php');
        require_once(ABSPATH . 'wp-admin/includes/file.php');
        require_once(ABSPATH . 'wp-admin/includes/media.php');
    }

    // Define your custom post type
    $post_type = 'gallery';

    // Prepare post data
    $post_data = array(
        'post_title'   => rgar($entry, '5'), // Assuming field ID 5 is the title
        'post_content' => '', // Assuming field ID 2 is the content
        'post_status'  => 'publish',
        'post_type'    => $post_type,
    );

    // Insert the post into the database
    $post_id = wp_insert_post($post_data);

    // Get the image URLs from entry
    $image_urls = json_decode(rgar($entry, '1')); // Assuming field ID 1 contains the JSON array string
    $image_ids = array(); // Array to hold the IDs of uploaded images

    // Loop through each image URL
    if (is_array($image_urls)) {
        foreach ($image_urls as $image_url) {
            // Upload the image to the Media Library
            $image_id = media_sideload_image($image_url, $post_id, null, 'id');
            if (!is_wp_error($image_id)) {
                $image_ids[] = $image_id; // Collect the image ID
            }
        }
    }

    // Optionally, you can set post meta for the uploaded images
    if (!empty($image_ids)) {
        update_post_meta($post_id, 'gallery_images', $image_ids); // Store the array of image IDs
    }
}


add_filter('woocommerce_get_breadcrumb', 'precise_custom_woocommerce_breadcrumbs', 20, 2);
function precise_custom_woocommerce_breadcrumbs($crumbs, $breadcrumb) {
    // הסרת עמוד הבית
    if (isset($crumbs[0]) && $crumbs[0][0] == get_bloginfo('name')) {
        array_shift($crumbs);
    }

    // אם אנחנו בעמוד מוצר
    if (is_product()) {
        $product = wc_get_product();
        $product_categories = get_the_terms($product->get_id(), 'product_cat');
       
        if ($product_categories) {
            // מציאת הקטגוריה העמוקה ביותר
            $deepest_category = null;
            foreach ($product_categories as $category) {
                if (!$deepest_category || count(get_ancestors($category->term_id, 'product_cat')) >
                    count(get_ancestors($deepest_category->term_id, 'product_cat'))) {
                    $deepest_category = $category;
                }
            }

            if ($deepest_category) {
                // הכנת מערך חדש של פירורי לחם
                $new_crumbs = [];
               
                // קבלת ההורים של הקטגוריה
                $term_parents = get_ancestors($deepest_category->term_id, 'product_cat');
                $term_parents = array_reverse($term_parents);

                // הוספת ההורים
                foreach ($term_parents as $parent_id) {
                    $parent_term = get_term($parent_id, 'product_cat');
                    $new_crumbs[] = [$parent_term->name, get_term_link($parent_term)];
                }

                // הוספת הקטגוריה העמוקה ביותר
                $new_crumbs[] = [$deepest_category->name, get_term_link($deepest_category)];

                // הוספת שם המוצר
                $new_crumbs[] = [$product->get_name(), get_permalink($product)];

                // החלפת הפירורי לחם המקוריים
                $crumbs = $new_crumbs;
            }
        }
    }

    // אם אנחנו בדף קטגוריה
    if (is_product_category()) {
        $current_category = get_queried_object();
        $ancestors = get_ancestors($current_category->term_id, 'product_cat');
        $ancestors = array_reverse($ancestors);

        // הכנת מערך חדש של פירורי לחם
        $new_crumbs = [];

        // הוספת ההורים
        foreach ($ancestors as $ancestor_id) {
            $ancestor_term = get_term($ancestor_id, 'product_cat');
            $new_crumbs[] = [$ancestor_term->name, get_term_link($ancestor_term)];
        }

        // הוספת הקטגוריה הנוכחית
        $new_crumbs[] = [$current_category->name, get_term_link($current_category)];

        // החלפת הפירורי לחם המקוריים
        $crumbs = $new_crumbs;
    }

    return $crumbs;
// import React, { useRef, useState, useEffect } from 'react'
// import { HotTable } from '@handsontable/react'
// import 'handsontable/dist/handsontable.full.min.css'
// import Handsontable from 'handsontable'
// import {
//   registerControl,
//   RegisterControlProps,
//   RegisteredControlProperties,
// } from '../hoc/registerControl'
// import { CustomContentRenderer } from './utils/customButtonRenderer'
// import { hyperformulaInstance, sheetId } from './utils/hyperformulaConfig'
// import { reformatDate, reformatCurrency } from './utils/formatters'
// import { SpreadsheetProperties } from '@components/features/FormBuilder/FormBuilderFieldProperties/Spreadsheet/types'
// import { registerAllCellTypes } from 'handsontable/cellTypes'
// import { registerAllPlugins } from 'handsontable/plugins'
// import { useFormBuilderWorksheetGrid } from '../../hooks/useFormBuilderWorksheetGrid'
// import { createSpreadsheetDefaultValue } from '../../FormBuilderFieldProperties/Spreadsheet/constants'
// import { useFormBuilder } from '../../hooks/useFormBuilder'
// import { useFormService } from '../../hooks/useFormService'

// registerAllCellTypes()
// registerAllPlugins()

// type Properties = RegisteredControlProperties &
//   SpreadsheetProperties & {
//     externalVariables?: {
//       [key: string]: {
//         propertyName?: string
//         defaultValue?: number
//       }
//     }
//   }

// const SpreadsheetControl: React.FC<RegisterControlProps<Properties>> = (
//   props
// ) => {
//   const hotTableRef = useRef<any>(null)
//   const containerRef = useRef<HTMLDivElement>(null)

//   const { rows = 1, columns = 1 } = props.properties || {}

//   const DEFAULT_COLUMN_WIDTH = 100
//   const DEFAULT_ROW_HEIGHT = 25

//   const defaultMeta = {
//     data: createSpreadsheetDefaultValue(rows, columns),
//     cellFormats: {} as { [key: string]: 'date' | 'currency' | undefined },
//     mergeCellsConfig: [],
//   }

//   const meta = props.properties?.meta || defaultMeta
//   const { actions: formBuilderWorksheetActions } = useFormBuilderWorksheetGrid()
//   const { actions, data: formBuilderData } = useFormBuilder()
//   const { watch } = useFormService()
//   const formData = watch()

//   if (!actions || !actions.getAllFields) {
//   }

//   const [data, setData] = useState(() => JSON.parse(JSON.stringify(meta.data)))
//   const [cellFormats, setCellFormats] = useState(meta.cellFormats)
//   const [mergeCellsConfig, setMergeCellsConfig] = useState(
//     meta.mergeCellsConfig
//   )

//   useEffect(() => {
//     if (formBuilderData?.fields) {
//       const existingExpressions = hyperformulaInstance.listNamedExpressions()

//       formBuilderData.fields.forEach((field) => {
//         const propertyName = field.properties?.propertyName
//         const defaultValue = Number(field.properties?.defaultValue || 0)

//         if (propertyName) {
//           if (!existingExpressions.includes(propertyName)) {
//             hyperformulaInstance.addNamedExpression(propertyName, defaultValue)
//           } else {
//             hyperformulaInstance.changeNamedExpression(
//               propertyName,
//               defaultValue
//             )
//           }
//         }
//       })

//       hyperformulaInstance.rebuildAndRecalculate()
//     }
//   }, [formBuilderData])

//   useEffect(() => {
//     if (props.externalVariables) {
//       const existingExpressions = new Set(
//         hyperformulaInstance.listNamedExpressions()
//       )

//       Object.entries(props.externalVariables).forEach(([key, property]) => {
//         const typedProperty = property as {
//           propertyName?: string
//           defaultValue?: number
//         }

//         const variableName = typedProperty.propertyName || key
//         const value = Number(typedProperty.defaultValue || 0)

//         if (!existingExpressions.has(variableName)) {
//           try {
//             hyperformulaInstance.addNamedExpression(
//               variableName,
//               value,
//               sheetId
//             )
//             existingExpressions.add(variableName)
//           } catch (error) {
//             console.error(
//               `Error adding named expression ${variableName}:`,
//               error
//             )
//           }
//         } else {
//           try {
//             hyperformulaInstance.changeNamedExpression(
//               variableName,
//               value,
//               sheetId
//             )
//           } catch (error) {
//             console.error(
//               `Error updating named expression ${variableName}:`,
//               error
//             )
//           }
//         }
//       })

//       try {
//         hyperformulaInstance.rebuildAndRecalculate()
//       } catch (error) {
//         console.error(
//           'Error during HyperFormula rebuild and recalculation:',
//           error
//         )
//       }
//     }
//   }, [props.externalVariables])

//   useEffect(() => {
//     if (formBuilderData) {
//       const existingExpressions = hyperformulaInstance.listNamedExpressions()

//       Object.entries(formBuilderData).forEach(([key, value]) => {
//         const numericValue = Number(value) || 0

//         if (!existingExpressions.includes(key)) {
//           hyperformulaInstance.addNamedExpression(key, numericValue)
//         } else {
//           hyperformulaInstance.changeNamedExpression(key, numericValue)
//         }
//       })

//       hyperformulaInstance.rebuildAndRecalculate()
//     }
//   }, [formBuilderData])

//   useEffect(() => {
//     if (formBuilderData?.fields) {
//       const existingExpressions = new Set(
//         hyperformulaInstance.listNamedExpressions()
//       )

//       formBuilderData.fields.forEach((field) => {
//         const propertyName = field.properties?.propertyName
//         const defaultValue = Number(field.properties?.defaultValue || 0)

//         if (propertyName && !existingExpressions.has(propertyName)) {
//           try {
//             hyperformulaInstance.addNamedExpression(propertyName, defaultValue)
//             existingExpressions.add(propertyName)
//           } catch (error) {
//             console.error(
//               `Error adding named expression for ${propertyName}: ${error}`
//             )
//           }
//         } else if (propertyName) {
//           try {
//             hyperformulaInstance.changeNamedExpression(
//               propertyName,
//               defaultValue
//             )
//           } catch (error) {
//             console.error(
//               `Error updating named expression for ${propertyName}: ${error}`
//             )
//           }
//         }
//       })

//       try {
//         hyperformulaInstance.rebuildAndRecalculate()
//       } catch (error) {
//         console.error(
//           'Error during HyperFormula rebuild and recalculation:',
//           error
//         )
//       }
//     }
//   }, [formBuilderData?.fields])

//   useEffect(() => {
//     if (formData && Object.keys(formData).length > 0) {
//       const existingExpressions = hyperformulaInstance.listNamedExpressions()

//       Object.entries(formData).forEach(([key, value]) => {
//         if (!existingExpressions.includes(key)) {
//           hyperformulaInstance.addNamedExpression(key, Number(value) || 0)
//         } else {
//           hyperformulaInstance.changeNamedExpression(key, Number(value) || 0)
//         }
//       })

//       try {
//         hyperformulaInstance.rebuildAndRecalculate()
//       } catch (error) {}
//     }
//   }, [formData])

//   useEffect(() => {
//     const adjustedData = adjustDataDimensions(data, rows, columns)
//     if (JSON.stringify(data) !== JSON.stringify(adjustedData)) {
//       setData(adjustedData)
//     }
//   }, [rows, columns])

//   const adjustDataDimensions = (
//     currentData: any[][],
//     rows: number,
//     columns: number
//   ) => {
//     const newData = currentData.map((row) => [...row])
//     if (newData.length < rows) {
//       for (let i = newData.length; i < rows; i++) {
//         newData.push(Array(columns).fill(null))
//       }
//     } else if (newData.length > rows) {
//       newData.length = rows
//     }
//     newData.forEach((row) => {
//       if (row.length < columns) {
//         row.push(...Array(columns - row.length).fill(null))
//       } else if (row.length > columns) {
//         row.length = columns
//       }
//     })
//     return newData
//   }

//   const handleAfterChange = (changes: any, source: string) => {
//     if (!changes || source === 'loadData') return

//     const validSheetId = sheetId ?? 0

//     changes.forEach(([row, col, oldValue, newValue]: any) => {
//       if (
//         newValue &&
//         typeof newValue === 'string' &&
//         newValue.startsWith('=')
//       ) {
//         try {
//           hyperformulaInstance.setCellContents(
//             { sheet: validSheetId, row, col },
//             [[newValue]]
//           )
//         } catch (error) {
//           console.error('Error setting formula:', error)
//         }
//       }
//     })

//     const updatedData = hotTableRef.current?.hotInstance?.getData()
//     if (JSON.stringify(data) !== JSON.stringify(updatedData)) {
//       setData(updatedData)
//       updateFieldProperties({ data: updatedData })
//     }
//   }

//   const handleMergeCells = () => {
//     const hotInstance = hotTableRef.current?.hotInstance
//     const selected = hotInstance?.getSelected()
//     if (selected) {
//       const [startRow, startCol, endRow, endCol] = selected[0]
//       const newMerge = {
//         row: startRow,
//         col: startCol,
//         rowspan: endRow - startRow + 1,
//         colspan: endCol - startCol + 1,
//       }

//       const updatedMergeCellsConfig = [...mergeCellsConfig, newMerge]
//       hotInstance.updateSettings({ mergeCells: updatedMergeCellsConfig })
//       setMergeCellsConfig(updatedMergeCellsConfig)

//       updateFieldProperties({
//         data,
//         cellFormats,
//         mergeCellsConfig: updatedMergeCellsConfig,
//       })
//     }
//   }

//   const handleUnmergeCells = () => {
//     const hotInstance = hotTableRef.current?.hotInstance
//     const selected = hotInstance?.getSelected()
//     if (selected) {
//       const [startRow, startCol] = selected[0]
//       const mergeCellsPlugin = hotInstance.getPlugin('mergeCells')
//       mergeCellsPlugin.unmerge(startRow, startCol)

//       const updatedMergeCellsConfig = mergeCellsConfig.filter(
//         (cell) => cell.row !== startRow || cell.col !== startCol
//       )
//       hotInstance.updateSettings({ mergeCells: updatedMergeCellsConfig })
//       setMergeCellsConfig(updatedMergeCellsConfig)

//       updateFieldProperties({
//         data,
//         cellFormats,
//         mergeCellsConfig: updatedMergeCellsConfig,
//       })
//     }
//   }

//   const handleSetAsDate = () => {
//     const selected = hotTableRef.current?.hotInstance.getSelected()
//     if (selected) {
//       const [row, col] = selected[0]
//       const newFormats = { ...cellFormats, [`${row}-${col}`]: 'date' as const }
//       setCellFormats(newFormats)
//       updateFieldProperties({ data, cellFormats: newFormats, mergeCellsConfig })
//     }
//   }

//   const handleSetAsCurrency = () => {
//     const selected = hotTableRef.current?.hotInstance.getSelected()
//     if (selected) {
//       const [row, col] = selected[0]
//       const newFormats = {
//         ...cellFormats,
//         [`${row}-${col}`]: 'currency' as const,
//       }
//       setCellFormats(newFormats)
//       updateFieldProperties({ data, cellFormats: newFormats, mergeCellsConfig })
//     }
//   }

//   const updateFieldProperties = (
//     updatedMeta: Partial<SpreadsheetProperties['meta']>
//   ) => {
//     if (!props?.runtime) {
//       const safeData = data ?? []

//       formBuilderWorksheetActions?.setFieldConfigProperty(props.config?.id!, {
//         meta: {
//           data: [...safeData.map((row: any) => (row ? [...row] : []))],
//           cellFormats: { ...cellFormats },
//           mergeCellsConfig: [...mergeCellsConfig],
//           ...updatedMeta,
//         },
//       } as Properties)
//     }
//   }

//   const cellsHandler = (row: number, col: number) => {
//     const cellProperties = {} as Handsontable.CellProperties
//     cellProperties.width = DEFAULT_COLUMN_WIDTH
//     cellProperties.height = DEFAULT_ROW_HEIGHT

//     // Check if the cell format exists, or default to undefined
//     const format = cellFormats?.[`${row}-${col}`]

//     if (format === 'date') {
//       cellProperties.renderer = (
//         instance,
//         td,
//         row,
//         col,
//         prop,
//         value,
//         cellProperties
//       ) =>
//         CustomContentRenderer(instance, td, row, col, () => {
//           const span = document.createElement('span')
//           span.innerText = reformatDate(
//             instance.getDataAtCell(row, col) as string
//           )
//           return span
//         })
//     } else if (format === 'currency') {
//       cellProperties.renderer = (
//         instance,
//         td,
//         row,
//         col,
//         prop,
//         value,
//         cellProperties
//       ) =>
//         CustomContentRenderer(instance, td, row, col, () => {
//           const span = document.createElement('span')
//           span.innerText = reformatCurrency(
//             instance.getDataAtCell(row, col) as string
//           )
//           return span
//         })
//     }

//     return cellProperties
//   }

//   return (
//     <div
//       ref={containerRef}
//       className="h-[400px] w-1/2 resize-x overflow-auto border md:w-full"
//       style={{ minWidth: '50%', maxWidth: '100%', resize: 'horizontal' }}
//       onMouseDown={(e) => e.stopPropagation()}
//     >
//       <HotTable
//         id="mySpreadsheet"
//         data={data}
//         colHeaders={true}
//         rowHeaders={true}
//         width="100%"
//         height="100%"
//         selectionMode="multiple"
//         copyPaste={true}
//         contextMenu={{
//           items: {
//             row_above: {},
//             row_below: {},
//             col_left: {},
//             col_right: {},
//             remove_row: {},
//             remove_col: {},
//             clear_column: {},
//             mergeCells: { name: 'Merge Cells', callback: handleMergeCells },
//             unmergeCells: {
//               name: 'Unmerge Cells',
//               callback: handleUnmergeCells,
//             },
//             set_as_date: { name: 'Set as Date', callback: handleSetAsDate },
//             set_as_currency: {
//               name: 'Set as Currency',
//               callback: handleSetAsCurrency,
//             },
//           },
//         }}
//         ref={hotTableRef}
//         afterChange={handleAfterChange}
//         persistentState={true}
//         licenseKey="non-commercial-and-evaluation"
//         manualColumnResize={false}
//         manualRowResize={false}
//         autoColumnSize={false}
//         autoRowSize={false}
//         stretchH="all"
//         mergeCells={mergeCellsConfig}
//         formulas={{ engine: hyperformulaInstance }}
//         cells={cellsHandler}
//         colWidths={DEFAULT_COLUMN_WIDTH}
//         rowHeights={DEFAULT_ROW_HEIGHT}
//       />
//     </div>
//   )
// }

// export default registerControl<Properties>(SpreadsheetControl, {
//   noDisplayLabel: true,
// })

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// import React, { useRef, useState, useEffect } from 'react'
// import { HotTable } from '@handsontable/react'
// import 'handsontable/dist/handsontable.full.min.css'
// import Handsontable from 'handsontable'
// import {
//   registerControl,
//   RegisterControlProps,
//   RegisteredControlProperties,
// } from '../hoc/registerControl'
// import { CustomContentRenderer } from './utils/customButtonRenderer'
// import { hyperformulaInstance, sheetId } from './utils/hyperformulaConfig'
// import { reformatDate, reformatCurrency } from './utils/formatters'
// import { SpreadsheetProperties } from '@components/features/FormBuilder/FormBuilderFieldProperties/Spreadsheet/types'
// import { registerAllCellTypes } from 'handsontable/cellTypes'
// import { registerAllPlugins } from 'handsontable/plugins'
// import { useFormBuilderWorksheetGrid } from '../../hooks/useFormBuilderWorksheetGrid'
// import { createSpreadsheetDefaultValue } from '../../FormBuilderFieldProperties/Spreadsheet/constants'
// import { useFormBuilder } from '../../hooks/useFormBuilder'
// import { useFormService } from '../../hooks/useFormService'

// registerAllCellTypes()
// registerAllPlugins()

// type Properties = RegisteredControlProperties &
//   SpreadsheetProperties & {
//     externalVariables?: {
//       [key: string]: {
//         propertyName?: string
//         defaultValue?: number
//       }
//     }
//   }

// const SpreadsheetControl: React.FC<RegisterControlProps<Properties>> = (
//   props
// ) => {
//   const hotTableRef = useRef<any>(null)
//   const containerRef = useRef<HTMLDivElement>(null)

//   const { rows = 1, columns = 1 } = props.properties || {}

//   const DEFAULT_COLUMN_WIDTH = 100
//   const DEFAULT_ROW_HEIGHT = 25

//   const defaultMeta = {
//     data: createSpreadsheetDefaultValue(rows, columns),
//     cellFormats: {} as { [key: string]: 'date' | 'currency' | undefined },
//     mergeCellsConfig: [],
//   }

//   const meta = props.properties?.meta || defaultMeta
//   const { actions: formBuilderWorksheetActions } = useFormBuilderWorksheetGrid()
//   const { actions, data: formBuilderData } = useFormBuilder()
//   const { watch } = useFormService()
//   const formData = watch()

//   if (!actions || !actions.getAllFields) {
//   }

//   const [data, setData] = useState(() => JSON.parse(JSON.stringify(meta.data)))
//   const [cellFormats, setCellFormats] = useState(meta.cellFormats)
//   const [mergeCellsConfig, setMergeCellsConfig] = useState(
//     meta.mergeCellsConfig
//   )

//   useEffect(() => {
//     console.log('Initializing meta from props:', props.properties?.meta)
//     const initialMeta = props.properties?.meta || defaultMeta
//     setData(JSON.parse(JSON.stringify(initialMeta.data)))
//     setCellFormats(initialMeta.cellFormats)
//     setMergeCellsConfig(initialMeta.mergeCellsConfig)
//   }, [props.properties?.meta])

//   useEffect(() => {
//     console.log('Data updated:', data)
//   }, [data])

//   useEffect(() => {
//     console.log('Cell formats updated:', cellFormats)
//   }, [cellFormats])

//   useEffect(() => {
//     console.log('Merge cells configuration updated:', mergeCellsConfig)
//   }, [mergeCellsConfig])

//   useEffect(() => {
//     if (formBuilderData?.fields) {
//       const existingExpressions = hyperformulaInstance.listNamedExpressions()

//       formBuilderData.fields.forEach((field) => {
//         const propertyName = field.properties?.propertyName
//         const defaultValue = Number(field.properties?.defaultValue || 0)

//         if (propertyName) {
//           if (!existingExpressions.includes(propertyName)) {
//             hyperformulaInstance.addNamedExpression(propertyName, defaultValue)
//           } else {
//             hyperformulaInstance.changeNamedExpression(
//               propertyName,
//               defaultValue
//             )
//           }
//         }
//       })

//       hyperformulaInstance.rebuildAndRecalculate()
//     }
//   }, [formBuilderData])

//   useEffect(() => {
//     if (props.externalVariables) {
//       const existingExpressions = new Set(
//         hyperformulaInstance.listNamedExpressions()
//       )

//       Object.entries(props.externalVariables).forEach(([key, variable]) => {
//         const typedVariable = variable as {
//           propertyName?: string
//           defaultValue?: number
//         }

//         const variableName = typedVariable.propertyName || key
//         const value = Number(typedVariable.defaultValue || 0)

//         if (!existingExpressions.has(variableName)) {
//           hyperformulaInstance.addNamedExpression(variableName, value, sheetId)
//         } else {
//           hyperformulaInstance.changeNamedExpression(
//             variableName,
//             value,
//             sheetId
//           )
//         }
//       })

//       hyperformulaInstance.rebuildAndRecalculate()
//       syncSpreadsheetWithEngine()
//     }
//   }, [props.externalVariables])

//   useEffect(() => {
//     if (formBuilderData) {
//       const existingExpressions = hyperformulaInstance.listNamedExpressions()

//       Object.entries(formBuilderData).forEach(([key, value]) => {
//         const numericValue = Number(value) || 0

//         if (!existingExpressions.includes(key)) {
//           hyperformulaInstance.addNamedExpression(key, numericValue)
//         } else {
//           hyperformulaInstance.changeNamedExpression(key, numericValue)
//         }
//       })

//       hyperformulaInstance.rebuildAndRecalculate()
//     }
//   }, [formBuilderData])

//   useEffect(() => {
//     if (formBuilderData?.fields) {
//       const existingExpressions = new Set(
//         hyperformulaInstance.listNamedExpressions()
//       )

//       formBuilderData.fields.forEach((field) => {
//         const propertyName = field.properties?.propertyName
//         const defaultValue = Number(field.properties?.defaultValue || 0)

//         if (propertyName && !existingExpressions.has(propertyName)) {
//           try {
//             hyperformulaInstance.addNamedExpression(propertyName, defaultValue)
//             existingExpressions.add(propertyName)
//           } catch (error) {
//             console.error(
//               `Error adding named expression for ${propertyName}: ${error}`
//             )
//           }
//         } else if (propertyName) {
//           try {
//             hyperformulaInstance.changeNamedExpression(
//               propertyName,
//               defaultValue
//             )
//           } catch (error) {
//             console.error(
//               `Error updating named expression for ${propertyName}: ${error}`
//             )
//           }
//         }
//       })

//       try {
//         hyperformulaInstance.rebuildAndRecalculate()
//       } catch (error) {
//         console.error(
//           'Error during HyperFormula rebuild and recalculation:',
//           error
//         )
//       }
//     }
//   }, [formBuilderData?.fields])

//   useEffect(() => {
//     if (formData && Object.keys(formData).length > 0) {
//       const existingExpressions = hyperformulaInstance.listNamedExpressions()

//       Object.entries(formData).forEach(([key, value]) => {
//         if (!existingExpressions.includes(key)) {
//           hyperformulaInstance.addNamedExpression(key, Number(value) || 0)
//         } else {
//           hyperformulaInstance.changeNamedExpression(key, Number(value) || 0)
//         }
//       })

//       try {
//         hyperformulaInstance.rebuildAndRecalculate()
//       } catch (error) {}
//     }
//   }, [formData])

//   useEffect(() => {
//     const adjustedData = adjustDataDimensions(data, rows, columns)
//     if (JSON.stringify(data) !== JSON.stringify(adjustedData)) {
//       setData(adjustedData)
//       updateFieldProperties({ data: adjustedData })
//     }
//   }, [rows, columns])

//   const adjustDataDimensions = (
//     currentData: any[][],
//     rows: number,
//     columns: number
//   ) => {
//     const newData = currentData.map((row) => [...row])
//     if (newData.length < rows) {
//       for (let i = newData.length; i < rows; i++) {
//         newData.push(Array(columns).fill(null))
//       }
//     } else if (newData.length > rows) {
//       newData.length = rows
//     }
//     newData.forEach((row) => {
//       if (row.length < columns) {
//         row.push(...Array(columns - row.length).fill(null))
//       } else if (row.length > columns) {
//         row.length = columns
//       }
//     })
//     return newData
//   }
//   const syncSpreadsheetWithEngine = () => {
//     if (hotTableRef.current?.hotInstance) {
//       const updatedData = hyperformulaInstance.getSheetValues(sheetId)
//       console.log('Syncing spreadsheet with engine. Updated Data:', updatedData)
//       hotTableRef.current.hotInstance.loadData(updatedData)
//     }
//   }

//   const handleAfterChange = (changes: any, source: string) => {
//     console.log('After Change Triggered. Source:', source)
//     console.log('Changes:', changes)

//     if (!changes || source === 'loadData') return

//     const validSheetId = sheetId ?? 0

//     changes.forEach(([row, col, oldValue, newValue]: any) => {
//       console.log(
//         `Updating cell [${row}, ${col}] from ${oldValue} to ${newValue}`
//       )
//       if (
//         newValue &&
//         typeof newValue === 'string' &&
//         newValue.startsWith('=')
//       ) {
//         hyperformulaInstance.setCellContents(
//           { sheet: validSheetId, row, col },
//           [[newValue]]
//         )
//       } else {
//         hyperformulaInstance.setCellContents(
//           { sheet: validSheetId, row, col },
//           [[newValue || null]]
//         )
//       }
//     })

//     // Recalculate and sync data
//     hyperformulaInstance.rebuildAndRecalculate()
//     console.log(
//       'Recalculated HyperFormula Instance:',
//       hyperformulaInstance.getSheetValues(sheetId)
//     )
//     syncSpreadsheetWithEngine()
//   }

//   const handleMergeCells = () => {
//     const hotInstance = hotTableRef.current?.hotInstance
//     const selected = hotInstance?.getSelected()
//     if (selected) {
//       const [startRow, startCol, endRow, endCol] = selected[0]
//       const newMerge = {
//         row: startRow,
//         col: startCol,
//         rowspan: endRow - startRow + 1,
//         colspan: endCol - startCol + 1,
//       }

//       const updatedMergeCellsConfig = [...mergeCellsConfig, newMerge]
//       hotInstance.updateSettings({ mergeCells: updatedMergeCellsConfig })
//       setMergeCellsConfig(updatedMergeCellsConfig)

//       updateFieldProperties({
//         data,
//         cellFormats,
//         mergeCellsConfig: updatedMergeCellsConfig,
//       })
//     }
//   }

//   const handleUnmergeCells = () => {
//     const hotInstance = hotTableRef.current?.hotInstance
//     const selected = hotInstance?.getSelected()
//     if (selected) {
//       const [startRow, startCol] = selected[0]
//       const mergeCellsPlugin = hotInstance.getPlugin('mergeCells')
//       mergeCellsPlugin.unmerge(startRow, startCol)

//       const updatedMergeCellsConfig = mergeCellsConfig.filter(
//         (cell) => cell.row !== startRow || cell.col !== startCol
//       )
//       hotInstance.updateSettings({ mergeCells: updatedMergeCellsConfig })
//       setMergeCellsConfig(updatedMergeCellsConfig)

//       updateFieldProperties({
//         data,
//         cellFormats,
//         mergeCellsConfig: updatedMergeCellsConfig,
//       })
//     }
//   }

//   const handleSetAsDate = () => {
//     const selected = hotTableRef.current?.hotInstance.getSelected()
//     if (selected) {
//       const [row, col] = selected[0]
//       const newFormats = { ...cellFormats, [`${row}-${col}`]: 'date' as const }
//       setCellFormats(newFormats)
//       updateFieldProperties({ data, cellFormats: newFormats, mergeCellsConfig })
//     }
//   }

//   const handleSetAsCurrency = () => {
//     const selected = hotTableRef.current?.hotInstance.getSelected()
//     if (selected) {
//       const [row, col] = selected[0]
//       const newFormats = {
//         ...cellFormats,
//         [`${row}-${col}`]: 'currency' as const,
//       }
//       setCellFormats(newFormats)
//       updateFieldProperties({ data, cellFormats: newFormats, mergeCellsConfig })
//     }
//   }
//   const updateFieldProperties = (
//     updatedMeta: Partial<SpreadsheetProperties['meta']>
//   ) => {
//     console.log('Updating field properties with meta:', updatedMeta)
//     console.log('Current data:', data)
//     if (!props.runtime) {
//       formBuilderWorksheetActions?.setFieldConfigProperty(props.config?.id!, {
//         meta: {
//           data: [...data.map((row: any) => (row ? [...row] : []))],
//           cellFormats: { ...cellFormats },
//           mergeCellsConfig: [...mergeCellsConfig],
//           ...updatedMeta,
//         },
//       } as Properties)
//     }
//   }

//   const cellsHandler = (row: number, col: number) => {
//     const cellProperties = {} as Handsontable.CellProperties
//     cellProperties.width = DEFAULT_COLUMN_WIDTH
//     cellProperties.height = DEFAULT_ROW_HEIGHT

//     // Check if the cell format exists, or default to undefined
//     const format = cellFormats?.[`${row}-${col}`]

//     if (format === 'date') {
//       cellProperties.renderer = (
//         instance,
//         td,
//         row,
//         col,
//         prop,
//         value,
//         cellProperties
//       ) =>
//         CustomContentRenderer(instance, td, row, col, () => {
//           const span = document.createElement('span')
//           span.innerText = reformatDate(
//             instance.getDataAtCell(row, col) as string
//           )
//           return span
//         })
//     } else if (format === 'currency') {
//       cellProperties.renderer = (
//         instance,
//         td,
//         row,
//         col,
//         prop,
//         value,
//         cellProperties
//       ) =>
//         CustomContentRenderer(instance, td, row, col, () => {
//           const span = document.createElement('span')
//           span.innerText = reformatCurrency(
//             instance.getDataAtCell(row, col) as string
//           )
//           return span
//         })
//     }

//     return cellProperties
//   }

//   return (
//     <div
//       ref={containerRef}
//       className="h-[400px] w-1/2 resize-x overflow-auto border md:w-full"
//       style={{ minWidth: '50%', maxWidth: '100%', resize: 'horizontal' }}
//       onMouseDown={(e) => e.stopPropagation()}
//     >
//       <HotTable
//         id="mySpreadsheet"
//         data={data}
//         colHeaders={true}
//         rowHeaders={true}
//         width="100%"
//         height="100%"
//         selectionMode="multiple"
//         copyPaste={true}
//         contextMenu={{
//           items: {
//             row_above: {},
//             row_below: {},
//             col_left: {},
//             col_right: {},
//             remove_row: {},
//             remove_col: {},
//             clear_column: {},
//             mergeCells: { name: 'Merge Cells', callback: handleMergeCells },
//             unmergeCells: {
//               name: 'Unmerge Cells',
//               callback: handleUnmergeCells,
//             },
//             set_as_date: { name: 'Set as Date', callback: handleSetAsDate },
//             set_as_currency: {
//               name: 'Set as Currency',
//               callback: handleSetAsCurrency,
//             },
//           },
//         }}
//         ref={hotTableRef}
//         afterChange={handleAfterChange}
//         persistentState={true}
//         licenseKey="non-commercial-and-evaluation"
//         manualColumnResize={false}
//         manualRowResize={false}
//         autoColumnSize={false}
//         autoRowSize={false}
//         stretchH="all"
//         mergeCells={mergeCellsConfig}
//         formulas={{ engine: hyperformulaInstance }}
//         cells={cellsHandler}
//         colWidths={DEFAULT_COLUMN_WIDTH}
//         rowHeights={DEFAULT_ROW_HEIGHT}
//       />
//     </div>
//   )
// }

// export default registerControl<Properties>(SpreadsheetControl, {
//   noDisplayLabel: true,
// })

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

import React, { useRef, useState, useEffect } from 'react'
import { HotTable } from '@handsontable/react'
import 'handsontable/dist/handsontable.full.min.css'
import Handsontable from 'handsontable'
import {
  registerControl,
  RegisterControlProps,
  RegisteredControlProperties,
} from '../hoc/registerControl'
import { CustomContentRenderer } from './utils/customButtonRenderer'
import { hyperformulaInstance, sheetId } from './utils/hyperformulaConfig'
import { reformatDate, reformatCurrency } from './utils/formatters'
import { SpreadsheetProperties } from '@components/features/FormBuilder/FormBuilderFieldProperties/Spreadsheet/types'
import { registerAllCellTypes } from 'handsontable/cellTypes'
import { registerAllPlugins } from 'handsontable/plugins'
import { useFormBuilderWorksheetGrid } from '../../hooks/useFormBuilderWorksheetGrid'
import { createSpreadsheetDefaultValue } from '../../FormBuilderFieldProperties/Spreadsheet/constants'
import { useFormBuilder } from '../../hooks/useFormBuilder'
import { useFormService } from '../../hooks/useFormService'

registerAllCellTypes()
registerAllPlugins()

type Properties = RegisteredControlProperties &
  SpreadsheetProperties & {
    externalVariables?: {
      [key: string]: {
        propertyName?: string
        defaultValue?: number
      }
    }
  }

const SpreadsheetControl: React.FC<RegisterControlProps<Properties>> = (
  props
) => {
  const hotTableRef = useRef<any>(null)
  const containerRef = useRef<HTMLDivElement>(null)

  const { rows = 1, columns = 1 } = props.properties || {}

  const DEFAULT_COLUMN_WIDTH = 100
  const DEFAULT_ROW_HEIGHT = 25

  const defaultMeta = {
    data: createSpreadsheetDefaultValue(rows, columns),
    cellFormats: {} as { [key: string]: 'date' | 'currency' | undefined },
    mergeCellsConfig: [],
  }

  const meta = props.properties?.meta || defaultMeta
  const { actions: formBuilderWorksheetActions } = useFormBuilderWorksheetGrid()
  const { actions, data: formBuilderData } = useFormBuilder()
  const { watch } = useFormService()
  const formData = watch()

  if (!actions || !actions.getAllFields) {
  }

  const [data, setData] = useState(() => JSON.parse(JSON.stringify(meta.data)))
  const [cellFormats, setCellFormats] = useState(meta.cellFormats)
  const [mergeCellsConfig, setMergeCellsConfig] = useState(
    meta.mergeCellsConfig
  )

  useEffect(() => {
    if (props.externalVariables) {
      const existingExpressions = new Set(
        hyperformulaInstance.listNamedExpressions()
      )

      Object.entries(props.externalVariables).forEach(([key, property]) => {
        const typedProperty = property as {
          propertyName?: string
          defaultValue?: number
        }

        const variableName = typedProperty.propertyName || key
        const value = Number(typedProperty.defaultValue || 0)

        if (!existingExpressions.has(variableName)) {
          try {
            hyperformulaInstance.addNamedExpression(
              variableName,
              value,
              sheetId
            )
            existingExpressions.add(variableName)
          } catch (error) {
            console.error(
              `Error adding named expression ${variableName}:`,
              error
            )
          }
        } else {
          try {
            hyperformulaInstance.changeNamedExpression(
              variableName,
              value,
              sheetId
            )
          } catch (error) {
            console.error(
              `Error updating named expression ${variableName}:`,
              error
            )
          }
        }
      })

      try {
        hyperformulaInstance.rebuildAndRecalculate()
        syncSpreadsheetWithEngine()
      } catch (error) {
        console.error(
          'Error during HyperFormula rebuild and recalculation:',
          error
        )
      }
    }
  }, [props.externalVariables])

  const syncSpreadsheetWithEngine = () => {
    if (hotTableRef.current?.hotInstance) {
      const updatedData = hyperformulaInstance.getSheetValues(sheetId)
      console.log('Syncing spreadsheet with engine. Updated Data:', updatedData)
      hotTableRef.current.hotInstance.loadData(updatedData)
    }
  }

  useEffect(() => {
    const syncSpreadsheetWithEngine = () => {
      if (hotTableRef.current?.hotInstance) {
        const updatedData = hyperformulaInstance.getSheetValues(sheetId)
        console.log(
          'Syncing spreadsheet with engine. Updated Data:',
          updatedData
        )
        hotTableRef.current.hotInstance.loadData(updatedData)
      }
    }

    if (formBuilderData) {
      const existingExpressions = hyperformulaInstance.listNamedExpressions()

      Object.entries(formBuilderData).forEach(([key, value]) => {
        const numericValue = Number(value) || 0

        if (!existingExpressions.includes(key)) {
          hyperformulaInstance.addNamedExpression(key, numericValue)
        } else {
          hyperformulaInstance.changeNamedExpression(key, numericValue)
        }
      })

      hyperformulaInstance.rebuildAndRecalculate()
      syncSpreadsheetWithEngine()
    }
  }, [formBuilderData])

  useEffect(() => {
    if (formBuilderData?.fields) {
      const existingExpressions = new Set(
        hyperformulaInstance.listNamedExpressions()
      )

      formBuilderData.fields.forEach((field) => {
        const propertyName = field.properties?.propertyName
        const defaultValue = Number(field.properties?.defaultValue || 0)

        if (propertyName && !existingExpressions.has(propertyName)) {
          try {
            hyperformulaInstance.addNamedExpression(propertyName, defaultValue)
            existingExpressions.add(propertyName)
          } catch (error) {
            console.error(
              `Error adding named expression for ${propertyName}: ${error}`
            )
          }
        } else if (propertyName) {
          try {
            hyperformulaInstance.changeNamedExpression(
              propertyName,
              defaultValue
            )
          } catch (error) {
            console.error(
              `Error updating named expression for ${propertyName}: ${error}`
            )
          }
        }
      })

      try {
        hyperformulaInstance.rebuildAndRecalculate()
      } catch (error) {
        console.error(
          'Error during HyperFormula rebuild and recalculation:',
          error
        )
      }
    }
  }, [formBuilderData?.fields])

  useEffect(() => {
    if (formData && Object.keys(formData).length > 0) {
      const existingExpressions = hyperformulaInstance.listNamedExpressions()

      Object.entries(formData).forEach(([key, value]) => {
        if (!existingExpressions.includes(key)) {
          hyperformulaInstance.addNamedExpression(key, Number(value) || 0)
        } else {
          hyperformulaInstance.changeNamedExpression(key, Number(value) || 0)
        }
      })

      try {
        hyperformulaInstance.rebuildAndRecalculate()
      } catch (error) {}
    }
  }, [formData])

  useEffect(() => {
    const adjustedData = adjustDataDimensions(data, rows, columns)
    if (JSON.stringify(data) !== JSON.stringify(adjustedData)) {
      setData(adjustedData)
    }
  }, [rows, columns])

  const adjustDataDimensions = (
    currentData: any[][],
    rows: number,
    columns: number
  ) => {
    const newData = currentData.map((row) => [...row])
    if (newData.length < rows) {
      for (let i = newData.length; i < rows; i++) {
        newData.push(Array(columns).fill(null))
      }
    } else if (newData.length > rows) {
      newData.length = rows
    }
    newData.forEach((row) => {
      if (row.length < columns) {
        row.push(...Array(columns - row.length).fill(null))
      } else if (row.length > columns) {
        row.length = columns
      }
    })
    return newData
  }

  const handleAfterChange = (changes: any, source: string) => {
    if (!changes || source === 'loadData') return

    const validSheetId = sheetId ?? 0

    changes.forEach(([row, col, oldValue, newValue]: any) => {
      if (
        newValue &&
        typeof newValue === 'string' &&
        newValue.startsWith('=')
      ) {
        try {
          hyperformulaInstance.setCellContents(
            { sheet: validSheetId, row, col },
            [[newValue]]
          )
        } catch (error) {
          console.error('Error setting formula:', error)
        }
      }
    })

    try {
      hyperformulaInstance.rebuildAndRecalculate()
      syncSpreadsheetWithEngine() // Ensure the spreadsheet reflects changes
    } catch (error) {
      console.error('Error recalculating formulas:', error)
    }
  }

  const handleMergeCells = () => {
    const hotInstance = hotTableRef.current?.hotInstance
    const selected = hotInstance?.getSelected()
    if (selected) {
      const [startRow, startCol, endRow, endCol] = selected[0]
      const newMerge = {
        row: startRow,
        col: startCol,
        rowspan: endRow - startRow + 1,
        colspan: endCol - startCol + 1,
      }

      const updatedMergeCellsConfig = [...mergeCellsConfig, newMerge]
      hotInstance.updateSettings({ mergeCells: updatedMergeCellsConfig })
      setMergeCellsConfig(updatedMergeCellsConfig)

      updateFieldProperties({
        data,
        cellFormats,
        mergeCellsConfig: updatedMergeCellsConfig,
      })
    }
  }

  const handleUnmergeCells = () => {
    const hotInstance = hotTableRef.current?.hotInstance
    const selected = hotInstance?.getSelected()
    if (selected) {
      const [startRow, startCol] = selected[0]
      const mergeCellsPlugin = hotInstance.getPlugin('mergeCells')
      mergeCellsPlugin.unmerge(startRow, startCol)

      const updatedMergeCellsConfig = mergeCellsConfig.filter(
        (cell) => cell.row !== startRow || cell.col !== startCol
      )
      hotInstance.updateSettings({ mergeCells: updatedMergeCellsConfig })
      setMergeCellsConfig(updatedMergeCellsConfig)

      updateFieldProperties({
        data,
        cellFormats,
        mergeCellsConfig: updatedMergeCellsConfig,
      })
    }
  }

  const handleSetAsDate = () => {
    const selected = hotTableRef.current?.hotInstance.getSelected()
    if (selected) {
      const [row, col] = selected[0]
      const newFormats = { ...cellFormats, [`${row}-${col}`]: 'date' as const }
      setCellFormats(newFormats)
      updateFieldProperties({ data, cellFormats: newFormats, mergeCellsConfig })
    }
  }

  const handleSetAsCurrency = () => {
    const selected = hotTableRef.current?.hotInstance.getSelected()
    if (selected) {
      const [row, col] = selected[0]
      const newFormats = {
        ...cellFormats,
        [`${row}-${col}`]: 'currency' as const,
      }
      setCellFormats(newFormats)
      updateFieldProperties({ data, cellFormats: newFormats, mergeCellsConfig })
    }
  }

  const updateFieldProperties = (
    updatedMeta: Partial<SpreadsheetProperties['meta']>
  ) => {
    if (!props?.runtime) {
      const safeData = data ?? []

      formBuilderWorksheetActions?.setFieldConfigProperty(props.config?.id!, {
        meta: {
          data: [...safeData.map((row: any) => (row ? [...row] : []))],
          cellFormats: { ...cellFormats },
          mergeCellsConfig: [...mergeCellsConfig],
          ...updatedMeta,
        },
      } as Properties)
    }
  }

  const cellsHandler = (row: number, col: number) => {
    const cellProperties = {} as Handsontable.CellProperties
    cellProperties.width = DEFAULT_COLUMN_WIDTH
    cellProperties.height = DEFAULT_ROW_HEIGHT

    // Check if the cell format exists, or default to undefined
    const format = cellFormats?.[`${row}-${col}`]

    if (format === 'date') {
      cellProperties.renderer = (
        instance,
        td,
        row,
        col,
        prop,
        value,
        cellProperties
      ) =>
        CustomContentRenderer(instance, td, row, col, () => {
          const span = document.createElement('span')
          span.innerText = reformatDate(
            instance.getDataAtCell(row, col) as string
          )
          return span
        })
    } else if (format === 'currency') {
      cellProperties.renderer = (
        instance,
        td,
        row,
        col,
        prop,
        value,
        cellProperties
      ) =>
        CustomContentRenderer(instance, td, row, col, () => {
          const span = document.createElement('span')
          span.innerText = reformatCurrency(
            instance.getDataAtCell(row, col) as string
          )
          return span
        })
    }

    return cellProperties
  }

  return (
    <div
      ref={containerRef}
      className="h-[400px] w-1/2 resize-x overflow-auto border md:w-full"
      style={{ minWidth: '50%', maxWidth: '100%', resize: 'horizontal' }}
      onMouseDown={(e) => e.stopPropagation()}
    >
      <HotTable
        id="mySpreadsheet"
        data={data}
        colHeaders={true}
        rowHeaders={true}
        width="100%"
        height="100%"
        selectionMode="multiple"
        copyPaste={true}
        contextMenu={{
          items: {
            row_above: {},
            row_below: {},
            col_left: {},
            col_right: {},
            remove_row: {},
            remove_col: {},
            clear_column: {},
            mergeCells: { name: 'Merge Cells', callback: handleMergeCells },
            unmergeCells: {
              name: 'Unmerge Cells',
              callback: handleUnmergeCells,
            },
            set_as_date: { name: 'Set as Date', callback: handleSetAsDate },
            set_as_currency: {
              name: 'Set as Currency',
              callback: handleSetAsCurrency,
            },
          },
        }}
        ref={hotTableRef}
        afterChange={handleAfterChange}
        persistentState={true}
        licenseKey="non-commercial-and-evaluation"
        manualColumnResize={false}
        manualRowResize={false}
        autoColumnSize={false}
        autoRowSize={false}
        stretchH="all"
        mergeCells={mergeCellsConfig}
        formulas={{ engine: hyperformulaInstance }}
        cells={cellsHandler}
        colWidths={DEFAULT_COLUMN_WIDTH}
        rowHeights={DEFAULT_ROW_HEIGHT}
      />
    </div>
  )
}

export default registerControl<Properties>(SpreadsheetControl, {
  noDisplayLabel: true,
})
n = input("Введите число с периодом (например, 0.1(23)): ")

f_index = n.index('(')
period = n[f_index + 1:n.index(')')]
non_periodic = n[:f_index]

a = non_periodic.replace('.', '') + period

integer_part = int(non_periodic.replace('.', '')) if '.' in non_periodic else int(non_periodic)

non_periodic_length = len(non_periodic.split('.')[-1]) if '.' in non_periodic else 0
period_length = len(period)

numerator = integer_part * (10 ** (non_periodic_length + period_length) - 1) + int(period)
denominator = (10 ** non_periodic_length - 1) * (10 ** period_length)

def to_base_6(value):
    if value == 0:
        return '0'
    base_6_value = ''
    while value > 0:
        base_6_value = str(value % 6) + base_6_value
        value //= 6
    return base_6_value

base_6_numerator = to_base_6(numerator)
base_6_denominator = to_base_6(denominator)

print(f'Число в шестиричной системе: {base_6_numerator}/{base_6_denominator}')
class employe{
    private String nom;
    private String pre;
    private int age;
    private float salaire;
    employe(){
        this.nom="sahar";
        this.pre="mess";
        this.age=20;
        this.salaire=2500;
    }
    employe(String nom,String pre,int age,float salaire){
        this.nom=nom;
        this.pre=pre;
        this.age=age;
        this.salaire=salaire;
    }
    employe(employe e){
        this.nom=e.nom;
        this.pre=e.pre;
        this.age=e.age;
        this.salaire=e.salaire;
    }
    public String getNom(){
        return this.nom;
    }
    public String getPre(){
        return this.pre;
    }
     int getAge(){
        return this.age;
    }
    float getSalaire(){
        return this.salaire;
    }
    void setNom(String nom){
        this.nom=nom;
    }
    void setPre(String pre){
        this.pre=pre;
    }
    void setAge(int age){
        this.age=age;
    }
    void setSalaire(float salaire){
        this.salaire=salaire;
    }
    void aug(float sa){
        this.salaire+=sa;
    }
    public String toString(){
        String ch;
        ch="Nom:"+this.nom+" | Prenom:"+this.pre+"|age :"+this.age+" | le salaire :"+this.salaire;
        return ch;
    }
    void affiche(){
        System.out.println(this.toString());
    }
    
}
class tech extends employe{
    private int grade;
    tech(){
        this.grade=1;
    }
    tech(String nom,String pre,int age,float salaire,int grade){
        super(nom,pre,age,salaire);
        setGrade(grade);
    }
    int getGrade(){
        return this.grade;
    }
    void setGrade(int grade){
        if(grade>=1 && grade<=3){
            this.grade=grade;
        }else{
            System.out.println("grade invalid il doit contenir 1,2 ou 3");
        }
    }
int prime(){
    switch(grade){
             case 1:return 100;
             case 2:return 200;
             case 3:return 300;
             default:return 0;
         }
}
public String toString(){
    String ch;
    ch=super.toString()+"|le grade :"+this.grade+"| le prime :"+this.prime();
    return ch;
}
void augme(){
    super.aug(this.prime());
}


}
class equipe{
    private tech[] tab;
    equipe(tech[] tab){
        this.tab=tab;
    }
  public tech hisa(){
       tech higs=tab[0];
      for(tech t:tab) {
          if(t.getSalaire() > higs.getSalaire()){
              higs=t;
          }
      }
      return higs;
  }
  public tech higa() {
        tech hig = tab[0];
        for (tech t : tab) {
            if (t.getGrade() > hig.getGrade()) {
                hig = t;
            }
        }
        return hig;
    }
    
}
public class Main{
    public static void main(String [] args){
        employe e1=new employe("yasmin","tri",20,2500);
        tech t1=new tech("asma","ben",25,3000,2);
        e1.affiche();
        t1.affiche();
        e1.aug(200);
        e1.affiche();
        t1.setGrade(2);
        t1.augme();
        t1.affiche();        
        tech t22 = new tech("Lemoine", "Claire", 28, 1900, 2);
        tech t3 = new tech("Bernard", "Alice", 32, 2100, 1);
        tech t4 = new tech("Durand", "Eric", 27, 1950, 1);
        tech t5 = new tech("Morel", "Sophie", 26, 1850, 2);
        tech[] tab={t22,t3,t4,t5};
        equipe eq=new equipe(tab);
        System.out.println("Highest Salary Technician: " + eq.hisa());
        System.out.println("Highest Grade Technician: " + eq.higa());
    }
}
class employe{
    private String nom;
    private String prenom;
    private int age;
    private float salaire;
    public employe(){
        this.nom="sahar";
        this.prenom="mess";
        this.age=20;
        this.salaire=4000;}
     employe(String nom,String prenom,int age,float salaire){
        this.nom=nom;
        this.prenom=prenom;
        this.age=age;
        this.salaire=salaire;
    }
      employe(employe e){
         this.nom=e.nom;
         this.prenom=e.prenom;
         this.age=e.age;
         this.salaire=e.salaire;
     }   
    public String getNom(){
        return this.nom;
    }
    public String getPrenom(){
        return this.prenom;
    }
     int getAge(){
        return this.age;
    }
    float getSalaire(){
        return this.salaire;
    }
     void setNom(String nom){
        this.nom=nom;
    }
     void setPrenom(String prenom){
        this.prenom=prenom;
    }
     void setAge(int age){
        this.age=age;
    }
     void setSalaire(float salaire){
        this.salaire=salaire;
    }
 void aug(float so){
     this.salaire+=so;
 } 
 public String toString(){
     String ch;
     ch="le nom est :"+this.nom+"| prenom est :"+this.prenom+"| age est :"+this.age+"| le salaire est :"+this.salaire;
     return ch;
 }
 public void affiche(){
     System.out.println(this.toString());
 }}
  class tech extends employe{
     private int grade;
     public tech(){
         this.grade=1;
     }
     public tech(String nom,String prenom,int age,float salaire,int grade){
         super(nom,prenom,age,salaire);
         setGrade(grade);
     }
     public int getGrade(){
         return this.grade;
     } 
     public void setGrade(int grade){
         if(grade>=1 && grade<=3){
             this.grade=grade;
         }else{
             System.out.println("grade invalid il doit contrnir 1,2 ou 3");
         }
     }
     public float prime(){
         switch(grade){
             case 1:return 100;
             case 2:return 200;
             case 3:return 300;
             default:return 0;
         }
     }
     public String toString(){
         String ch;
         ch=super.toString()+", grade:"+this.grade+", prime"+this.prime();
         return ch;
     }
    void augmentation(){
         super.aug(this.prime());
     }
 }
 class equipe{
     tech[] tab=new tech[10];
     equipe(tech[] t){
         tab=t;

         }
     }
  public class Main{
      public static void main(String [] args){
          employe E1=new employe();
          employe E2=new employe("sarsar","messour",19,4000);
          tech t1=new tech();
          tech t2=new tech("ahmed","messaoui",49,3500,1);
          E1.affiche();
          E2.affiche();
          t1.affiche();
          t2.affiche();
          E1.aug(200);
          E1.affiche();
          t1.setGrade(2);
          t1.augmentation();
          t1.affiche();
        tech t22 = new tech("Lemoine", "Claire", 28, 1900, 2);
        tech t3 = new tech("Bernard", "Alice", 32, 2100, 1);
        tech t4 = new tech("Durand", "Eric", 27, 1950, 1);
        tech t5 = new tech("Morel", "Sophie", 26, 1850, 2);
         tech[] tab={t1,t2,t3,t4,t5};
         equipe eq=new equipe(tab);
         Technicien meilleur = techniciens[0];
        for (tech tab : 10) {
            if (t.getSalaire() > meilleur.getSalaire()) {
                meilleur = t;
            }
        }
         tech mei=grmax;
         System.out.println("le plus rande est:");
        System.out.println(mei);
    

         
      }
  }
services:
  webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - 3000:8080/tcp
    volumes:
      - open-webui:/app/backend/data
    extra_hosts:
      - "host.docker.internal:host-gateway"
    depends_on:
      - ollama

  ollama:
    image: ollama/ollama
    expose:
      - 11434/tcp
    ports:
      - 11434:11434/tcp
    healthcheck:
      test: ollama --version || exit 1
    volumes:
      - ollama:/root/.ollama

volumes:
  ollama:
  open-webui:
New-Item -Path 'D:\temp\Test Folder' -ItemType Directory
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,
Business_Unit__c, Region, Cat_Campaign_Most_Recent__c , Mailing_Country__c, LastModifiedDate, Language__c AS LanguageCode, CreatedDate,
FirstName, LastName, UCID

FROM (
SELECT
DISTINCT LOWER(Email__c) AS EmailAddress, i.Region__c AS Region,c.AMC_Status__c,c.Job_Role__c,c.AMC_Last_Activity_Date__c, i.Industry_Level_2_Master__c, i.Industry__c,
c.Id AS SubscriberKey, c.Consent_Level_Summary__c, i.Business_Unit__c,i.Cat_Campaign_Most_Recent__c , i.Mailing_Country__c, i.LastModifiedDate, c.Language__c, i.CreatedDate,
c.FirstName, c.LastName, ec.UCID,

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

FROM ent.Interaction__c_Salesforce i

JOIN ent.Contact_Salesforce_1 c ON LOWER(c.Email) = LOWER(i.Email__c)
JOIN ent.[Aftermarket eCommerce - Registered Customers – Stage] ec  ON LOWER(c.Email) = LOWER(ec.Email)
INNER JOIN ent.ContactPointConsent_Salesforce AS cpc ON c.Id = cpc.Contact__c
INNER JOIN ent.DataUsePurpose_Salesforce AS dup ON cpc.DataUsePurposeId = dup.Id

WHERE ec.Email IS NOT NULL
    AND Email__c NOT LIKE '%@cat.com'
    AND i.Mailing_Country__c IS NOT NULL
    AND cpc.CaptureContactPointType = 'Email'
    AND cpc.MATM_Owner__c = 'Caterpillar'
    AND dup.Name = 'Caterpillar Marketing'
    AND cpc.PrivacyConsentStatus = 'OptIn' 
    AND (cpc.EffectiveTo IS NULL OR cpc.EffectiveTo < GetDate())
    AND (i.Mailing_State_Province__c != 'QC' OR (i.Mailing_Country__c != 'CA' AND i.Mailing_State_Province__c IS NULL))
    AND  (i.System_Language__c like 'en_%' OR (i.Mailing_Country__c != 'CA' AND i.System_Language__c is null))
        )t2

WHERE RowNum = 1
Are you looking for effective solution to build your resume online then utilize top rated online resume builder, which makes your resume building process simple and easy. It is user-friendly and completely professional tool. It helps individuals create professional resumes quickly and easily. The tool offers customizable templates, pre-written content suggestions, and formatting options to enhance visual appeal. Users can input their information, adjust layouts, and download finished resumes in various formats like Word or PDF. 
import { compareDesc, parseISO } from "date-fns";

import { allPortfolioExamplesPosts } from "contentlayer/generated";
import { sortBlogs } from "@/lib/onehour/utils";
import BlogMain from "@/components/onehoursite/blog/BlogMain";

export default async function InspirationHomePage() {
  const allPosts = allPortfolioExamplesPosts
    .filter((post) => post.isPublished)
    .sort((a, b) => {
      return compareDesc(parseISO(a.updatedAt), parseISO(b.updatedAt));
    });
  return (
    <div className="container-large ">
      <div className=" left-0 top-0 min-h-full w-full">
        <div className=" min-h-full w-full bg-[#f9fafc]">
          <div className="section mx-auto mt-0 max-w-[1440px] bg-[#f7fcfd] ">
            <section className=" relative flex flex-col bg-[url('/oneHour/marketer/marketer_hero.png')] bg-contain bg-[50%_0%]  bg-repeat pb-24 pt-0 font-garamond_normal sm:pb-40">
              <div className="container relative mx-auto flex max-w-[1440px] flex-wrap  px-4 py-0 md:px-8">
                <div className="row flex w-full flex-wrap justify-center lg:-mx-5">
                  <div className="column flex w-full max-w-full flex-shrink-0 flex-grow-0 basis-full break-words px-5 pt-4 md:w-[75%] md:max-w-[75%] md:basis-3/4 md:pt-16  xl:pt-32">
                    <div className="content-wrapper w-full">
                      <div className="column-content1 w-full">
                        <div>
                          <h1 className="pb-8 text-center text-[2.5rem] font-bold leading-[2.75rem] text-midnightBlue md:text-[3rem] md:leading-[3rem] xl:text-[4.25rem] xl:leading-[5rem]">
                            <span>Portfolio Inspirations</span>
                          </h1>
                          <p className="pb-8 text-center  text-[1.25rem] font-medium leading-[1.75rem] text-midnightBlue   md:text-[1.5rem] md:leading-[1.75] xl:text-[1.75rem] xl:leading-[2.5rem]">
                            <span>
                              Browse top portfolio examples across professions
                              to inspire your next project and showcase your
                              unique skills
                            </span>
                          </p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>
      </div>

      <div className="relative bg-[#f7fcfd] pb-24 pt-[10px] md:pt-[20px] lg:pt-[30px]">
        <div className="px-2 md:px-5 lg:px-20">
          <section>
            <div className="mx-2 pb-8 md:mx-3 md:pb-12 lg:mx-5 lg:pb-16">
              <div className="flex flex-col items-center justify-center px-1 md:px-2 lg:px-5">
                <h2 className="font-garamond_normal  text-[1.5rem]  font-extrabold leading-[1.75rem] text-midnightBlue md:text-[1.75rem] md:leading-[1.5rem] xl:text-[2.5rem] xl:leading-[3.75rem]">
                  All Posts
                </h2>
              </div>
            </div>

            <div>
              <BlogMain allblogposts={allPosts} />
            </div>
          </section>
        </div>
      </div>
    </div>
  );
}
/**
 *
 * @param {string[]} names - an array of ids
 * @param {string[]} names - an array of ids
 * @param {string[]} names - a blank array to push into
 *
 * This function will compare array1 with array2 and if the items dont match then they are pushed to array3
 */
const compareIds = (array1, array2, array3) => {
    array1.forEach((id) => {
        if (!array2.includes(id)) {
            array3.push(id);
        }
    });
};
class compte{
    private int solde;
    //constructeur
    public compte(int solde){
        this.solde=solde;
    }
    public int getSolde(){
        return solde;
    }
    public void retirer(int montant){
        if(montant>0 && montant <=solde){
            solde=solde-montant;
            System.out.println("Retrait de "+montant+"effectue.nouveau solde"+solde);
        }else{
            System.out.println("Retrait impossible. Solde insuffisant ou montant invalide.");
        }
    }
    public void deposer(int mon){
        if(mon>0){
            solde=solde+mon;
            System.out.println("la desposition de montant "+mon+ "avec succes"+solde);
        }else{
             System.out.println("Dépôt impossible. Montant invalide.");
        }
    }
    public void transfere(int arg,compte c2){
        if(arg>0 && arg<=solde){
            this.retirer(arg);
            c2.deposer(arg);
            System.out.println("le transfer est succes c2:"+c2);
        }else{
            System.out.println("la transfer est invalid");
        }
    }
 public class Main{
   public static void main(String[] args){
       compte c1=new compte(500);
       c1.retirer(100);
       c1.deposer(200);
       compte c2=new compte(0);
       c1.transfere(300,c2);
       System.out.println("solde final de c1:"+c1.getSolde()+"d");
       System.out.println("solde final de c2:"+c2.getSolde()+"d");
   } 
    }
}
class compte{
    private int solde;
    //constructeur
    public compte(int solde){
        this.solde=solde;
    }
    public int getSolde(){
        return solde;
    }
    public void retirer(int montant){
        if(montant>0 && montant <=solde){
            solde=solde-montant;
            System.out.println("Retrait de "+montant+"effectue.nouveau solde"+solde);
        }else{
            System.out.println("Retrait impossible. Solde insuffisant ou montant invalide.");
        }
    }
    public void deposer(int mon){
        if(mon>0){
            solde=solde+mon;
            System.out.println("la desposition de montant "+mon+ "avec succes"+solde);
        }else{
             System.out.println("Dépôt impossible. Montant invalide.");
        }
    }
    public void transfere(int arg,compte c2){
        if(arg>0 && arg<=solde){
            this.retirer(arg);
            c2.deposer(arg);
            System.out.println("le transfer est succes c2:"+c2);
        }else{
            System.out.println("la transfer est invalid");
        }
    }
 public class Main{
   public static void main(String[] args){
       compte c1=new compte(500);
       c1.retirer(100);
       c1.deposer(200);
       compte c2=new compte(0);
       c1.transfere(300,c2);
       System.out.println("solde final de c1:"+c1.getSolde()+"d");
       System.out.println("solde final de c2:"+c2.getSolde()+"d");
   } 
    }
}
<script>
    window.onscroll = function() {
        var button = document.getElementById("scrollToTop");
        if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
            button.style.display = "block";
        } else {
            button.style.display = "none";
        }
    };
</script>
// config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.fingerprintauth" version="1.0.0" xmlns="http://www.w3.org/ns/widgets">
    <name>FingerprintAuth</name>
    <description>Aplicación de autenticación por huella digital</description>
    <author email="dev@example.com" href="http://example.com">
        Tu Nombre
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-fingerprint-aio" spec="^4.0.0" />
    <access origin="*" />
</widget>

// www/index.html
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Autenticación por Huella Digital</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div class="container">
        <h1>Bienvenido</h1>
        <button id="authenticateButton">Autenticar con Huella Digital</button>
        <p id="status"></p>
    </div>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>
</html>

// www/css/style.css
.container {
    padding: 20px;
    text-align: center;
}

button {
    padding: 15px 30px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    margin: 20px 0;
    cursor: pointer;
}

#status {
    margin-top: 20px;
    font-weight: bold;
}

// www/js/index.js
document.addEventListener('deviceready', onDeviceReady, false);

function onDeviceReady() {
    document.getElementById('authenticateButton').addEventListener('click', authenticate);
    
    // Verificar si el dispositivo soporta la autenticación biométrica
    Fingerprint.isAvailable(function(result) {
        // result contiene el tipo de biometría disponible
        console.log("Tipo de biometría: " + result);
    }, function(error) {
        console.error("Error al verificar biometría: " + error);
        document.getElementById('status').textContent = 
            "Tu dispositivo no soporta autenticación por huella digital";
    });
}

function authenticate() {
    Fingerprint.show({
        title: 'Autenticación Biométrica', // título opcional
        subtitle: 'Por favor, autentícate usando tu huella digital', // subtítulo opcional
        description: 'Toca el sensor de huella digital', // descripción opcional
        fallbackButtonTitle: 'Usar alternativa', // título del botón alternativo
        disableBackup: false // permitir autenticación alternativa
    }, successCallback, errorCallback);
}

function successCallback() {
    document.getElementById('status').textContent = 
        "¡Autenticación exitosa!";
    // Aquí puedes agregar la lógica para después de una autenticación exitosa
}

function errorCallback(error) {
    document.getElementById('status').textContent = 
        "Error en la autenticación: " + error.message;
}
// Online C++ compiler to run C++ program online
#include <iostream>
#include <vector>
#include <queue>

using namespace std ;

struct Node
{
    int data ;
    Node* left;
    Node* right;
    
    Node(int x){
        data = x;
        left = right = NULL; 
    }
}

vector <int> levelOrder(Node* root){
    vector<int> ans;
    if(!root) 
    {
        return ans; // means no root (base case )
    }
    
    queue<Node*> q ;
    q.push(root);
    while(!q.empty()){
        Node* t= q.front();
        ans.push_back(t->data);
        if(t->left) {
            q.push(t->left);
        }
        if(t->right) {
            q.push(t->right);
        }
        q.pop();
    }
    return ans;
    
}
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n,m;
    cout<<"Please enter the number";
    cin>>n;
    cout<<"please enter the bit u want to manipulate";
    cin>>m;
    cout<<"we are printing all the bits in this number";
    int bits = sizeof(n) * 4;
    for(int i=bits-1;i>=0;i--)
    {
        int bit = (n>>i)&1;
        cout<<bit;
    }
    cout<<endl;
    cout<<"now we want to manipulate bit";
    n = n^(1<<m);
    cout<<"the main vlue    "<<n<<endl;
    for(int i=bits-1;i>=0;i--)
    {
        int bit = (n>>i)&1;
        cout<<bit;
    }
    
}
<#
.SYNOPSIS
Synopsis Here

.DESCRIPTION
Description Here

.PARAMETER <parameterNameHere>
Parameter Description Here

.EXAMPLE

Example Here

.NOTES
Notes Here

#>
<strong title="Following" data-e2e="following-count">1k</strong>
<strong title="Likes" data-e2e="likes-count">55879</strong>
Integrating mapping services into a taxi booking app like Gett is essential for providing accurate navigation and real-time tracking. Here's a breakdown of how to achieve this using Gett clone:

1. Choose a reliable mapping service:
Majorly two service providers can avail of mapping services for their project demands like Google Maps, Here Maps, and OpenStreetMap. To utilize any one of the tools APIs to utilize it for your platform.

2. Get API keys and credentials
sign up for your official mail address to your chosen mapping service provider and obtain API keys and credentials.

3. Integrate the Mapping API
Utilize your purchased API to set up the display map with things like the user's current location, nearby taxis, and the route to the destination. Leverage the API for routing capabilities to calculate the shortest and most efficient routes for taxis. Incorporate real-time traffic data to avoid congestion and optimize routes. Analyze the past user activity to predict and suggest the point of interest nearby places depending upon the user's interest.

4. Optimize Map Performance
Cache frequently accessed map data to reduce API calls and improve performance. Avail offline map features for the user's convenience with limited or no network connectivity.

5.  Handle Errors and Exceptions
Incorporate robust bugs and error handling, specifically the cause of using APIs and network issues. Provide informative error messages to users and developers.

Above, these are the steps you should follow to get a far better taxi booking platform for your targeted audience. If you're seeking a taxi booking platform like Gett, then Appticz is the choice for your business demands because we have experience in providing taxi-related apps for our clients.
import java.util.*;

class Ae {

int x;

void getAe() {

System.out.println("Enter the value of x"); Scanner sc = new Scanner(System.in); x = sc.nextInt(); }

class B extends Ae {

int y:

void getB() {

System.out.println("Enter the value of y"); Scanner sc = new Scanner(System.in); y = sc.nextInt(); }

}

class C extends B {

void result() {

System.out.println("Result:=" .println("Result:=\t" + (x + y)); }

public class W2_iii_MultiLevellnheritance {

public static void main(String[] args) {

C c1 = new C();

c1.getAe();

c1.getB();

c1.result();
package csd.java.lab;

class ParentClass{

int a;

void SetData(int x) {

a=x;

}

}

class ChildClass extends ParentClass{

void ShowData() {

System.out.println("Value of a is\t"+a);

}

}

public class W2_ii_SInheritance {

public static void main(String[] args) {

ChildClass c1=new ChildClass();

c1.SetData(25);

c1.ShowData();

}

}
import java.util.Scanner;

public class EvenOddChecker {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int[] numbers = new int[20];

        // Input 20 numbers from the user

        System.out.println("Enter 20 numbers:");

        for (int i = 0; i < 20; i++) {

            numbers[i] = scanner.nextInt();

        }

        // Check if each number is even or odd

        for (int i = 0; i < 20; i++) {

            if (numbers[i] % 2 == 0) {

                System.out.println(numbers[i] + " is even.");

            } else {

                System.out.println(numbers[i] + " is odd.");

            }

        }

        scanner.close();

    }

}
// ExampleShader.usf

// Include common material functions
#include "Common.usf"

// Vertex shader input structure
struct VertexInput
{
    float4 Position : ATTRIBUTE0; // Vertex position
    float2 UV : ATTRIBUTE1;       // Texture coordinates
};

// Vertex shader output structure
struct VertexOutput
{
    float4 Position : SV_POSITION; // Clip-space position
    float2 UV : TEXCOORD0;         // Texture coordinates passed to the pixel shader
};

// Vertex shader function
VertexOutput MainVS(VertexInput In)
{
    VertexOutput Out;
    
    // Transform the vertex position to clip space
    Out.Position = mul(In.Position, View.WorldToClip);
    
    // Pass the UV coordinates to the pixel shader
    Out.UV = In.UV;
    
    return Out;
}

// Pixel shader function
float4 MainPS(VertexOutput In) : SV_Target
{
    // Define a constant color (e.g., blue)
    float3 BaseColor = float3(0.0, 0.0, 1.0);
    
    // Return the color with full opacity
    return float4(BaseColor, 1.0);
}

// Register the shaders
VS_Main(MainVS); // Register the vertex shader
PS_Main(MainPS); // Register the pixel shader
#include <Servo.h>

// Declare servo objects
Servo servo1; // Right leg - top
Servo servo2; // Left leg - top
Servo servo3; // Left leg - bottom
Servo servo4; // Right leg - bottom

// Servo neutral positions
int servo1Neutral = 90; // Right leg - top neutral position
int servo2Neutral = 90; // Left leg - top neutral position
int servo3Neutral = 90; // Left leg - bottom neutral position
int servo4Neutral = 90; // Right leg - bottom neutral position

// Movement parameters
int stepAngle = 20; // Angle to move for a step
int delayTime = 300; // Delay between movements (ms)

void setup() {
  // Attach servos to pins
  servo1.attach(3); // Pin for right leg top
  servo2.attach(5); // Pin for left leg top
  servo3.attach(6); // Pin for left leg bottom
  servo4.attach(9); // Pin for right leg bottom

  // Set servos to neutral positions
  resetToNeutral();
}

void loop() {
  takeStep(); // Make Otto take a step
  delay(500); // Short pause between steps
}

// Function to reset all servos to their neutral positions
void resetToNeutral() {
  servo1.write(servo1Neutral);
  servo2.write(servo2Neutral);
  servo3.write(servo3Neutral);
  servo4.write(servo4Neutral);
  delay(500); // Allow servos to move to position
}

// Function for a walking step
void takeStep() {
  // Step 1: Lift left leg
  servo3.write(servo3Neutral + stepAngle); // Move left bottom servo up
  delay(delayTime);

  // Step 2: Swing left leg forward
  servo2.write(servo2Neutral - stepAngle); // Move left top servo forward
  delay(delayTime);

  // Step 3: Place left leg down
  servo3.write(servo3Neutral); // Return left bottom servo to neutral
  delay(delayTime);

  // Step 4: Lift right leg
  servo4.write(servo4Neutral + stepAngle); // Move right bottom servo up
  delay(delayTime);

  // Step 5: Swing right leg forward
  servo1.write(servo1Neutral - stepAngle); // Move right top servo forward
  delay(delayTime);

  // Step 6: Place right leg down
  servo4.write(servo4Neutral); // Return right bottom servo to neutral
  delay(delayTime);

  // Reset to neutral after each step
  resetToNeutral();
}
// Register Custom Post Type
function custom_post_type() {

	$labels = array(
		'name'                  => _x( 'Post Types', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Post Type', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Post Types', 'text_domain' ),
		'name_admin_bar'        => __( 'Post Type', 'text_domain' ),
		'archives'              => __( 'Item Archives', 'text_domain' ),
		'attributes'            => __( 'Item Attributes', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'All Items', 'text_domain' ),
		'add_new_item'          => __( 'Add New Item', 'text_domain' ),
		'add_new'               => __( 'Add New', 'text_domain' ),
		'new_item'              => __( 'New Item', 'text_domain' ),
		'edit_item'             => __( 'Edit Item', 'text_domain' ),
		'update_item'           => __( 'Update Item', 'text_domain' ),
		'view_item'             => __( 'View Item', 'text_domain' ),
		'view_items'            => __( 'View Items', 'text_domain' ),
		'search_items'          => __( 'Search Item', 'text_domain' ),
		'not_found'             => __( 'Not found', 'text_domain' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'text_domain' ),
		'featured_image'        => __( 'Featured Image', 'text_domain' ),
		'set_featured_image'    => __( 'Set featured image', 'text_domain' ),
		'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),
		'use_featured_image'    => __( 'Use as featured image', 'text_domain' ),
		'insert_into_item'      => __( 'Insert into item', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),
		'items_list'            => __( 'Items list', 'text_domain' ),
		'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter items list', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Post Type', 'text_domain' ),
		'description'           => __( 'Post Type Description', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => false,
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'post_type', $args );

}
add_action( 'init', 'custom_post_type', 0 );
#include <iostream>
using namespace std;

class Queue {
public:
    int *arr;     // Pointer for dynamically allocated array
    int front;    // Index of the front element
    int rear;     // Index of the rear element
    int size;     // Maximum size of the queue

    // Constructor to initialize the queue
    Queue(int size) {
        this->size = size;
        arr = new int[size];
        front = 0; // Initially, front is 0
        rear = 0;  // Initially, rear is 0
    }

    // Enqueue: Add an element to the rear of the queue
    void enqueue(int element) {
        // Check if the queue is full
        if (rear == size) {
            cout << "Queue is full (Overflow)" << endl;
        } else {
            arr[rear] = element; // Add element at the rear
            rear++;              // Increment the rear index
            cout << element << " added to the queue" << endl;
        }
    }

    // Dequeue: Remove an element from the front of the queue
    void dequeue() {
        // Check if the queue is empty
        if (front == rear) {
            cout << "Queue is empty (Underflow)" << endl;
        } else {
            cout << arr[front] << " removed from the queue" << endl;
            front++; // Increment the front index to the next element
        }
    }

    // isEmpty: Check if the queue is empty
    bool isEmpty() {
        return front == rear;
    }

    // Front: Retrieve the front element without removing it
    int getFront() {
        if (isEmpty()) {
            cout << "Queue is empty (No front element)" << endl;
            return -1; // Return an invalid value as the queue is empty
        } else {
            return arr[front]; // Return the front element
        }
    }
};

int main() {
    // Create a queue of size 5
    Queue q(5);

    // Enqueue elements
    q.enqueue(10);
    q.enqueue(20);
    q.enqueue(30);

    // Display the front element
    cout << "Front element: " << q.getFront() << endl;

    // Dequeue elements
    q.dequeue();
    cout << "Front element after dequeue: " << q.getFront() << endl;

    // Check if the queue is empty
    if (q.isEmpty()) {
        cout << "The queue is empty" << endl;
    } else {
        cout << "The queue is not empty" << endl;
    }

    return 0;
}
#include <iostream>
using namespace std;

class Stack {
public:
    int *arr; // properties
    int top;
    int size;

    // constructor
    Stack(int size) {
        this->size = size;
        arr = new int[size];
        top = -1;
    }

    // push function
    void push(int element) {
        if (size - top > 1) { // Check for empty space 
            top++;
            arr[top] = element;
        } else {
            cout << "Stack overflow" << endl;
        }
    }

    // pop function
    void pop() {
        if (top >= 0) {
            top--;
        } else {
            cout << "Stack underflow" << endl;
        }
    }

    // peek function
    int peek() {
        if (top >= 0) {
            return arr[top];
        } else {
            cout << "Stack is empty" << endl;
            return -1;
        }
    }

    // isEmpty function
    bool isEmpty() {
        return top == -1;
    }

    // delete stack function
    void deleteStack() {
        delete[] arr; // Free the allocated memory
        arr = nullptr; // Reset the pointer
        top = -1; // Reset the top
        size = 0; // Reset the size
        cout << "Stack has been deleted" << endl;
    }
};

int main() {
    Stack st(5);

    st.push(20);
    st.push(30);
    st.push(50);
    cout << "Top element before deletion: " << st.peek() << endl;

    st.deleteStack();

    // After deletion, trying to access the stack
    if (st.arr == nullptr) {
        cout << "Stack array is nullptr after deletion." << endl;
    }

    return 0;
}
import pendulum

def calc_expire_date(prodact_date, expiry):
    prodact_date = pendulum.parse('{:0>2}-{:0>2}-{:0>2}'.format(*prodact_date))
    target_date = pendulum.duration(**expiry) + prodact_date
    days_to_expire = (target_date.date() - pendulum.now().date()).days
    print(f'Product vaild until : {target_date} You have {days_to_expire} days')


calc_expire_date((2024, 11, 15), expiry = {'days': 15})
import tkinter as tk

root = tk.Tk()
root.geometry('200x200')

def close_window():
    root.destroy()

close_bt = tk.Button(root, text = 'close', command = close_window)
close_bt.pack()

def disable_close_bt():
    return

root.protocol('WM_DELETE_WINDOW', disable_close_bt)
root.mainloop()
lang = "en"  # language code for ENGLISH
project_name = "wiki"  # wikipedia namespace
namespace = 0  # 0 for Main/ Articles
date = "20220420"
DUMP_DIR = "/public/dumps/public/other/enterprise_html/runs"  # directory on PAWS server that holds Wikimedia dumps
HTML_DUMP_FN = os.path.join(
    DUMP_DIR,
    date,
    f"{lang+project_name}-NS{namespace}-{date}-ENTERPRISE-HTML.json.tar.gz",
)  # final file path

print(
    f"Reading {HTML_DUMP_FN} of size {os.path.getsize(HTML_DUMP_FN)/(1024*1024*1024)} GB"
)

article_list = []
with tarfile.open(HTML_DUMP_FN, mode="r:gz") as tar:
    html_fn = tar.next()
    print(
        f"We will be working with {html_fn.name} ({html_fn.size / 1000000000:0.3f} GB)."
    )
    # extract the first article from the first tar chunk
    with tar.extractfile(html_fn) as fin:
        for line in fin:
            article = json.loads(line)
            break
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyAttack : MonoBehaviour
{
    public int attackDamage = 10; // Damage dealt by the enemy
    public Transform attackPoint; // The point from which the attack originates
    public float attackRange = 1f; // Range of the attack
    public LayerMask playerLayer; // Layer to detect the player
    public float attackCooldown = 2f; // Time between attacks
    Animator animator;

    private Enemy enemy; // Reference to the enemy's state
    private bool canAttack = true; // Cooldown flag for attacks

    private void Awake()
    {
        animator = GetComponent<Animator>();

        // Reference to the Enemy script on the same GameObject
        enemy = GetComponent<Enemy>();
    }

    public void PerformAttack()
    {
        // Ensure the enemy is alive and can attack
        if (!enemy.isAlive || !canAttack) return;

        // Check for player within attack range
        Collider2D playerCollider = Physics2D.OverlapCircle(attackPoint.position, attackRange, playerLayer);
        if (playerCollider != null)
        {
            // Damage the player if detected
            HealthSystem playerHealth = playerCollider.GetComponent<HealthSystem>();
            if (playerHealth != null)
            {
                playerHealth.TakeDamage(attackDamage);
                Debug.Log("Enemy hit the player: " + playerCollider.name);
            }
        }

        // Trigger attack animation
        if (animator != null)
        {
            animator.SetTrigger("attack");
        }

        // Start cooldown
        StartCoroutine(AttackCooldown());
    }

    private IEnumerator AttackCooldown()
    {
        canAttack = false; // Prevent further attacks
        yield return new WaitForSeconds(attackCooldown); // Wait for cooldown duration
        canAttack = true; // Allow attacking again
    }

    // Debugging: Visualize the attack range in the editor
    private void OnDrawGizmosSelected()
    {
        if (attackPoint == null) return;
        Gizmos.color = Color.red;
        Gizmos.DrawWireSphere(attackPoint.position, attackRange);
    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;

public class HealthBar : MonoBehaviour
{
    public Slider healthSlider;
    public TMP_Text healthBarText;

    HealthSystem playerHealthSystem;
    // Start is called before the first frame update

    private void Awake()
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if(player == null)
        {
            Debug.Log("player not found or missing tag on player");
        }

        playerHealthSystem = player.GetComponent<HealthSystem>();
    }
    void Start()
    {
        healthSlider.value = CalculateSliderPercentage(playerHealthSystem.currentHealth, playerHealthSystem.maxHealth);
        healthBarText.text = "HP " + playerHealthSystem.currentHealth + " / " + playerHealthSystem.maxHealth;
    }

    private void OnEnable()
    {
        playerHealthSystem.OnHealthChanged.AddListener(OnPlayerHealthChanged);
    }

    private void OnDisable()
    {
        playerHealthSystem.OnHealthChanged.RemoveListener(OnPlayerHealthChanged);
    }

    private float CalculateSliderPercentage(int currentHealth, int maxHealth)
    {
        return currentHealth / maxHealth;
    }

    private void OnPlayerHealthChanged(int newHealth, int maxHealth)
    {
        healthSlider.value = CalculateSliderPercentage(newHealth, maxHealth);
        healthBarText.text = "HP " + newHealth + " / " + maxHealth;
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HealthSystem : MonoBehaviour
{
    public int maxHealth = 100;
    public int currentHealth;

    public delegate void OnHealthChanged(int currentHealth, int maxHealth);
    public event OnHealthChanged onHealthChanged;
    public delegate void OnDeath();
    public event OnDeath onDeath;

    public void Start()
    {
        currentHealth = maxHealth; // Initialize health
        onHealthChanged?.Invoke(currentHealth, maxHealth); // Notify UI or other systems
    }

    public void TakeDamage(int damage)
    {
        currentHealth -= damage;
        if (currentHealth <= 0)
        {
            currentHealth = 0;
            Die();
        }
        onHealthChanged?.Invoke(currentHealth, maxHealth); // Update health bar or UI
    }

    public void Heal(int amount)
    {
        currentHealth = Mathf.Min(currentHealth + amount, maxHealth); // Ensure health doesn't exceed max
        onHealthChanged?.Invoke(currentHealth, maxHealth); // Update health bar or UI
    }

    public void Die()
    {
        onDeath?.Invoke(); // Trigger death event
        // You can trigger death-related logic here or in the subscribed listener
    }

    public int GetCurrentHealth()
    {
        return currentHealth;
    }

    public int GetMaxHealth()
    {
        return maxHealth;
    }
}
#include <iostream>
using namespace std;
​
int main() {
  cout << "Hello World!";
  return 0;
}
​
star

Wed Nov 27 2024 21:26:25 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Wed Nov 27 2024 20:55:24 GMT+0000 (Coordinated Universal Time)

@nachopascual #php

star

Wed Nov 27 2024 20:37:53 GMT+0000 (Coordinated Universal Time)

@desiboli #javascript #typescript

star

Wed Nov 27 2024 20:26:06 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Wed Nov 27 2024 19:53:07 GMT+0000 (Coordinated Universal Time)

@okkpurple

star

Wed Nov 27 2024 17:38:58 GMT+0000 (Coordinated Universal Time)

@shusanto

star

Wed Nov 27 2024 15:54:20 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v

@abcabcabc

star

Wed Nov 27 2024 13:06:53 GMT+0000 (Coordinated Universal Time) https://learn.upgrad.com/course/6955/segment/55858/338400/1023321/5117004

@dorjee

star

Wed Nov 27 2024 13:05:27 GMT+0000 (Coordinated Universal Time)

@odesign

star

Wed Nov 27 2024 11:46:09 GMT+0000 (Coordinated Universal Time)

@anamarie

star

Wed Nov 27 2024 06:49:36 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/nft-sports-marketplace-development/

@LilianAnderson #nftsportsmarketplace #sportsnfts #nftmarketplacedevelopment #blockchaininsports #sportscollectiblesnft

star

Wed Nov 27 2024 02:27:52 GMT+0000 (Coordinated Universal Time)

@sk #python

star

Wed Nov 27 2024 01:02:17 GMT+0000 (Coordinated Universal Time)

@saharmess #mysql

star

Wed Nov 27 2024 01:02:17 GMT+0000 (Coordinated Universal Time)

@saharmess #mysql

star

Tue Nov 26 2024 20:04:40 GMT+0000 (Coordinated Universal Time) https://a-chacon.com/en/docker/2024/09/16/run-llm-locally.html

@Shex #ollama #docker-compose #ai #webui

star

Tue Nov 26 2024 18:57:37 GMT+0000 (Coordinated Universal Time) https://www.tutorialspoint.com/powershell/powershell_files_create_folders.htm

@acassell

star

Tue Nov 26 2024 17:29:25 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Tue Nov 26 2024 10:08:43 GMT+0000 (Coordinated Universal Time) https://www.linkedin.com/pulse/discover-best-online-resume-builder-build-within-5-adam-gilchrist-g40zc/

@adamsmith #resumebuilder #buildyourresume #resume

star

Tue Nov 26 2024 06:14:43 GMT+0000 (Coordinated Universal Time)

@asha #react

star

Mon Nov 25 2024 23:46:51 GMT+0000 (Coordinated Universal Time)

@davidmchale

star

Mon Nov 25 2024 22:05:13 GMT+0000 (Coordinated Universal Time)

@saharmess #mysql

star

Mon Nov 25 2024 22:05:12 GMT+0000 (Coordinated Universal Time)

@saharmess #mysql

star

Mon Nov 25 2024 21:10:01 GMT+0000 (Coordinated Universal Time)

@webisko #javascript

star

Mon Nov 25 2024 20:41:03 GMT+0000 (Coordinated Universal Time)

@marcopinero #html #javascript #cordova

star

Mon Nov 25 2024 19:16:39 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Mon Nov 25 2024 18:03:23 GMT+0000 (Coordinated Universal Time)

@Narendra

star

Mon Nov 25 2024 15:49:18 GMT+0000 (Coordinated Universal Time)

@rick_m #powershell

star

Mon Nov 25 2024 15:23:52 GMT+0000 (Coordinated Universal Time)

@khairo0311

star

Mon Nov 25 2024 13:47:36 GMT+0000 (Coordinated Universal Time) https://appticz.com/gett-clone

@aditi_sharma_

star

Mon Nov 25 2024 12:11:16 GMT+0000 (Coordinated Universal Time) https://maticz.com/real-estate-tokenization-services

@jamielucas

star

Mon Nov 25 2024 10:34:06 GMT+0000 (Coordinated Universal Time) https://jsdev.space/directional-hover-effect/?ref=dailydev

@rstringa

star

Mon Nov 25 2024 08:51:27 GMT+0000 (Coordinated Universal Time)

@javalab

star

Mon Nov 25 2024 08:48:45 GMT+0000 (Coordinated Universal Time)

@javalab

star

Mon Nov 25 2024 08:44:26 GMT+0000 (Coordinated Universal Time)

@javalab

star

Mon Nov 25 2024 06:54:33 GMT+0000 (Coordinated Universal Time) https://chatgpt.com/c/67441edb-cd9c-8004-823a-3e9415658214

@ergergergerg

star

Mon Nov 25 2024 06:23:20 GMT+0000 (Coordinated Universal Time)

@iliavial

star

Mon Nov 25 2024 04:55:43 GMT+0000 (Coordinated Universal Time) https://generatewp.com/post-type/

@bbexperience

star

Mon Nov 25 2024 04:28:01 GMT+0000 (Coordinated Universal Time)

@lahi2010

star

Sun Nov 24 2024 23:20:17 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Sun Nov 24 2024 21:42:50 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Sun Nov 24 2024 21:00:54 GMT+0000 (Coordinated Universal Time) https://support.hivebrite.com/hc/en-us/articles/12765100278428-User-fields-Standard-and-Custom-Customization-and-creation

@ackt

star

Sun Nov 24 2024 15:27:26 GMT+0000 (Coordinated Universal Time) https://appledora.hashnode.dev/outreach-bw3?source

@SamiraYS

star

Sun Nov 24 2024 14:53:12 GMT+0000 (Coordinated Universal Time) https://pastecode.io/

@censored #c#

star

Sun Nov 24 2024 14:43:48 GMT+0000 (Coordinated Universal Time) https://pastecode.io/

@censored #c#

star

Sun Nov 24 2024 14:43:16 GMT+0000 (Coordinated Universal Time) https://pastecode.io/

@censored

star

Sun Nov 24 2024 13:02:32 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/cpp/trycpp.asp?filename

@mohmmed #undefined

star

Sun Nov 24 2024 12:50:34 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/cpp/trycpp.asp?filename

@mohmmed

star

Sun Nov 24 2024 11:48:34 GMT+0000 (Coordinated Universal Time)

@seb_prjcts_be

Save snippets that work with our extensions

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