Snippets Collections
void insertAtTail(node *&tail, int d) {
  node *temp = new node(d);
  tail->next = temp;
  tail = temp;
}
void insertAtHead(node *&head, int d) {
  node *temp = new node(d);
  temp->next = head;
  head = temp;
}
void deleteNode(node *&head, int position) {
  if (position == 1) {
    node *temp = head;
    head = head->next;
    temp->next = NULL;
    delete temp;
  }

  else {
    node *curr = head;
    node *prev = NULL;
    int cnt = 1;
    while (cnt < position) {
      prev = curr;
      curr = curr->next;
      cnt++;
    }
    prev->next = curr->next;
    curr->next = NULL;
    delete curr;
  }
}
const test = [3, 5, 6, 7, 8, 0, "", null, undefined, "testing"];


 test.forEach(listItem);

function listItem(item, number, total) {
    return `<li class="${number}">${item} ${number} of ${total}</li>`;
}


let htmlDOM = `<ul>${test.map((item, index, array) => listItem(item, `${index + 1}`, `${array.length}`)).join("")}</ul>`;
  

//console.log(htmlDOM);

/**

'<ul><li class="1">3 1 of 10</li><li class="2">5 2 of 10</li><li class="3">6 3 of 10</li><li class="4">7 4 of 10</li><li class="5">8 5 of 10</li><li class="6">0 6 of 10</li><li class="7"> 7 of 10</li><li class="8">null 8 of 10</li><li class="9">undefined 9 of 10</li><li class="10">testing 10 of 10</li></ul>'

*/


(function () {
  "use strict";

  const person = {
    name: "John Doe",
    age: 30,
    hobbies: ["reading", "traveling", "coding"],
  };

  const { hobbies, name, age } = person; // descructure

  hobbies.forEach((item, idx) => passInfo(item, idx, { name, age })); // pass function into the foreach

  function passInfo(item, idx, ...args) {
    console.log({ item, idx, args });
  }
})();



// another example

const test = [3, 5, 6, 7, 8, 0, "", null, undefined, "testing"];

test.forEach(listItem);


 function listItem(item, number, total) {
    return `<li class="${number}">${item} ${number} of ${total}</li>`;
  }
{
  "eventId": 168,
  "associationId": 72,
  "eventTypeId": 2,
  "title": "Tech Conference 2024",
  "description": "A conference for tech enthusiasts to share ideas and innovations.",
  "cityId": 148013,
  "stateId": 32,
  "countryId": 1,
  "eventModeId": 45,
  "registrationStartDate": "2024-07-17T06:32:21.324Z",
  "registrationEndDate": "2024-07-18T06:32:21.324Z",
  "eventStartDate": "2024-07-18T06:32:21.324Z",
  "eventEndDate": "2024-07-23T06:32:21.324Z",
  "broucherUrl": "",
  "address": "Madhapur",
  "videoUrl": "https://youtube.com/shorts/t6SLjTQbPh0?si=gJ9_eiYVqS3JFsGJ",
  "eventStatusId": 0,
  "phoneCode": "+91",
  "phoneCountryId": 1,
  "contactNumber": "7898561235",
  "contactEmail": "contact@sustainablefuture.com",
  "webSite": "https://sustainablefutureforum.com",
  "geolocation": {
    "x": 17.419791987251436,
    "y": 78.32488111758651
  },
  "isFreeEvent": true,
   "noOfSeats": 100,
   "categoryId": 6,
}
// Splide JS
function splide_js_script () {
    wp_enqueue_script( 'splide-js', 'https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/js/splide.min.js', null, null, true );
    wp_enqueue_style('splide-css', 'https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/css/splide.min.css');
}
add_action( 'wp_enqueue_scripts', 'splide_js_script' );
import React, { useCallback, useEffect, useState } from 'react';
import { NavLink, useParams } from 'react-router-dom';
import Loader from '../common/components/Loader';
import { IRouteParams } from '../common/interfaces/IRouteParams';
import Repository from '../common/repository/repository';
import { AssetType, IAsset } from './interfaces/IAsset';
import styled from 'styled-components';
import config from '../config.json';
import Title from '../common/components/LayoutComponents/Title';
// import { Button, Col, Input, Row, UncontrolledAlert } from 'reactstrap';
import { Button, Col, Form, FormGroup, Input, Label, Row, UncontrolledAlert } from 'reactstrap';
import Asset from '../composition_riv/components/Asset';
import { IApiPostResponse } from '../common/interfaces/IApiPostResponse';
import { formatDateString } from '../common/utils/Date';
import AppRoutes from '../AppRoutes';
import { useTranslations } from '../i18n/useTranslations';
import * as Constants from "../common/constants/library-constants";
import * as Global_Constants from "../common/constants/shared-constants";
import * as Dam_Constants from "../digital_assets_management/constants/dam-constants";

const AssetContainer = styled.div`
  overflow-y: auto;
  height:100%;
  
`;

const AssetDiv = styled.div`
  display: flex;
  flex-direction: column;
`;

const AssetIllustration = styled.div`
  width: 100%;
  max-height: 270px;
  height: 270px;
  display: flex;
  justify-content: center;

  .sdc-asset {
    &.sdc-playlist {
      height: 100%;
      width: 100%;
    }
  }
`;

const AssetPropertyTitle = styled.div`
  width: 100%;
  font-weight: bold;
  justify-content: top;
`;

const AssetTagsContainer = styled.div`
  width: 100%;
  display: flex;
  width: 9rem;
`;

const TagContainer = styled.div.attrs({
  'data-testid': 'new-asset-tag-container',
})`
  display: flex;
  align-items: center;
  width: 9rem;
  padding-bottom: 0.25rem;
`;
const ScrollableContainer = styled.div`
 	 max-height: 270px;
 		  overflow-y: auto;
 		  width: 100%;
 		`;
const TagsList = styled.div.attrs({
  className: 'col-sm-9',
})`
  display: flex;
  flex-wrap: wrap;
`;

const TagButton = styled.i`
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  color: darkred;
`;

export const AssetDetails = () => {
  const i18n = useTranslations()
  const [changeNameErrorMessage, setChangeNameErrorMessage] = useState('');
  const [tagsErrorMessage, setTagsErrorMessage] = useState('');
  const [resultLoaded, setResultLoaded] = useState(false);
  const [assetVersions, setAssetVersions] = useState([] as IAsset[]);
  const [selectedAsset, setSelectedAsset] = useState(null as unknown as IAsset);
  const [selectedAssetIndex, setSelectedAssetIndex] = useState(0);
  const [selectedAssetRoute, setSelectedAssetRoute] = useState<
    string | undefined
  >('');
  const [showEditNameForm, setShowEditNameForm] = useState(false);
  const [newAssetName, setNewAssetName] = useState('');
  const [newTag, setNewTag] = useState('');
  const [sequencesForScene, setSequencesForScene] = useState<IAsset[]>([]);
  const { id } = useParams<IRouteParams>();

  const retrieveAssetVersions = useCallback(async () => {
    setResultLoaded(false);

    const assets = await Repository.getInstance().getAssetVersions(
      parseInt(id)
    );

    setAssetVersions(assets);
    if (
      assets !== null &&
      assets[selectedAssetIndex] !== undefined &&
      assets[selectedAssetIndex] !== null
    ) {
      setSelectedAsset(assets[selectedAssetIndex]);
      setSelectedAssetRoute(assetToRoute(assets[selectedAssetIndex]));
    } else {
      setSelectedAsset(null as unknown as IAsset);
    }
    setResultLoaded(true);
  }, [id, selectedAssetIndex]);

  useEffect(() => {
    retrieveAssetVersions();
  }, [retrieveAssetVersions]);

  useEffect(() => {
    if (!selectedAsset) return;
    if (selectedAsset.file_type !== AssetType.Scene) return;
    const retrieveSequences = async () => {
      const sequenceNames =
        await Repository.getInstance().getSequencesUsingScene(
          selectedAsset.name
        );
      setSequencesForScene(sequenceNames);
    };
    retrieveSequences();
  }, [selectedAsset]);

  function changeSelectedVersion(e: React.ChangeEvent<HTMLInputElement>) {
    const selectedId = e.target.value;
    const selectedIndex = assetVersions.findIndex((ast) => ast.id.toString() === selectedId);
    setSelectedAssetIndex(selectedIndex);
  }

  function toggleEditNameForm() {
    setShowEditNameForm(!showEditNameForm);
  }

  function changeNewAssetName(evt: React.ChangeEvent<HTMLInputElement>) {
    setNewAssetName(evt.target.value);
  }

  function changeNewTag(evt: React.ChangeEvent<HTMLInputElement>) {
    setNewTag(evt.target.value);
  }

  function validateNewNameForm() {
    return newAssetName !== '' && newAssetName !== selectedAsset?.name;
  }

  async function sendNewName() {
    setChangeNameErrorMessage('');
    setResultLoaded(false);

    const data = new FormData();
    data.append('newName', newAssetName);
    const apiResponse = new IApiPostResponse();
    await Repository.getInstance().editAssetName(
      selectedAsset?.id,
      data,
      apiResponse,
      i18n(Global_Constants.GLOBAL, Dam_Constants.CHECK_NETWORK_STATUS)
    );
    if (apiResponse.errorMessage != null) {
      setChangeNameErrorMessage(apiResponse.errorMessage);
    }
    await retrieveAssetVersions();
  }

  async function removeTag(tagId: number) {
    setResultLoaded(false);
    await Repository.getInstance().removeTagFromAsset(selectedAsset?.id, tagId);
    await retrieveAssetVersions();
  }

  async function addTag(tagName: string) {
    if (selectedAsset?.tags.findIndex((t) => t.name === tagName) !== -1) return;

    setTagsErrorMessage('');
    setResultLoaded(false);

    const data = new FormData();
    data.append('assetId', selectedAsset?.id.toString());
    data.append('tagName', tagName);

    const apiResponse = new IApiPostResponse();
    await Repository.getInstance().addTagToAsset(data, apiResponse);
    if (apiResponse.errorMessage != null) {
      setTagsErrorMessage(apiResponse.errorMessage);
    }
    setNewTag('');
    await retrieveAssetVersions();
  }

  const setAssetIsSubstitution = async (checked: boolean) => {
    setResultLoaded(false);
    if (checked)
      await Repository.getInstance().setIsSubstitutionAsset(selectedAsset.id);
    else
      await Repository.getInstance().UnsetIsSubstitutionAsset(selectedAsset.id);
    await retrieveAssetVersions();
  };

  const assetTypeToDescription = (assetType: AssetType) => {
    const types = new Map([
      [AssetType.Image, 'Image'],
      [AssetType.Scene, 'Scene'],
      [AssetType.Sound, 'Son'],
      [AssetType.Video, 'Vidéo'],
      [AssetType.Sequence, 'Séquence'],
      [AssetType.Text, 'Texte'],
      [AssetType.Font, 'Police'],
      [AssetType.Style, 'Style'],
      [AssetType.PredefMessage, 'Message'],
      [AssetType.Programmation, 'Programmation'],
    ]);
    return types.get(assetType);
  };

  const assetToRoute = (asset: IAsset) => {
    const types = new Map([
      [AssetType.Sequence, AppRoutes.sequence(asset.id.toString())],
      [AssetType.Scene, AppRoutes.editor(asset.id.toString())],
      [
        AssetType.PredefMessage,
        AppRoutes.predefinedMessage(asset.id.toString()),
      ],
      [AssetType.Playlist, AppRoutes.audioPlaylist(asset.id.toString())],
      [AssetType.Style, AppRoutes.style(asset.id.toString())],
      [AssetType.Programmation, AppRoutes.programmation(asset.id.toString())],
    ]);

    return types.get(asset.file_type);
  };

  return (
    <AssetContainer>
      {!resultLoaded && <Loader />}
      <Title>{i18n(Global_Constants.LIBRARY, Constants.RESOURCE_DETAILS)}: {selectedAsset?.name}</Title>
      <Form>
        <AssetDiv>
          <AssetIllustration>
            {selectedAsset && <Asset asset={selectedAsset} />}
          </AssetIllustration>

          <FormGroup row >
            <Label for="version" sm={3}><AssetPropertyTitle>Version</AssetPropertyTitle></Label>
            <Col sm={3}>
              <Input
                type="select"
                id="version"
                value={selectedAsset?.id}
                onChange={changeSelectedVersion}
                disabled={!assetVersions || !assetVersions.length || assetVersions.length === 1}
              >
                {assetVersions?.map((asset, index) => (
                  <option key={`${asset.version}-${index}`} value={asset.id}>
                    {asset.version}
                  </option>
                ))}
              </Input>
            </Col>
          </FormGroup>

          <FormGroup row>
            <Label for="assetName" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.GLOBAL, Global_Constants.NAME)}</AssetPropertyTitle></Label>
            <Col sm={3}>
              <div className="d-flex align-items-center">
                {selectedAsset?.name}
                <i
                  className={`ms-1 fa fa-lg fa-pencil-square${showEditNameForm ? '' : '-o'}`}
                  style={{ cursor: 'pointer' }}
                  onClick={toggleEditNameForm}
                />
              </div>
            </Col>
          </FormGroup>

          {showEditNameForm && (
            <FormGroup row>
              <Label for="newAssetName" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.LIBRARY, Constants.NEW_NAME)}</AssetPropertyTitle></Label>
              <Col sm={3}>
                <Input
                  type="text"
                  id="newAssetName"
                  value={newAssetName}
                  onChange={changeNewAssetName}
                  placeholder={selectedAsset.name}
                />
                <Button
                  className="btn btn-danger mt-1"
                  disabled={!validateNewNameForm()}
                  onClick={sendNewName}
                >
                  {i18n(Global_Constants.LIBRARY, Global_Constants.CHANGE)}
                </Button>
              </Col>
              {changeNameErrorMessage && (
                <UncontrolledAlert color="danger">
                  Error: {changeNameErrorMessage}
                </UncontrolledAlert>
              )}
            </FormGroup>
          )}

          <FormGroup row>
            <Label for="creationDate" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.GLOBAL, Global_Constants.CREATION_DATE)}</AssetPropertyTitle></Label>
            <Col sm={3}>
              <Input type="text" id="creationDate" value={formatDateString(selectedAsset?.created_at)} readOnly />
            </Col>
          </FormGroup>

          <FormGroup row>
            <Label for="modificationDate" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.GLOBAL, Global_Constants.LAST_MODIFICATION_DATE)}</AssetPropertyTitle></Label>
            <Col sm={3}>
              <Input type="text" id="modificationDate" value={formatDateString(selectedAsset?.updated_at)} readOnly />
            </Col>
          </FormGroup>

          <FormGroup row>
            <Label for="resourceType" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.LIBRARY, Constants.RESOURCE_TYPE)}</AssetPropertyTitle></Label>
            <Col sm={3}>
              <Input type="text" id="resourceType" value={assetTypeToDescription(selectedAsset?.file_type)} readOnly />
            </Col>
          </FormGroup>

          <FormGroup row>
            <Label for="dimension" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.LIBRARY, Constants.SIZE)}</AssetPropertyTitle></Label>
            <Col sm={3}>
              <Input type="text" id="dimension" value={String(selectedAsset?.dimension)} readOnly />
            </Col>
          </FormGroup>

          {selectedAsset && (selectedAsset?.file_type === AssetType.Image || selectedAsset?.file_type === AssetType.Text || selectedAsset?.file_type === AssetType.Style) && (
            <FormGroup row>
              <Label for="substitute" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.LIBRARY, Constants.SUBSTITUTE_MESSAGE)}</AssetPropertyTitle></Label>
              <Col sm={3}>
                <Input
                  id="isSubstitution"
                  type="checkbox"
                  className="form-check-input"
                  checked={selectedAsset?.isSubstitution ?? false}
                  onChange={(e) => setAssetIsSubstitution(e.target.checked)}
                />
              </Col>
            </FormGroup>
          )}

          <FormGroup row>
            <Label for="keywords" sm={3}><AssetPropertyTitle>{i18n(Global_Constants.LIBRARY, Constants.KEYWORDS)}</AssetPropertyTitle></Label>
            <Col sm={3}>
              <AssetTagsContainer>
                <TagsList>
                  {selectedAsset?.tags.map((tag, i) => (
                    <TagContainer key={`asset-tag-${selectedAsset.name}-${i}`}>
                      <Input type="text" value={tag.name} readOnly />
                      <TagButton className="fa fa-xs fa-close" onClick={() => removeTag(tag.id)} />
                    </TagContainer>
                  ))}
                  <TagContainer>
                    <Input
                      type="text"
                      id="new-asset-tag"
                      value={newTag}
                      placeholder={i18n(Global_Constants.LIBRARY, Constants.KEYWORD)}
                      onChange={changeNewTag}
                    />
                    <TagButton className={`fa fa-plus ${newTag === '' ? 'sdc-disabled' : ''}`} onClick={() => addTag(newTag)} />
                  </TagContainer>
                </TagsList>
              </AssetTagsContainer>
              {tagsErrorMessage && (
                <UncontrolledAlert color="danger">
                  Error: {tagsErrorMessage}
                </UncontrolledAlert>
              )}
            </Col>
          </FormGroup>

          {selectedAsset?.file_type === AssetType.Scene && sequencesForScene.length > 0 && (
            <FormGroup row>
              <Label for="sequences" sm={3}><AssetPropertyTitle>Utilized in sequences</AssetPropertyTitle></Label>
              <Col sm={3}>
                {sequencesForScene.map((s) => (
                  <div key={`seq-for-scene-${s.name}`}>
                    <NavLink to={AppRoutes.assetDetails(s.id.toString())}>
                      {s.name}
                    </NavLink>
                  </div>
                ))}
              </Col>
            </FormGroup>
          )}

          {selectedAssetRoute && (
            <div>
              <NavLink className="btn btn-secondary" to={selectedAssetRoute}>
                {i18n(Global_Constants.INFORMATION, Global_Constants.MODIFY_BUTTON)}
              </NavLink>
            </div>
          )}
        </AssetDiv>
      </Form>
    </AssetContainer>
  );
};

export default AssetDetails;
<div class="bottom-row">
    <div class="footer-nav">
        <small>
            <ul>
                <li>
                    <a href="/returnpolicy">Policy</a>
                </li>
                <li>
                    <a href="/privacypolicy">Privacy</a>
                </li>
                <li>
                    <a href="/termsandconditions">Terms</a>
                </li>
                <li>
                    <a href="/sitemap">Site Map</a>
                </li>
            </ul>
        </small>
    </div>
	<div class="footer-copyright">
        <a href="https://www.dealerspike.com/" target="_blank" title="Powered by Dealer Spike">
            <small>Copyright© <script>document.write(new Date().getFullYear())</script> Dealer Spike | All Rights Reserved</small>
        </a>
    </div>
	<div class="footer-ds-logo">
		<a href="https://www.dealerspike.com" title="Powered by Dealer Spike" target="_blank">
			<img src="//published-assets.ari-build.com/Content/Published/Site/{{Site.Id}}/images/ds-logo.png" alt="Powered by Dealer Spike" width="101" height="auto">
		</a>
	</div>
</div>
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
# Download the latest available Chrome for Testing binary corresponding to the Stable channel.
npx @puppeteer/browsers install chrome@stable

# Download a specific Chrome for Testing version.
npx @puppeteer/browsers install chrome@116.0.5793.0

# Download the latest available ChromeDriver version corresponding to the Canary channel.
npx @puppeteer/browsers install chromedriver@canary

# Download a specific ChromeDriver version.
npx @puppeteer/browsers install chromedriver@116.0.5793.0
SELECT 
    CASE 
        WHEN column1 IS NULL OR column1 = 0 THEN column2
        ELSE column1
    END AS result_column
FROM example_table;


SELECT 
    COALESCE(NULLIF(column1, 0), column2) AS result_column
FROM example_table;

AND CAST(CC.EDITDATE AS DATE) > CAST(DATEADD(DAY, -1, GETDATE()) AS DATE)
--AND CONVERT(DATE,(CC.EDITDATE)) = CONVERT(DATE, DATEADD(DAY, -30 , GETDATE()))
{'envs': [{'type': 'encrypted', 'value': 'Na1IRD7uhchPTvv3Io4QaJmef0GiPPkYS/j+CUSGXsY=', 'target': ['production'], 'configurationId': None, 'comment': '', 'id': 'GUetd8WLeysIWAZN', 'key': 'TEST3', 'createdAt': 1721114058202, 'updatedAt': 1721114058202, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'vsmValue': 'eyJ2IjoidjIiLCJjIjoiN0tpWkQrSEJGM2V3ZE9hK0RIUDYrZmpqOW5SZ0hsQzg5NUVEWm00Wm9NUmRrektRaVVUc25tYWFPN1VNSjFQN28vbmVLRTRoWWlZUWlXaDFXVzdyc2hNNlhGaDE4Z2ZCa1d1QzdRPT0iLCJrIjpbMTg0LDEsMiwzLDAsMTIwLDExNSwxNjMsMTYxLDI4LDE3NiwxNDgsOTksMTY1LDI0NiwyMjcsMjQ0LDIzMyw0NywxNTMsNjMsOTQsMTM5LDEsMjQzLDEwLDMwLDgxLDE0NSw2Myw1OSwxOTMsMzQsMTA5LDE1OCw4LDczLDExNywxLDM0LDEyMSwxNDYsMTE1LDc0LDc4LDE0NywxMzksMTQ0LDE0NywyMjUsMzEsMjA2LDE2MywyMzMsMTk2LDAsMCwwLDEyNiw0OCwxMjQsNiw5LDQyLDEzNCw3MiwxMzQsMjQ3LDEzLDEsNyw2LDE2MCwxMTEsNDgsMTA5LDIsMSwwLDQ4LDEwNCw2LDksNDIsMTM0LDcyLDEzNCwyNDcsMTMsMSw3LDEsNDgsMzAsNiw5LDk2LDEzNCw3MiwxLDEwMSwzLDQsMSw0Niw0OCwxNyw0LDEyLDE4OSwxMDQsMjM2LDEyMiwxNDUsMyw4LDE5MSwzNywyNywyNywyMjQsMiwxLDE2LDEyOCw1OSwyNTEsMjEwLDIyMCw3Niw2NiwxMyw4MywxNTgsMjE1LDE0OSw2OSwxNTcsOTAsMTM5LDExLDQwLDI0NSwxNjMsMTIzLDExNywxMzIsNzIsNTMsNjUsMTA3LDIyLDEyNywxNSwyMTgsMjI4LDk1LDE3MSwxOTYsNzksMjA3LDIxLDExMSwxNzQsMjIxLDE5MiwxMDEsNDAsMjQwLDEzOCwxMzgsMjUsMTczLDE3MSwyMywxOTUsOTIsMTYsMSw2Miw3MCwxNDcsMTgzLDIwNiwxMzddfQ==', 'decrypted': False, 'lastEditedByDisplayName': 'Chiranjeevi Tirunagari'}, {'type': 'encrypted', 'value': '8uTSK+Bz1Y1VbOCgq92DI0kQ92nrR3GClP52bULsgnY=', 'target': ['development', 'preview'], 'configurationId': None, 'comment': '', 'id': 'HCtPog8aPyhaWhSw', 'key': 'TEST3', 'createdAt': 1721114049773, 'updatedAt': 1721114049773, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'vsmValue': 'eyJ2IjoidjIiLCJjIjoiUWZEQjdzQXU3ME9aakV5aW5NWlJCNFdZc3BDSjZ6Q3VlUHUyRXRCTnVKdEJMTTdMcEdaTCtiYWNhUGhzWGNjSEovR1BTRElUSmI0aHlDMXVzNUROcUI2YzZwUCswWGx2T3F2KzJ3PT0iLCJrIjpbMTg0LDEsMiwzLDAsMTIwLDExNSwxNjMsMTYxLDI4LDE3NiwxNDgsOTksMTY1LDI0NiwyMjcsMjQ0LDIzMyw0NywxNTMsNjMsOTQsMTM5LDEsMjQzLDEwLDMwLDgxLDE0NSw2Myw1OSwxOTMsMzQsMTA5LDE1OCw4LDczLDExNywxLDM0LDEyMSwxNDYsMTE1LDc0LDc4LDE0NywxMzksMTQ0LDE0NywyMjUsMzEsMjA2LDE2MywyMzMsMTk2LDAsMCwwLDEyNiw0OCwxMjQsNiw5LDQyLDEzNCw3MiwxMzQsMjQ3LDEzLDEsNyw2LDE2MCwxMTEsNDgsMTA5LDIsMSwwLDQ4LDEwNCw2LDksNDIsMTM0LDcyLDEzNCwyNDcsMTMsMSw3LDEsNDgsMzAsNiw5LDk2LDEzNCw3MiwxLDEwMSwzLDQsMSw0Niw0OCwxNyw0LDEyLDE4OSwxMDQsMjM2LDEyMiwxNDUsMyw4LDE5MSwzNywyNywyNywyMjQsMiwxLDE2LDEyOCw1OSwyNTEsMjEwLDIyMCw3Niw2NiwxMyw4MywxNTgsMjE1LDE0OSw2OSwxNTcsOTAsMTM5LDExLDQwLDI0NSwxNjMsMTIzLDExNywxMzIsNzIsNTMsNjUsMTA3LDIyLDEyNywxNSwyMTgsMjI4LDk1LDE3MSwxOTYsNzksMjA3LDIxLDExMSwxNzQsMjIxLDE5MiwxMDEsNDAsMjQwLDEzOCwxMzgsMjUsMTczLDE3MSwyMywxOTUsOTIsMTYsMSw2Miw3MCwxNDcsMTgzLDIwNiwxMzddfQ==', 'decrypted': False, 'lastEditedByDisplayName': 'Chiranjeevi Tirunagari'}, {'type': 'encrypted', 'value': 'VthAYNl9F6jelOiJ+QpYjZVNn4cT2QjAsr/9jsnUfao=', 'target': ['development', 'preview', 'production'], 'configurationId': None, 'id': '9KaKpHEVEIQxqT5U', 'key': 'TEST2', 'createdAt': 1721114034269, 'updatedAt': 1721114034269, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'vsmValue': 'eyJ2IjoidjIiLCJjIjoibE9tMnZpay9POTAwRXdaK1pYdFlVWUlCeVhnVDBhSlZZZkIySnJyRTNmall1b0JzNVlLTHcxYlJFNTRleHZTcVlDdkVVUkgzQzUxMExCekhaTnBncHFhS1dtdnRnUXJqZ2JXRHpHdDFWaWM9IiwiayI6WzE4NCwxLDIsMywwLDEyMCwxMTUsMTYzLDE2MSwyOCwxNzYsMTQ4LDk5LDE2NSwyNDYsMjI3LDI0NCwyMzMsNDcsMTUzLDYzLDk0LDEzOSwxLDI0MywxMCwzMCw4MSwxNDUsNjMsNTksMTkzLDM0LDEwOSwxNTgsOCw3MywxMTcsMSw3LDU4LDExNiwxMTIsMTA5LDgsMjIsMTYxLDIwNCwyMjksMjAwLDE3MywxNjQsMTUzLDcyLDM0LDAsMCwwLDEyNiw0OCwxMjQsNiw5LDQyLDEzNCw3MiwxMzQsMjQ3LDEzLDEsNyw2LDE2MCwxMTEsNDgsMTA5LDIsMSwwLDQ4LDEwNCw2LDksNDIsMTM0LDcyLDEzNCwyNDcsMTMsMSw3LDEsNDgsMzAsNiw5LDk2LDEzNCw3MiwxLDEwMSwzLDQsMSw0Niw0OCwxNyw0LDEyLDEwMSwyMDYsMTU1LDkxLDg2LDQ0LDQzLDk4LDEwNSwyMTIsMjMzLDI1MCwyLDEsMTYsMTI4LDU5LDEzNiwzMywyMCwxMzEsMTg1LDE1Niw4MSwzMSwxLDI0MSw1MSwxNTIsOTMsMjQsMzUsMCwyMDksMjUzLDYwLDEwNywxMjEsOCwzMCwxNjAsNzIsMTQ5LDIxMSwxOTEsMjI1LDEyNCwxNjIsOCwxOCw0MSwyMzcsODEsODcsNjksMCwxNTksMTUzLDEwLDE3NSwyMjksMjcsMTYzLDIsMTk1LDEwNiw5MiwxNTUsMjA1LDgxLDEzMiwxOTcsMzAsMjMyLDY0LDE0NV19', 'decrypted': False, 'lastEditedByDisplayName': 'Chiranjeevi Tirunagari'}, {'type': 'encrypted', 'value': 'ZmSwfuTbZ4MRBTrCUTuLyDS9SXlSj5qvkCoujMAJyQ4=', 'target': ['development', 'preview', 'production'], 'configurationId': None, 'comment': '', 'id': 'UtjkbLwia47Ac1vr', 'key': 'TEST1', 'createdAt': 1721114034267, 'updatedAt': 1721114034267, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'vsmValue': 'eyJ2IjoidjIiLCJjIjoiUXNBM3FHUkJqS014blRTcEZVdGZwVGdXSU0yZ210SWxnd0d4QmZURzFjZFZvdEREK0Z3anVYc3pwYTBrdEhURUVrN2ZUcVBGb2RrbG1WbWV2bEZpdjJZaUFncHlxQUFZMkVTOUFibW9sMFU9IiwiayI6WzE4NCwxLDIsMywwLDEyMCwxMTUsMTYzLDE2MSwyOCwxNzYsMTQ4LDk5LDE2NSwyNDYsMjI3LDI0NCwyMzMsNDcsMTUzLDYzLDk0LDEzOSwxLDI0MywxMCwzMCw4MSwxNDUsNjMsNTksMTkzLDM0LDEwOSwxNTgsOCw3MywxMTcsMSwyMDMsMTk5LDIwOCwxNzksMTQ4LDE1NiwxNDQsMTUxLDcxLDkxLDEzMCwxNTcsMjYsMTUwLDY3LDE2OSwwLDAsMCwxMjYsNDgsMTI0LDYsOSw0MiwxMzQsNzIsMTM0LDI0NywxMywxLDcsNiwxNjAsMTExLDQ4LDEwOSwyLDEsMCw0OCwxMDQsNiw5LDQyLDEzNCw3MiwxMzQsMjQ3LDEzLDEsNywxLDQ4LDMwLDYsOSw5NiwxMzQsNzIsMSwxMDEsMyw0LDEsNDYsNDgsMTcsNCwxMiwxNywxNTYsMjE3LDIxMyw1Miw0MCw1MSwyMTgsMTQ0LDU0LDQyLDI0NSwyLDEsMTYsMTI4LDU5LDIwNSwxOTUsMTQzLDExOCwyMTksMjAzLDE3NiwxNywxMDIsODIsNjcsMzYsODMsMTk5LDE4MSw3MSwxNzMsNjMsNTksMTI5LDE5MCw3Niw2MywxODMsMTgzLDIwMiwyNywxNDgsNDAsMTk0LDE4OSwyNDEsMTcsNSw1MywyMywxMzMsMTYyLDEyMiw2Myw1MSw1NywyMzYsMTg3LDIwMCw5NiwxOSwyNDksMjI0LDIzMiw5OSwxNzMsMjQ1LDUwLDI1NCwxMSwxNzYsMjA5LDE3MF19', 'decrypted': False, 'lastEditedByDisplayName': 'Chiranjeevi Tirunagari'}]}
{'type': 'encrypted', 'value': 'third', 'target': ['production'], 'configurationId': None, 'comment': '', 'id': 'KJhnBWOrfs34dU2Q', 'key': 'TEST3', 'createdAt': 1721122368822, 'updatedAt': 1721122368822, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'decrypted': True}
{'type': 'encrypted', 'value': 'second', 'target': ['development', 'preview', 'production'], 'configurationId': None, 'id': 'DUF1G3ZywlIC9bXx', 'key': 'TEST2', 'createdAt': 1721122359445, 'updatedAt': 1721122359445, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'decrypted': True}
{'type': 'encrypted', 'value': 'first', 'target': ['development', 'preview', 'production'], 'configurationId': None, 'comment': '', 'id': 'IMm31XhwQfnXFs2o', 'key': 'TEST1', 'createdAt': 1721122359442, 'updatedAt': 1721122359442, 'createdBy': 'XzsetEdmywh8V3I10cECAA7j', 'updatedBy': None, 'decrypted': True}
import os
import requests
import json
from dotenv import load_dotenv

# Load env from .env file.
load_dotenv()

'''
Step 1: Get all env variables.
'''

url_to_get_all_envs = (
    f"https://api.vercel.com/v9/projects/"
    f"{os.getenv('PROJECT_ID')}/env"
)
payload = {
    'decrypt': 'true',
    'slug': os.getenv('SLUG'),
    'source': 'vercel-cli:pull',
    'teamId': os.getenv('TEAM_ID')
}
headers = {
    'Authorization': f"Bearer {os.getenv('VERCEL_TOKEN')}",
    'Content-Type': 'application/json'
}

all_env_vars = requests.get(
    url_to_get_all_envs,
    params=payload,
    headers=headers
)

# Print the response in a safe environment if required.
all_env_vars = all_env_vars.json()['envs']


# Delete items which are not required for update endpoint from payload.
del payload['decrypt']
del payload['source']


for env in all_env_vars:
    # Update only if production is one of the targets of the variable.
    if 'production' in env['target'] and env['type'] != 'sensitive':

        '''
        Check if target array has development in it.
        Because development target cant have sensitive variables.
        '''

        targets = env['target'][:]
        if 'development' in targets:
            targets.remove('development')

        '''
        Step 2: Get decrypted value of each env variable.
        '''

        url_to_get_or_update_env = (
            f"https://api.vercel.com/v9/projects/"
            f"{os.getenv('PROJECT_ID')}/env/{env['id']}"
        )
        decrypted_env_response = requests.get(
            url_to_get_or_update_env,
            params=payload,
            headers=headers
        )
        decrypted_env = decrypted_env_response.json()
        # Print the response in a safe environment if required.

        '''
        Step 3: Update all variables to be sensitive if it has production
        target and also remove development target if exists.
        '''

        data = {
            'key': env['key'],
            'target': targets,
            'type': 'sensitive',
            'value': decrypted_env['value']
        }
        data = json.dumps(data)
        response = requests.patch(
            url_to_get_or_update_env,
            params=payload,
            headers=headers,
            data=data
        )
        # Print the response in a safe environment if required.

        '''
        Step 4: Recreate the variable with development target
        if it existed before updation in previous step.
        '''

        if 'development' in env['target']:
            data = {
                'key': env['key'],
                'target': ['development'],
                'type': 'encrypted',
                'value': decrypted_env['value']
            }

            data = json.dumps(data)
            url_to_create_env = (
                f"https://api.vercel.com/v9/projects/"
                f"{os.getenv('PROJECT_ID')}/env"
            )
            response = requests.post(
                url_to_create_env,
                params=payload,
                headers=headers,
                data=data
            )

            # Print the response in a safe environment if required.
for env in all_env_vars:
    # Update only if production is one of the targets of the variable.
    if 'production' in env['target'] and env['type'] != 'sensitive':

        '''
        Check if target array has development in it.
        Because development target cant have sensitive variables.
        '''

        targets = env['target'][:]
        if 'development' in targets:
            targets.remove('development')

        '''
        Step 2: Get decrypted value of each env variable.
        '''

        url_to_get_or_update_env = f"https://api.vercel.com/v9/projects/{os.getenv('PROJECT_ID')}/env/{env['id']}"
        decrypted_env_response = requests.get(
            url_to_get_or_update_env,
            params=payload,
            headers=headers
        )
        decrypted_env = decrypted_env_response.json()
        # Print the response in a safe environment if required.

        '''
        Step 3: Update all variables to be sensitive if it has production
        target and also remove development target if exists.
        '''

        data = {
            'key': env['key'],
            'target': targets,
            'type': 'sensitive',
            'value': decrypted_env['value']
        }
        data = json.dumps(data)
        response = requests.patch(
            url_to_get_or_update_env,
            params=payload,
            headers=headers,
            data=data
        )
        # Print the response in a safe environment if required.

        '''
        Step 4: Recreate the variable with development target
        if it existed before updation in previous step.
        '''

        if 'development' in env['target']:
            data = {
                'key': env['key'],
                'target': ['development'],
                'type': 'encrypted',
                'value': decrypted_env['value']
            }

            data = json.dumps(data)
            url_to_create_env = f"https://api.vercel.com/v9/projects/{os.getenv('PROJECT_ID')}/env"
            response = requests.post(
                url_to_create_env,
                params=payload,
                headers=headers,
                data=data
            )

            # Print the response in a safe environment if required.
for env in all_env_vars:
    # Update only if production is one of the targets of the variable.
    if 'production' in env['target'] and env['type'] != 'sensitive':

        '''
        Check if target array has development in it.
        Because development target cant have sensitive variables.
        '''

        targets = env['target'][:]
        if 'development' in targets:
            targets.remove('development')

        '''
        Step 2: Get decrypted value of each env variable.
        '''

        url_to_get_or_update_env = f"https://api.vercel.com/v9/projects/{os.getenv('PROJECT_ID')}/env/{env['id']}"
        decrypted_env_response = requests.get(
            url_to_get_or_update_env,
            params=payload,
            headers=headers
        )
        decrypted_env = decrypted_env_response.json()
        # Print the response in a safe environment if required.

        '''
        Step 3: Update all variables to be sensitive if it has production
        target and also remove development target if exists.
        '''

        data = {
            'key': env['key'],
            'target': targets,
            'type': 'sensitive',
            'value': decrypted_env['value']
        }
        data = json.dumps(data)
        response = requests.patch(
            url_to_get_or_update_env,
            params=payload,
            headers=headers,
            data=data
        )
        # Print the response in a safe environment if required.
# Delete items which are not required for update endpoint from payload.
del payload['decrypt']
del payload['source']


for env in all_env_vars:
    # Update only if production is one of the targets of the variable.
    if 'production' in env['target'] and env['type'] != 'sensitive':

        '''
        Check if target array has development in it.
        Because development target cant have sensitive variables.
        '''

        targets = env['target'][:]
        if 'development' in targets:
            targets.remove('development')

        '''
        Step 2: Get decrypted value of each env variable.
        '''

        url_to_get_or_update_env = f"https://api.vercel.com/v9/projects/{os.getenv('PROJECT_ID')}/env/{env['id']}"
        decrypted_env_response = requests.get(
            url_to_get_or_update_env,
            params=payload,
            headers=headers
        )
        decrypted_env = decrypted_env_response.json()
        # Print the response in a safe environment if required.
import os
import requests
import json
from dotenv import load_dotenv

# Load env from .env file.
load_dotenv()

'''
Step 1: Get all env variables.
'''

url_to_get_all_envs = f"https://api.vercel.com/v9/projects/{os.getenv('PROJECT_ID')}/env"
payload = {
    'decrypt': 'true',
    'slug': os.getenv('SLUG'),
    'source': 'vercel-cli:pull',
    'teamId': os.getenv('TEAM_ID')
}
headers = {
    'Authorization': f"Bearer {os.getenv('VERCEL_TOKEN')}",
    'Content-Type': 'application/json'
}

all_env_vars = requests.get(
    url_to_get_all_envs,
    params=payload,
    headers=headers
)

# Print the response in a safe environment if required.
all_env_vars = all_env_vars.json()['envs']
import os
import requests
import json
from dotenv import load_dotenv

# Load env from .env file
load_dotenv()
import os
import requests
import json
from dotenv import load_dotenv
PROJECT_ID=
SLUG=
TEAM_ID=
VERCEL_TOKEN=
%%[set @firstName = AttributeValue("First_Name__c")
set @UNvalue= "?" 
set @firstName = ProperCase(@firstName)
if @firstName == "unknown" OR IndexOf(@firstName,@UNvalue) > 0 then set @FirstName = "" endif
if not Empty(@firstName) then set @greeting = Concat(", ", @firstName)
else
set @greeting = ""
endif ]%%
import { useEffect, useRef, useState } from "react";
import {
  MultiLangListContainer,
  MultiLangListItemContainer,
  MultiLangTextContainer,
} from "../containers/Container";
import {
  MultiLangListContainerStyle,
  MultiLangListTextAnimationStyle,
  MultiLangTextContainerStyle,
} from "../styles/InlineStyles";
import { IMlTextProps, IMultilingualText } from "./MlFreeTextMessage";
import { GenericUtil } from "../../../common/utils/GenericUtil";
import { DDRPlaceholderSelector } from "../../../composition_riv/constants/RIV";

export const MultiLanguageText = ({
  fontSize,
  style,
  color,
  multilanguage,
  multiLineText,
  direction,
}: IMlTextProps) => {
  const [previous, setPrevious] = useState(multilanguage);
  const [previousDirection, setPreviousDirection] = useState(direction);
  const [languages, setLanguages] = useState<IMultilingualText[]>([]);
  const nextTextIndex = useRef(0);
  const arrayOfDivs = useRef<INode[]>([]);
  const uniqueId = useRef(GenericUtil.getInstance().getRandomID());

  interface INode {
    node: HTMLDivElement;
    id: string;
    pNode: Element | null;
  }

  interface IDivData {
    sampleText: string;
    localecode: string;
    duration: string;
  }

  const textInitialPosition: {
    [key: string]: {
      left: string;
      top: string;
    };
  } = {
    up: { left: "0%", top: "100%" },
    down: { left: "0%", top: "-100%" },
    right: { left: "100%", top: "0%" },
    left: { left: "-100%", top: "0%" },
  };
  useEffect(() => {
    if (previous !== multilanguage || direction !== previousDirection) {
      populateLanguageList();
    }
  }, [multilanguage, direction]);

  useEffect(() => {
    if (multilanguage) {
      populateLanguageList();
    }
    return () => {
      arrayOfDivs.current.map((elt) =>
        elt.node.removeEventListener("animationend", callAppendNextDiv)
      );
    };
  }, []);

  useEffect(() => {
    setMultilingualTexts();
  }, [multilanguage, direction]);
  function renderMultilanguageText(): IMultilingualText[] {

    const previousTextInfo = JSON.parse(String(multilanguage));

    return (

      Object.keys(previousTextInfo)

        .filter((lang) => previousTextInfo[lang].checked)

        .map((lang) => ({

          sampleText: previousTextInfo[lang].sampleText,

          localecode: previousTextInfo[lang].id,

        })) || []

    );

  }
  function populateLanguageList() {

    setPrevious(multilanguage);

    const language = renderMultilanguageText() || [];

    setLanguages(language);

  }
  function createDiv(divData: IDivData) {
    const div = document.createElement("div");
    div.classList.add("lang");
    div.id = "mlText" + divData.localecode;
    div.setAttribute("data-duration", divData.duration);
    div.setAttribute("data-direction", direction);
    div.style.position = "absolute";
    div.style.paddingLeft = "1rem";
    div.style.width = "100%";
    div.style.height = "100%";
    div.style.left = textInitialPosition[direction].left;
    div.style.top = textInitialPosition[direction].top;
    div.style.animationName = `multilingual-anim-${direction}`;
    div.style.animationDelay = "0s";
    div.style.animationDuration = divData.duration + "s";
    div.innerText = divData.sampleText;
    return div;
  }

  function appendDiv(divToAppend: INode, index: number) {
    const elt = divToAppend.node;
    nextTextIndex.current = index;
    if (divToAppend.pNode) {
      divToAppend.pNode.appendChild(elt);
    }
  }

  function appendNextDiv(index: number) {
    if (arrayOfDivs.current.length > 0) {
      index = (index + 1) % arrayOfDivs.current.length;
      appendDiv(arrayOfDivs.current[index], index);
    }
  }

  function callAppendNextDiv() {
    if (arrayOfDivs.current.length > 0) {
      appendNextDiv(nextTextIndex.current);
    }
  }

  function setMultilingualTexts() {
    if (!multilanguage) return;
    nextTextIndex.current = 0;
    const parentElement = document.getElementById(uniqueId.current);
    parentElement!.innerHTML = "";
    const previousTextInfo = JSON.parse(String(multilanguage));
    const checkedLanguages = Object.keys(previousTextInfo).filter(
      (lang) => previousTextInfo[lang].checked
    );
    const multilingualText = checkedLanguages.map((lang) => ({
      sampleText: previousTextInfo[lang].sampleText,
      localecode: previousTextInfo[lang].id,
      duration: previousTextInfo[lang].duration,
    }));
    const newArrayOfDivs = multilingualText
      .map((element) => {
        if (element.sampleText !== null && element.sampleText.trim() !== "") {
          const dynamicDiv = createDiv(element);
          dynamicDiv.addEventListener("animationend", callAppendNextDiv);
          return {
            node: dynamicDiv,
            id: dynamicDiv.id,
            pNode: parentElement,
          };
        }
        return null;
      })
      .filter((div): div is { node: HTMLDivElement; id: string; pNode: HTMLElement | null } => div !== null);

    arrayOfDivs.current = newArrayOfDivs;
    if (arrayOfDivs.current.length > 0) {
      appendDiv(arrayOfDivs.current[0], 0);
    }
  }
  const itemCount = languages.length;
  const isSameContent = () => {
    return previous === multilanguage && previousDirection === direction;
  };


  return (
    <MultiLangTextContainer style={MultiLangTextContainerStyle()}>
      <MultiLangListContainer
        id={uniqueId.current}
        className="multiLingual"
        style={MultiLangListContainerStyle(
          fontSize,
          color,
          multiLineText,
          style
        )}
      >
        {isSameContent() &&

          languages.map(
            (item: { sampleText: any; localecode: string }, index: number) => (
              <MultiLangListItemContainer
                className="multiLingual"
                style={MultiLangListTextAnimationStyle(
                  index * 12,
                  itemCount,
                  12,

                  direction

                )}

                key={`mlListItem${item.sampleText}${index}`}

                data-ddrvarid={`${DDRPlaceholderSelector.MultiLangFreeTextMessage}.${item.localecode}`}

              >

                {item.sampleText}

              </MultiLangListItemContainer>

            )

          )}

      </MultiLangListContainer>

    </MultiLangTextContainer>
  );
};
[Authorize(Policy = "Owner")]
[HttpGet]
[Route("SearchUsers")]
public async Task<IActionResult> SearchUsers([FromQuery] string? criteria) 
{
    try
    {
        if (string.IsNullOrEmpty(criteria)) // Check if criteria is null or empty
        {
            // If criteria is not provided, return all users
            var users = await _userManager.Users
                                         .Select(u => new SearchUserViewmodel
                                         {
                                             User_ID = u.User_ID,
                                             Name = u.Name,
                                             Surname = u.Surname
                                         })
                                         .ToListAsync();

            return Ok(users);
        }

        // If criteria is provided, filter users based on the criteria
        var filteredUsers = await _userManager.Users
                                              .Where(u => u.Name.Contains(criteria) || u.Surname.Contains(criteria))
                                              .Select(u => new SearchUserViewmodel
                                              {
                                                  User_ID = u.User_ID,
                                                  Name = u.Name,
                                                  Surname = u.Surname
                                              })
                                              .ToListAsync();

        if (filteredUsers == null || filteredUsers.Count == 0)
        {
            return NotFound("No users found.");
        }

        return Ok(filteredUsers);
    }
    catch (Exception)
    {
        return StatusCode(StatusCodes.Status500InternalServerError, "Internal Server Error. Please contact support.");
    }
}
lib/main.dart
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(MyApp());
}
//html
<div class="gym-manager-container">
    <div class="back-button">
      <button class="btn btn-link" (click)="goBack()">
        <i class="bi bi-arrow-left-circle"></i>Back
      </button>
    </div>
    <div class="content">
      <div class="header">
        <h1>Search Users</h1>
      </div>
  
      <input type="text" class="form-control mb-3" placeholder="Search User Types" [(ngModel)]="searchCriteria" (ngModelChange)="filterUsers()">
  
      <div class="table-responsive">
        <table class="table table-hover table-centered">
          <thead class="thead-light">
            <tr>
              <th>User ID</th>
              <th>Name</th>
              <th>Surname</th>
              <th>Actions</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let user of filteredUsers">
              <td>{{ user.user_ID }}</td>
              <td>{{ user.name }}</td>
              <td>{{ user.surname }}</td>
              <td>
                <button class="btn btn-link" (click)="openModal(user)">
                  <i class="fa fa-eye"></i> View
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  
    <div class="modal fade" id="userModal" tabindex="-1" aria-labelledby="userModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-lg">
        <div class="modal-content" style="text-align: center;">
          <div class="modal-header">
            <h5 class="modal-title" id="userModalLabel"><strong>User Details</strong></h5>
          </div>
          <div class="modal-body">
            <p><strong>User ID:</strong> {{ selectedUser?.user_ID }}</p>
            <p><strong>Name:</strong> {{ selectedUser?.name }}</p>
            <p><strong>Surname:</strong> {{ selectedUser?.surname }}</p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" (click)="closeModal()">Close</button>
          </div>
        </div>
      </div>
    </div>
  </div>
  
//TS
import { CommonModule } from '@angular/common';
import { Observable } from 'rxjs';
import { Component, OnInit } from '@angular/core';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { Router, RouterLink } from '@angular/router';
import { UserService } from '../Services/userprofile.service';
import { UserViewModel } from '../shared/search-user';
import { Location } from '@angular/common';
declare var $: any;

@Component({
  selector: 'app-member-manager',
  standalone: true,
  imports: [CommonModule, ReactiveFormsModule, FormsModule, RouterLink],
  templateUrl: './member-manager.component.html',
  styleUrl: './member-manager.component.css'
})
export class MemberManagerComponent implements OnInit {
  searchCriteria: string = '';
  users: UserViewModel[] = [];
  filteredUsers: UserViewModel[] = [];
  selectedUser: UserViewModel | null = null;

  constructor(private router: Router, private userService: UserService, private location: Location) { }

  ngOnInit(): void {
    this.loadUsers();
  }

  loadUsers(): void {
    this.userService.searchUsers('').subscribe(users => {
      this.users = users;
      this.filteredUsers = users;
    });
  }

  filterUsers(): void {
    const term = this.searchCriteria.toLowerCase();
    if (!term) {
      this.filteredUsers = this.users;
    } else {
      this.filteredUsers = this.users.filter(user =>
        user.user_ID.toString().includes(term) ||
        user.name.toLowerCase().includes(term) ||
        user.surname.toLowerCase().includes(term)
      );
    }
  }

  openModal(user: UserViewModel): void {
    this.selectedUser = user;
    $('#userModal').modal('show');
  }

  closeModal(): void {
    $('#userModal').modal('hide');
  }

  goBack(): void {
    this.location.back();
  }
}

//css
.gym-manager-container {
  padding: 20px;
}

.back-button {
  margin-bottom: 20px;
}

.content {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 5px;
}

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.table-centered thead th, 
.table-centered tbody td {
  text-align: center;
}

.table-hover tbody tr:hover {
  background-color: #f1f1f1;
}

.modal-dialog {
  max-width: 400px;
  margin: 1.75rem auto;
}

.modal-content {
  text-align: center;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body p {
  margin-bottom: 10px;
}

    @Override
    public List<HumanAgent> findByBotIdAndStatus(String botId, String status) {
        List<HumanAgent> humanAgents = new ArrayList<>();
        try {
            Query query = new Query().addCriteria(Criteria.where("bot_id").is(botId))
                    .addCriteria(Criteria.where("status").is(status));
            humanAgents = mongoTemplate.find(query, HumanAgent.class);
            log.info("find HumanAgent by botId {}, status {},  have size {}",
                    botId, status, humanAgents.size());
        }catch (Exception ex){
            log.error("ERROR {}", ExceptionUtils.getStackTrace(ex));
        }
        return humanAgents;
    }
def factorial(n):
	if n < 1:
    	return 1

	return n*factorial(n-1)

factorial(5)
public class Employee {

    // Instance variables

    private String name;

    private int id;

    private double salary;

    // Constructor to initialize instance variables

    public Employee(String name, int id, double salary) {

        this.name = name;

        this.id = id;

        this.salary = salary;

    }

    // Getter for name

    public String getName() {

        return name;

    }

    // Setter for name

    public void setName(String name) {

        this.name = name;

    }

    // Getter for id

    public int getId() {

        return id;

    }

    // Setter for id

    public void setId(int id) {

        this.id = id;

    }

    // Getter for salary

    public double getSalary() {

        return salary;

    }

    // Setter for salary

    public void setSalary(double salary) {

        this.salary = salary;

    }

    // Method to display employee details

    public void displayDetails() {

        System.out.println("Employee Details:");

        System.out.println("Name: " + name);

        System.out.println("ID: " + id);

        System.out.println("Salary: $" + salary);

    }

}

public class Employee {

    // Instance variables

    private String name;

    private int id;

    private double salary;

    // Constructor to initialize instance variables

    public Employee(String name, int id, double salary) {

        this.name = name;

        this.id = id;

        this.salary = salary;

    }

    // Getter for name

    public String getName() {

        return name;

    }

    // Setter for name

    public void setName(String name) {

        this.name = name;

    }

    // Getter for id

    public int getId() {

        return id;

    }

    // Setter for id

    public void setId(int id) {

        this.id = id;

    }

    // Getter for salary

    public double getSalary() {

        return salary;

    }

    // Setter for salary

    public void setSalary(double salary) {

        this.salary = salary;

    }

    // Method to display employee details

    public void displayDetails() {

        System.out.println("Employee Details:");

        System.out.println("Name: " + name);

        System.out.println("ID: " + id);

        System.out.println("Salary: $" + salary);

    }

}

import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:ghalam_jadoee/component/api_service.dart';
import 'package:ghalam_jadoee/component/body3.dart';
import 'package:ghalam_jadoee/component/user_textfield.dart';
import 'package:ghalam_jadoee/pages/bottomnav.dart';
import 'package:ghalam_jadoee/pages/sign.dart';
import 'package:shared_preferences/shared_preferences.dart';

void main() {
  runApp(Moarf());
}

String PUser = "";

class Moarf extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Referral Code Page',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: ReferralCodePage(),
    );
  }
}

final TextEditingController _nameController = TextEditingController();

class ReferralCodePage extends StatefulWidget {
  @override
  _ReferralCodePageState createState() => _ReferralCodePageState();
}

class _ReferralCodePageState extends State<ReferralCodePage> {
  final _formKey = GlobalKey<FormState>();
  final TextEditingController _referralCodeController = TextEditingController();
  String _message = '';
  bool _isButtonActive = false;

  @override
  void initState() {
    super.initState();
    _referralCodeController.addListener(_validateCode);
    _nameController.addListener(_validateCode);
  }

  void _validateCode() {
    setState(() {
      final code = _referralCodeController.text;
      final name = _nameController.text;
      _isButtonActive = name.isNotEmpty &&
          (code.isEmpty ||
              (code.length == 6 && RegExp(r'^[a-zA-Z0-9]+$').hasMatch(code)));
    });
  }

  Future<void> saveLogin(String PUser) async {
    final prefs = await SharedPreferences.getInstance();
    await prefs.setString("userkey", PUser);
    await prefs.setBool("loggedIn", true);
  }

  void _submitCode() async {
    if (_formKey.currentState?.validate() ?? false) {
      var name = _nameController.text;
      var referral = _referralCodeController.text;

      print("name");
      print(name);
      print("ph");
      print(SendPhone);
      print("rf");
      print(referral);
      PUser = SendPhone;
      String state = 's3';
      try {
        var jsonResponse =
            await ApiService.confirm(SendPhone, name, referral, state);
        setState(() {
          print(jsonResponse);
          _message = 'کد معرف وارد شده: $referral';
        });

        await saveLogin(PUser);

        Navigator.pushReplacement(
          context,
          MaterialPageRoute(builder: (context) => Bottomnav()),
        );
      } catch (e) {
        setState(() {
          _message = 'خطا در ارسال کد معرف: ${e.toString()}';
        });
      }
    }
  }

  void _clearCode() async {
    _referralCodeController.clear();

    if (_formKey.currentState?.validate() ?? false) {
      var name = _nameController.text;
      var referral = "0";

      print("name");
      print(name);
      print("ph");
      print(SendPhone);
      print("rf");
      print(referral);
      PUser = SendPhone;
      String state = 's3';
      try {
        var jsonResponse =
            await ApiService.confirm(SendPhone, name, referral, state);
        setState(() {
          print('jsonResponse');
          print(jsonResponse);

          _message = 'معرفی ندارم';
        });

        await saveLogin(PUser);

        Navigator.pushReplacement(
          context,
          MaterialPageRoute(builder: (context) => Bottomnav()),
        );
      } catch (e) {
        setState(() {
          _message = 'خطا در ارسال کد معرف: ${e.toString()}';
        });
      }
    }
  }

  @override
  void dispose() {
    _referralCodeController.removeListener(_validateCode);
    _nameController.removeListener(_validateCode);
    _referralCodeController.dispose();
    _nameController.dispose();
    super.dispose();
  }

  @override
  @override
  Widget build(BuildContext context) {
    return WillPopScope(
        onWillPop: () async {
          return false;
        },
        child: Scaffold(
          body: SingleChildScrollView(
              child: Container(
            height: MediaQuery.of(context).size.height,
            child: Stack(
              alignment: Alignment.center,
              children: [
                Body3(),
                Align(
                  alignment: Alignment.topCenter,
                  child: SingleChildScrollView(
                    child: Padding(
                      padding: EdgeInsets.only(
                          top: MediaQuery.of(context).size.height * 0.48),
                      child: Padding(
                        padding: const EdgeInsets.all(24.0),
                        child: Form(
                          key: _formKey,
                          child: Column(
                            mainAxisSize: MainAxisSize.min,
                            children: <Widget>[
                              UserNameTextField(controller: _nameController),
                              SizedBox(height: 30),
                              Align(
                                alignment: Alignment.centerRight,
                                child: const Text(
                                  ': کد معرف ',
                                  textAlign: TextAlign.end,
                                  style: TextStyle(
                                    fontSize: 20,
                                    fontWeight: FontWeight.w300,
                                  ),
                                ),
                              ),
                              SizedBox(height: 10),
                              Container(
                                alignment: Alignment.centerRight,
                                child: TextFormField(
                                  controller: _referralCodeController,
                                  decoration: InputDecoration(
                                    border: OutlineInputBorder(
                                      borderRadius: BorderRadius.circular(12),
                                    ),
                                    contentPadding: const EdgeInsets.symmetric(
                                      vertical: 16.0,
                                      horizontal: 12.0,
                                    ),
                                  ),
                                  maxLength: 6,
                                  validator: (value) {
                                    if (value != null && value.isNotEmpty) {
                                      if (value.length != 6) {
                                        return 'کد معرف باید ۶ کاراکتر باشد';
                                      } else if (!RegExp(r'^[a-zA-Z]+$')
                                          .hasMatch(value)) {
                                        return 'کد معرف باید فقط حاوی حروف انگلیسی باشد';
                                      }
                                    }
                                    return null;
                                  },
                                ),
                              ),
                              SizedBox(height: 20),
                              Row(
                                mainAxisAlignment:
                                    MainAxisAlignment.spaceEvenly,
                                children: [
                                  TextButton(
                                    onPressed:
                                        _isButtonActive ? _submitCode : null,
                                    style: TextButton.styleFrom(
                                      foregroundColor: _isButtonActive
                                          ? Colors.blue
                                          : Colors.grey,
                                      padding: const EdgeInsets.symmetric(
                                        horizontal: 32,
                                        vertical: 12,
                                      ),
                                      textStyle: const TextStyle(
                                        fontSize: 16,
                                        fontWeight: FontWeight.bold,
                                      ),
                                    ),
                                    child: const Text('ارسال'),
                                  ),
                                  TextButton(
                                    onPressed: _clearCode,
                                    style: TextButton.styleFrom(
                                      foregroundColor: Colors.red,
                                      padding: const EdgeInsets.symmetric(
                                        horizontal: 32,
                                        vertical: 12,
                                      ),
                                      textStyle: const TextStyle(
                                        fontSize: 16,
                                        fontWeight: FontWeight.bold,
                                      ),
                                    ),
                                    child: const Text('معرفی ندارم'),
                                  ),
                                ],
                              ),
                              SizedBox(height: 20),
                              Text(
                                _message,
                                style: TextStyle(
                                  fontSize: 16,
                                  color: _message.contains('کد معرف وارد شده')
                                      ? Colors.green
                                      : Colors.red,
                                ),
                                textDirection: TextDirection.rtl,
                              ),
                            ],
                          ),
                        ),
                      ),
                    ),
                  ),
                ),
              ],
            ),
          )),
        ));
  }
}
=if(
    aggr({<BestemmingKpl = p({$})>} [Resultaat - Kostenplaats - HuidigMinus1], BestemmingKpl) < 0, 
    dual('Negatief', 2),
    if(
        aggr({<BestemmingKpl = p({$})>} [Resultaat - Kostenplaats - HuidigMinus1], BestemmingKpl) > 0, 
        dual('Postief', 1),
        dual('Breakeven', 3)
    )
)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Advanced Hover Effects</title>
    <style>
        .button {
            position: relative;
            display: inline-block;
            padding: 10px 20px;
            color: #fff;
            background-color: #007BFF;
            border: none;
            border-radius: 5px;
            text-decoration: none;
            overflow: hidden;
            transition: background-color 0.3s;
        }

        .button::before, .button::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.2);
            transition: transform 0.3s;
        }

        .button::before {
            transform: translateX(-100%);
        }

        .button::after {
            transform: translateX(100%);
        }

        .button:hover::before {
            transform: translateX(0);
        }

        .button:hover::after {
            transform: translateX(0);
        }
    </style>
</head>
<body>
    <a href="#" class="button">Hover Me</a>
</body>
</html>
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:ghalam_jadoee/component/api_service.dart';
import 'package:ghalam_jadoee/component/body2.dart';
import 'package:ghalam_jadoee/pages/bottomnav.dart';
import 'package:ghalam_jadoee/pages/sign.dart';
import 'package:ghalam_jadoee/pages/moarf.dart';
import 'package:shared_preferences/shared_preferences.dart';

String SendPhone2 = "";
String OTP2 = "";
String userStatus = "";
bool BtnEnable = true;

void main() {
  runApp(Login2());
}

class Login2 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: ' ',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: OtpRequestScreen(
        name: '',
        phone: '',
      ),
    );
  }
}

class OtpRequestScreen extends StatefulWidget {
  final String name;
  final String phone;

  OtpRequestScreen({required this.name, required this.phone});

  @override
  _OtpRequestScreenState createState() => _OtpRequestScreenState();
}

class _OtpRequestScreenState extends State<OtpRequestScreen> {
  final List<FocusNode> _focusNodes = List.generate(4, (_) => FocusNode());
  final List<TextEditingController> _controllers =
      List.generate(4, (_) => TextEditingController());

  Timer? _timer;
  int _start = 300;
  bool _isResendDisabled = true;

  @override
  void initState() {
    super.initState();
    _startTimer();
    setState(() {
      SendPhone2 = SendPhone;
      OTP2 = OTP1;
      userStatus = userStatus2;
    });
  }

  @override
  void dispose() {
    _timer?.cancel();
    super.dispose();
  }

  Future<void> saveLogin(String nameUser) async {
    final prefs = await SharedPreferences.getInstance();
    await prefs.setString("userkey", nameUser);
    await prefs.setBool("loggedIn", true);
  }

  void _startTimer() {
    const oneSec = Duration(seconds: 1);
    _timer?.cancel();
    _timer = Timer.periodic(oneSec, (Timer timer) {
      if (_start == 0) {
        setState(() {
          timer.cancel();
          BtnEnable = false;
          _isResendDisabled = false;
        });
      } else {
        setState(() {
          _start--;
        });
      }
    });
  }

  Future<void> _resetTimer() async {
    String state = 's2';
    var jsonResponse = await ApiService.login(SendPhone2, state);

    if (jsonResponse != null) {
      var userStatus = jsonResponse['USER STATUS'];
      var otp = jsonResponse['otp'];
      var rs = jsonResponse['rs'];

      OTP2 = otp;

      print("otp");
      print(otp);
    }

    setState(() {
      _start = 300;
      BtnEnable = false;
      _isResendDisabled = true;
      _startTimer();
    });
  }

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      child: Scaffold(
        body: Stack(
          alignment: Alignment.center,
          children: [
            const Body2(),
            Center(
              child: Padding(
                padding: EdgeInsets.only(
                    top: MediaQuery.of(context).size.height * 0.2),
                child: Column(
                  mainAxisSize: MainAxisSize.min,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    const Text(
                      'پیامک تایید شماره تلفن',
                      style: TextStyle(
                        fontSize: 25,
                      ),
                    ),
                    SizedBox(height: 20),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.end,
                      children: [
                        Text(
                          SendPhone2,
                          style: const TextStyle(
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                        const Text(
                          '  :کد ارسال شده به ',
                          style: TextStyle(
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                      ],
                    ),
                    const SizedBox(height: 20),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: List.generate(4, (index) {
                        return OtpInput(
                          focusNode: _focusNodes[index],
                          nextFocusNode:
                              index < 3 ? _focusNodes[index + 1] : null,
                          previousFocusNode:
                              index > 0 ? _focusNodes[index - 1] : null,
                          controller: _controllers[index],
                        );
                      }),
                    ),
                    SizedBox(height: 20),
                    Align(
                      alignment: Alignment.centerRight,
                      child: TextButton(
                        onPressed: _isResendDisabled ? null : _resetTimer,
                        child: Text(
                          _isResendDisabled
                              ? 'ارسال مجدد کد در $_start ثانیه'
                              : 'ارسال مجدد کد',
                          style: TextStyle(
                            color: _isResendDisabled
                                ? const Color.fromRGBO(158, 158, 158, 1)
                                : Colors.black,
                          ),
                        ),
                      ),
                    ),
                    SizedBox(height: 20),
                    ElevatedButton(
                      onPressed: BtnEnable
                          ? () async {
                              String enteredOtp = _controllers
                                  .map((controller) => controller.text)
                                  .join('');
                              print(OTP2);

                              print(enteredOtp);
                              print("SOTP");
                              //print(Sotp);
                              if (enteredOtp == OTP2) {
                                if (userStatus == '0') {
                                  Navigator.pushReplacement(
                                    context,
                                    MaterialPageRoute(
                                        builder: (context) => Moarf()),
                                  );
                                } else if (userStatus == '1') {
                                  await saveLogin(SendPhone2);
                                  Navigator.pushReplacement(
                                    context,
                                    MaterialPageRoute(
                                        builder: (context) => Bottomnav()),
                                  );
                                }
                              } else {
                                ScaffoldMessenger.of(context).showSnackBar(
                                  SnackBar(
                                    content: Directionality(
                                      textDirection: TextDirection.rtl,
                                      child: Text('کد وارد شده صحیح نیست'),
                                    ),
                                  ),
                                );
                              }
                            }
                          : null,
                      style: ElevatedButton.styleFrom(
                        backgroundColor: Color.fromRGBO(112, 27, 248, 100),
                        shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.circular(100),
                        ),
                        padding:
                            EdgeInsets.symmetric(horizontal: 30, vertical: 12),
                      ),
                      child: const Text(
                        'تایید',
                        style: TextStyle(
                          color: Colors.black,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
      onWillPop: () async {
        return false;
      },
    );
  }
}

class OtpInput extends StatelessWidget {
  final FocusNode focusNode;
  final FocusNode? nextFocusNode;
  final FocusNode? previousFocusNode;
  final TextEditingController controller;

  const OtpInput({
    required this.focusNode,
    this.nextFocusNode,
    this.previousFocusNode,
    required this.controller,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 50,
      height: 50,
      decoration: BoxDecoration(
        color: Color.fromARGB(159, 226, 221, 221),
        borderRadius: BorderRadius.circular(10),
      ),
      child: TextField(
        focusNode: focusNode,
        controller: controller,
        textAlign: TextAlign.center,
        style: const TextStyle(
          fontSize: 24,
        ),
        keyboardType: TextInputType.number,
        maxLength: 1,
        decoration: const InputDecoration(
          counterText: '',
          border: InputBorder.none,
        ),
        onChanged: (value) {
          if (value.isNotEmpty && nextFocusNode != null) {
            FocusScope.of(context).requestFocus(nextFocusNode);
          } else if (value.isEmpty && previousFocusNode != null) {
            FocusScope.of(context).requestFocus(previousFocusNode);
          } else {
            focusNode.unfocus();
          }
        },
      ),
    );
  }
}
.elementor-widget-text-editor p:last-child{ margin-bottom:0px;}
Using mklink (Symbolic Link):

mklink /J "C:\Users\****\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\Cache" "D:\EdgeCache"

OR

Modify Edge Properties (for specific Edge versions):

- Right-click on the Edge shortcut and choose “Properties.”
- In the “Target” field, modify it to include the cache location:

"C:\Program Files (x86)\MicrosoftEdge\Application\msedge.exe" --profile-directory=Default --disk-cache-dir=z:\MicrosoftEdge\Cache
Replace 
z:\MicrosoftEdge\Cache
 with your desired cache location.
construccion 

en el formulario:

<?= $form->field($model, 'id_sector')->dropDownList(ArrayHelper::map(Sectores::find()->orderBy('nombre_sector')->all(), 'id_sector', 'nombre_sector'), ['prompt' => 'Seleccione ', 'id' => 'id-sector','onchange' => 'actualizarEntes(value)']); ?>

    </div>

     <div class="col-xs-3">
                <?php /*$form->field($model, 'id_ente')->widget(Select2::classname(), [
                    'model' => $model,
                    'attribute' => 'id_ente',
                    'data' => ArrayHelper::map(Entes::find()->orderBy('nombre_ente')->asArray()->all(), 'id_ente', 'nombre_ente'),
                    'language' => 'es',
                    'maintainOrder' => true,
                    'showToggleAll'=> false,
                    'readonly'=>true,
                    'options' => ['placeholder' => 'Seleccione...', 'multiple' => true,],
                    'pluginOptions' => [
                    'maximumSelectionLength'=>35,
                    'minimumInputLength'=>0,
                    ],
                    ]);*/ ?>

        <?= $form->field($model, 'id_ente')->widget(DepDrop::classname(), [
        'type' => DepDrop::TYPE_SELECT2,
        'data' => [], // Inicialmente vacío
        'options' => ['placeholder' => 'Seleccione...', 'multiple' => true],
        'pluginOptions' => [
            'depends' => ['id-sector'], // ID del campo del que depende
            'url' => Url::to(['/entes/listar']), // URL para obtener los datos dependientes
            'loadingText' => 'Cargando entes...',
        ],
    ]); ?>
        </div> 
    </div>

en el modelo de la tabla que voy a mostrar en el DepDrop:

public static function Lista(){
    $s = \yii\helpers\ArrayHelper::map(Entes::find()->orderBy('id_ente')->all(),'id_ente','nombre_ente');
    return ($s) ? $s : [];
    }

en la action update del controlador:
   public function actionUpdate($id)
{
    $model = $this->findModel($id);

    // Carga los datos de 'indicadores_entes' en el modelo
    $model->id_ente = ArrayHelper::map($model->entes, 'id_ente', 'nombre_ente');

    if ($model->load(Yii::$app->request->post())) {
        // Desvincula todos los 'entes' existentes para evitar duplicados
        $model->unlinkAll('entes', true);

        // Guarda los nuevos valores seleccionados en la tabla de relación
        foreach ($model->id_ente as $enteId) {
            $ente = Entes::findOne($enteId);
            $model->link('entes', $ente);
        }

        if ($model->save()) {
            return $this->redirect(['view', 'id' => $model->id_indicador]);
        }
    }
    return $this->render('update', [
        'model' => $model,
    ]);
}
 en la action create :
                         
public function actionCreate()
        {
            $model = new Indicadores();

            if ($model->load(Yii::$app->request->post())) {
                if ($model->save()) {
                    // Obtén los valores seleccionados del campo 'id_ente'
                    $entesSeleccionados = Yii::$app->request->post('Indicadores')['id_ente'];

                    // Guarda los valores seleccionados en la tabla de relación
                    foreach ($entesSeleccionados as $enteId) {
                        $ente = Entes::findOne($enteId);
                        $model->link('entes', $ente);
                    }

                    return $this->redirect(['view', 'id' => $model->id_indicador]);
                }
            }

            return $this->render('create', [
                'model' => $model,
            ]);
        }                         
    
<?php

/**
 * Checkout billing information form
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-billing.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see     https://woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates
 * @version 3.6.0
 * @global WC_Checkout $checkout
 */

defined('ABSPATH') || exit;
$fields = $checkout->get_checkout_fields('billing');
?>
<?php if (!is_user_logged_in() && $checkout->is_registration_enabled()) : ?>
  <div class="woocommerce-billing-fields woocommerce-billing-fields-top">
    <h3><?php esc_html_e('Login', 'woocommerce'); ?></h3>
    <p>Log in to place your order</p>
    <div class="woocommerce-billing-fields__field-wrapper">
      <?php
      foreach ($fields as $key => $field) {
        if ($key === 'billing_email') {
          woocommerce_form_field($key, $field, $checkout->get_value($key));
        }
      }
      ?>
      <p class="form-row form-row-wide" id="billing_password_field" data-priority="110">
        <span class="woocommerce-input-wrapper">
          <input type="password" class="input-text" name="billing_password" id="billing_password" placeholder="Password">
        </span>
      </p>
      <div class="flogin-btn">
        <button type="button"><?php _e('Login and place order', 'wp'); ?></button>
      </div>
      <div class="flogin-footer">
        <div>Not yet a member?</div>
        <div>create an account</div>
        <div>Create an account and place your order</div>
      </div>
    </div>
  </div>
<?php else : ?>
  <div class="woocommerce-billing-fields">
    <h3><?php esc_html_e('Account', 'woocommerce'); ?></h3>
    <div class="woocommerce-billing-fields__field-wrapper">
      <?php
      foreach ($fields as $key => $field) {
        if ($key === 'billing_email') {
          woocommerce_form_field($key, $field, $checkout->get_value($key));
        }
      }
      ?>
    </div>
  </div>
<?php endif; ?>
<div class="woocommerce-billing-fields">
  <?php if (wc_ship_to_billing_address_only() && WC()->cart->needs_shipping()) : ?>

    <h3><?php esc_html_e('Billing &amp; Shipping', 'woocommerce'); ?></h3>

  <?php else : ?>

    <h3><?php esc_html_e('Billing Info', 'woocommerce'); ?></h3>

  <?php endif; ?>

  <?php do_action('woocommerce_before_checkout_billing_form', $checkout); ?>

  <div class="woocommerce-billing-fields__field-wrapper">
    <?php
    foreach ($fields as $key => $field) {
      if ($key !== 'billing_email') {
        woocommerce_form_field($key, $field, $checkout->get_value($key));
      }
    }
    ?>
	 
      <?php woocommerce_form_field('billing_notes', array(
            'type' => 'textarea',
            'class' => array('form-row-wide'),
            'label' => false,
            'placeholder' => __('Order notes(optional)', 'woocommerce'),
            'required' => false,
        ), $checkout->get_value('billing_notes')); ?>
    
    <div class="form-row shipping-address-method-field">
      <input type="radio" name="shipping-address-method[]" value="billing_address" id="method-billing_address" checked>
      <label for="method-billing_address">Ship to this address</label>
    </div>
  </div>

  <?php do_action('woocommerce_after_checkout_billing_form', $checkout); ?>
</div>

<?php if (!is_user_logged_in() && $checkout->is_registration_enabled()) : ?>
  <div class="woocommerce-account-fields">
    <?php if (!$checkout->is_registration_required()) : ?>

      <p class="form-row form-row-wide create-account">
        <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
          <input class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" id="createaccount" <?php checked((true === $checkout->get_value('createaccount') || (true === apply_filters('woocommerce_create_account_default_checked', false))), true); ?> type="checkbox" name="createaccount" value="1" /> <span><?php esc_html_e('Create an account?', 'woocommerce'); ?></span>
        </label>
      </p>

    <?php endif; ?>

    <?php do_action('woocommerce_before_checkout_registration_form', $checkout); ?>

    <?php if ($checkout->get_checkout_fields('account')) : ?>

      <div class="create-account">
        <?php foreach ($checkout->get_checkout_fields('account') as $key => $field) : ?>
          <?php woocommerce_form_field($key, $field, $checkout->get_value($key)); ?>
        <?php endforeach; ?>
        <div class="clear"></div>
      </div>

    <?php endif; ?>

    <?php do_action('woocommerce_after_checkout_registration_form', $checkout); ?>
  </div>
<?php endif; ?>
git add FILENAME

git commit -m FILENAME

git push
//To specify a custom ID in the i18n attribute or $localize tagged message string, use the @@ prefix. The following example defines the introductionHeader custom ID in a heading element.
<h1 i18n="@@introductionHeader">Hello i18n!</h1>

variableText1 = $localize `:@@introductionHeader:Hello i18n!`;

//The following example includes a description, followed by the custom ID.
<h1 i18n="An introduction header for this sample@@introductionHeader">Hello i18n!</h1>

variableText2 = $localize `:An introduction header for this sample@@introductionHeader:Hello i18n!`;
res = thisapp.Residents.Fetchallresbyemail(input.Email);
for each  item in res
{
	counterr = 0;
	resprop = Residents[ID == item && Developments == 39703000013659197].Property_address;
	ipdcheck = pod_planner.Properties.IPDprivate(resprop);
	if(ipdcheck == "True")
	{
		counterr = counterr + 1;
	}
}
$ git commit -m "Make everything work.
dquote>
dquote> Add magic code that fixes everything"
<?php
// Define the start year and get the current year
$start_year = 2020; // Replace with your start year
$current_year = date('Y');
?>
<p>&copy; <?php echo $start_year; ?><?php if ($start_year != $current_year) echo '-' . $current_year; ?> <?php bloginfo('name'); ?>. Minden jog fenntartva.</p>
fun main() {
         var a:Int=76
         println("Value of a :${a}")
         
         var b:Char='A'
         println("value of b :${b}")
         
         var c:String="Welcome to my world"
         println("Value of String :${c}")
         
         var d:String="""
                 Welcome
                 To
                 My
                 World
                 """
          println("Value Of String :${d}")
          
          val numbers:IntArray= intArrayOf(1,2,3,4,5)
          val chars=charArrayOf('A','B','C')
          val games: Array<String> =arrayOf("Cricket","Kabaddi")
          
          println("Integers Array:${numbers.contentToString()}")
           println("Characters Array:${chars.contentToString()}")
            println("String Array:${games.contentToString()}")
         
 println("Mutable List Example :")
         
         var e = mutableListOf("C","C++","Java")
          println("List:${e}")
           e.add("Python")
           println("Updated List :${e}")
         
 println("Immutable List Example :")
         
         var k = listOf("C","C++","Java")
          println("List:${k}")
          
 println("Mutable Set Ex:")
          
          var g =mutableSetOf(1,2,3,4,5)
             println("SET :${g}")
             
             g.add(6)
             println("Updated Set:${g}")
             
 println("Immutable Set Ex:")
          
          var h =setOf(5,6,7,8,9)
             println("SET :${h}")
         
 println("Immutable Map Ex:")      
         
           var details = mapOf("Sno" to 101,"Sname" to "Hari")
           println("Map :${details}")         
          
 println("Mutable Map Ex:")  
 
          var courses = mutableMapOf("Sno" to 102,"Sname" to "Pari")
          println("Map :${courses}")
          
         courses["marks"]=100
          println("Updated Map :${courses}")
          
 println("Range Ex:")
      
          var r = 1..10
          for(e in r){
          println(e)
          }
          println("Enter value of m:")
          var m =readln()
          println(m)
                   
         }
import React, { useState } from 'react';

function Example() {
  const [user, setUser] = useState({
    name: 'John Doe',
    age: 30
  });

  return (
    <div>
      <p>Name: {user.name}</p>
      <p>Age: {user.age}</p>
      <p>Email: {user.email}</p>
      <button onClick={() => setUser({ ...user, name: 'Jane Doe' })}>Change Name</button>
      <button onClick={() => setUser({ ...user, email: 'jane.doe@example.com' })}>Add Email</button>
      <button onClick={() => {
        const { age, ...rest } = user;
        setUser(rest);
      }}>Delete Age</button>
    </div>
  );
}

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

function Example() {
  const [users, setUsers] = useState([
    { id: 1, name: 'John Doe', age: 30 },
    { id: 2, name: 'Jane Smith', age: 25 }
  ]);

  return (
    <div>
      {users.map(user => (
        <div key={user.id}>
          <p>Name: {user.name}</p>
          <p>Age: {user.age}</p>
        </div>
      ))}
      <button onClick={() => setUsers(users.map(user => 
        user.id === 1 ? { ...user, name: 'Jane Doe' } : user
      ))}>Change Name of User 1</button>
      <button onClick={() => setUsers([...users, { id: 3, name: 'Sam Green', age: 28 }])}>Add User</button>
      <button onClick={() => setUsers(users.filter(user => user.id !== 2))}>Delete User 2</button>
    </div>
  );
}

export default Example;
Request
  URI: /cashcards/{id}
  HTTP Verb: GET
  Body: None

Response:
  HTTP Status:
    200 OK if the user is authorized and the Cash Card was successfully retrieved
    401 UNAUTHORIZED if the user is unauthenticated or unauthorized
    404 NOT FOUND if the user is authenticated and authorized but the Cash Card cannot be found
  Response Body Type: JSON
  Example Response Body:
    {
      "id": 99,
      "amount": 123.45
    }
You can use the async keyword to create an asynchronous function, which returns a promise.

Example Code
const example = async () => {
  console.log("this is an example");
};

The try block is designed to handle potential errors, and the code inside the catch block will be executed in case an error occurs.

Example Code
try {
  const name = "freeCodeCamp";
  name = "fCC";
} catch (err) {
  console.log(err); // TypeError: Assignment to constant variable.
}

The await keyword waits for a promise to resolve and returns the result.

Example Code
const example = async () => {
  const data = await fetch("https://example.com/api");
  console.log(data);
}
star

Wed Jul 17 2024 11:57:55 GMT+0000 (Coordinated Universal Time) https://youtu.be/q8gdBn9RPeI?list=PLDzeHZWIZsTryvtXdMr6rPh4IDexB5NIA

@vishnu_jha #c++ #dsa #linkedlist #insertinlast

star

Wed Jul 17 2024 11:56:35 GMT+0000 (Coordinated Universal Time) https://youtu.be/q8gdBn9RPeI?list=PLDzeHZWIZsTryvtXdMr6rPh4IDexB5NIA

@vishnu_jha #c++ #dsa #linkedlist #deletenode

star

Wed Jul 17 2024 11:55:01 GMT+0000 (Coordinated Universal Time) https://youtu.be/q8gdBn9RPeI?list=PLDzeHZWIZsTryvtXdMr6rPh4IDexB5NIA

@vishnu_jha #c++ #dsa #linkedlist #deletenode

star

Wed Jul 17 2024 09:44:53 GMT+0000 (Coordinated Universal Time)

@davidmchale #nested #function #foreach #...args #literals

star

Wed Jul 17 2024 09:41:09 GMT+0000 (Coordinated Universal Time)

@davidmchale #nested #function #foreach #...args

star

Wed Jul 17 2024 09:38:18 GMT+0000 (Coordinated Universal Time)

@Ranjith

star

Wed Jul 17 2024 09:09:41 GMT+0000 (Coordinated Universal Time)

@omnixima #php

star

Wed Jul 17 2024 07:21:44 GMT+0000 (Coordinated Universal Time)

@faizan

star

Wed Jul 17 2024 07:14:44 GMT+0000 (Coordinated Universal Time)

@vishalsingh21

star

Wed Jul 17 2024 06:08:22 GMT+0000 (Coordinated Universal Time) https://www.cloudways.com/blog/wp-cli-commands/

@Merel1988

star

Tue Jul 16 2024 23:39:35 GMT+0000 (Coordinated Universal Time) https://www.chromium.org/getting-involved/download-chromium/

@Dewaldt

star

Tue Jul 16 2024 19:25:53 GMT+0000 (Coordinated Universal Time)

@darshcode #sql

star

Tue Jul 16 2024 16:14:18 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #json

star

Tue Jul 16 2024 16:13:47 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #json

star

Tue Jul 16 2024 16:12:45 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:11:36 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:05:41 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:03:39 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:03:09 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:02:33 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:02:14 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 16:01:40 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak

star

Tue Jul 16 2024 16:01:14 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak

star

Tue Jul 16 2024 15:06:44 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Tue Jul 16 2024 12:39:58 GMT+0000 (Coordinated Universal Time)

@faizan

star

Tue Jul 16 2024 12:29:50 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Tue Jul 16 2024 10:54:42 GMT+0000 (Coordinated Universal Time) https://firebase.flutter.dev/

@zemax_c4 ##flutter

star

Tue Jul 16 2024 10:38:09 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Tue Jul 16 2024 09:37:45 GMT+0000 (Coordinated Universal Time)

@manhmd #java

star

Tue Jul 16 2024 07:29:05 GMT+0000 (Coordinated Universal Time)

@vchiranjeeviak #python

star

Tue Jul 16 2024 05:32:50 GMT+0000 (Coordinated Universal Time)

@projectrock

star

Tue Jul 16 2024 05:20:18 GMT+0000 (Coordinated Universal Time)

@mehran

star

Tue Jul 16 2024 04:57:54 GMT+0000 (Coordinated Universal Time) https://htm-rapportage.eu.qlikcloud.com/sense/app/94a43354-5dc8-4f20-9b21-4f048ab5ab0f/sheet/294e3589-bf5b-4ac7-bc23-f4e9c827fd6e/state/edit

@bogeyboogaard

star

Mon Jul 15 2024 20:13:09 GMT+0000 (Coordinated Universal Time)

@zaki

star

Mon Jul 15 2024 18:31:53 GMT+0000 (Coordinated Universal Time)

@mehran

star

Mon Jul 15 2024 17:15:20 GMT+0000 (Coordinated Universal Time) https://klitmo.com/elementor/elementor-remove-the-bottom-space-from-the-text-editor-and-paragraph/

@webisko #css

star

Mon Jul 15 2024 17:05:09 GMT+0000 (Coordinated Universal Time)

@Curable1600 #windows #browsers #youtube

star

Mon Jul 15 2024 16:33:08 GMT+0000 (Coordinated Universal Time) https://open.uom.lk/lms/mod/quiz/attempt.php?attempt

@Menuka

star

Mon Jul 15 2024 15:33:24 GMT+0000 (Coordinated Universal Time)

@jrg_300i #undefined

star

Mon Jul 15 2024 15:27:35 GMT+0000 (Coordinated Universal Time)

@quanganh141220 #php #single #product

star

Mon Jul 15 2024 15:10:56 GMT+0000 (Coordinated Universal Time)

@lettuceranger #github #vs-code #commandline

star

Mon Jul 15 2024 15:04:06 GMT+0000 (Coordinated Universal Time) https://v17.angular.io/guide/i18n-optional-manage-marked-text

@lettuceranger #angular #lokalise #key-names

star

Mon Jul 15 2024 14:59:49 GMT+0000 (Coordinated Universal Time)

@nishpod

star

Mon Jul 15 2024 14:59:39 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/9562304/git-github-commit-with-extended-message-description?newreg

@lettuceranger #commandline #github

star

Mon Jul 15 2024 10:24:13 GMT+0000 (Coordinated Universal Time)

@peterteszary #php

star

Mon Jul 15 2024 09:45:46 GMT+0000 (Coordinated Universal Time)

@signup

star

Mon Jul 15 2024 09:35:23 GMT+0000 (Coordinated Universal Time)

@Zohaib77 #react.js

star

Mon Jul 15 2024 09:33:40 GMT+0000 (Coordinated Universal Time)

@Zohaib77 #react.js

star

Mon Jul 15 2024 08:55:48 GMT+0000 (Coordinated Universal Time) https://spring.academy/courses/building-a-rest-api-with-spring-boot/lessons/data-contracts

@Mannan2105

star

Mon Jul 15 2024 03:51:54 GMT+0000 (Coordinated Universal Time)

@NoFox420 #javascript

Save snippets that work with our extensions

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