Snippets Collections
import React, { useContext, useEffect, useState } from "react";
import { useParams, useNavigate, useLocation } from "react-router-dom";
import { Box, Paper, Grid } from "@mui/material";
import SessionView from "./components/SessionView";
import { getEventLevel } from "../../../components/utils";
import EventEntryList from "./components/entries/EventEntryList";
import Summary from "./components/summary/Summary";
import HeatList from "./components/heats/HeatList";
import { GET_SESSION_EVENTS } from "../../../utils/graphql/queries";
import { ROUND_HEAT_STATUS_SUBSCRIPTION } from "../../../utils/graphql/subscriptions";
import { GET_HEAT_LIST } from "../../../utils/graphql/queries";
import useFetch from "../../../hooks/graphql/useFetch";
import EventHeader from "./components/EventHeader";
import { getView } from "../../../components/utils/getView";
import CombinedResults from "./components/combined/CombinedResults";
import useCombinedResults from "../../../hooks/useCombinedResults";
import useConditionalSub from "../../../hooks/graphql/useConditionalSub";
import { CompetitionDetailsContext } from "../../../context/CompetitionDetailsContext";

interface EventViewProps {
  competition: Competition | undefined;
  session: CompetitionSession | undefined;
  setSelectedSession: React.Dispatch<
    React.SetStateAction<CompetitionSession | undefined>
  >;
  setSessionTabIndex: React.Dispatch<React.SetStateAction<number>>;
  timeProgramEntryId: number | undefined;
  setTimeProgramEntryId: React.Dispatch<
    React.SetStateAction<number | undefined>
  >;
  eventView: View;
  setEventView: React.Dispatch<React.SetStateAction<View>>;
  isCompetitionActive: boolean;
}

const findEventView = (eventView: string | undefined): View => {
  switch (eventView as View) {
    case "entries":
      return "entries";
    case "heats":
      return "heats";
    case "summary":
      return "summary";
    case "combined":
      return "combined";
    default:
      return "entries";
  }
};

export default function EventView({
  competition,
  isCompetitionActive,
  session,
  setSelectedSession,
  setSessionTabIndex,
  timeProgramEntryId,
  setTimeProgramEntryId,
  eventView,
  setEventView,
}: EventViewProps) {
  const competitionId = competition?.id;
  const combinedGroup = competition?.combined_group;
  const showAge = competition?.show_age;
  const poolType = competition?.pool_type;
  const sessions = competition?.competition_sessions;
  const combinedType = competition?.combined_type;

  const params = useParams();
  const navigate = useNavigate();
  const location = useLocation();

  const {
    loading,
    error,
    data,
    refresh: refetch,
  } = useFetch<TimeProgramEntry[]>(
    GET_SESSION_EVENTS,
    { _id: session?.id },
    "_id",
    "cache-and-network"
  );

  const { data: heatData } = useFetch<TimeProgramEntry>(
    GET_HEAT_LIST,
    { id: timeProgramEntryId },
    );

  const [eventId, setEventId] = useState<number | undefined>(undefined);
  const [selectedEventViewTab, setSelectedEventViewTab] = useState<number>(0);
  const [tpes, setTpes] = useState<TimeProgramEntry[]>([]);
  const [selectedTpe, setSelectedTpe] = useState<TimeProgramEntry | undefined>(
    undefined
  );
  const [tpeFinal, setTpeFinal] = useState<boolean>(false);
  const [eventLevel, setEventLevel] = useState<number>(0);
  const [showOfficialTimeStamp, setShowOfficialTimeStamp] =
    useState<boolean>(false);
  const [roundStatus, setRoundStatus] = useState<number | undefined>(undefined);
  const [summaryTypes, setSummaryTypes] = useState<SummaryType[] | undefined>(
    selectedTpe?.round?.summary_types
  );

  useEffect(() => {
    setSelectedTpe(data ? data[0] : undefined);
  }, [data])

  const { shouldSubscribe } = useContext(CompetitionDetailsContext);

  const handleStatusClick = () => {
    if (showOfficialTimeStamp) {
      setShowOfficialTimeStamp(false);
    } else setShowOfficialTimeStamp(true);
  };

  useEffect(() => {
    if (data) {
      //INFO: avoid error if query only returns one tpe as an object
      if (!Array.isArray(data)) {
        try {
          let arr = [] as TimeProgramEntry[];
          arr.push(data);
          setTpes(arr);
          setSelectedTpe(data);
        } catch (err) {
          console.log(err);
        }
      } else {
        try {
          setTpes(data);
          const foundTpe = data.find((tpe) => tpe?.id === timeProgramEntryId);
          foundTpe && setSelectedTpe(foundTpe);
        } catch (err) {
          console.log(err);
        }
      }
    }
  }, [data]);

  useEffect(() => {
    if (selectedTpe) {
      setTimeProgramEntryId(selectedTpe?.id);
    }
  }, [selectedTpe]);

  useEffect(() => {
    refetch();
  }, [timeProgramEntryId]);

  const {
    data: roundHeatSubData,
    isActive,
    endSub,
  } = useConditionalSub<Round>(
    ROUND_HEAT_STATUS_SUBSCRIPTION,
    { id: selectedTpe?.round?.id },
    !(isCompetitionActive && !!selectedTpe?.round?.id) /* || !shouldSubscribe */
  );

  useEffect(() => {
    if (roundHeatSubData?.status) {
      setRoundStatus(roundHeatSubData?.status);
    }
  }, [roundHeatSubData]);

  /* CHECK AND SET COMPETITION-/EVENT LEVEL (SHOW/DON'T SHOW RANK) */
  useEffect(() => {
    if (selectedTpe) {
      setEventLevel(
        getEventLevel(selectedTpe?.round?.event?.event_competition_level)
      );
      setSummaryTypes(selectedTpe?.round?.summary_types);
    }
  }, [selectedTpe, timeProgramEntryId]);

  useEffect(() => {
    if (selectedTpe?.round?.sort_order && selectedTpe?.round?.sort_order >= 2) {
      setTpeFinal(true);
    } else {
      setTpeFinal(false);
    }
  }, [selectedTpe]);

  // useEffect(() => {
  //   const foundEventView: View = findEventView(params?.eventView);
  //   const parsedSession = Number(params.session);
  //   const foundSession = sessions?.find(
  //     (session) => session.oid === parsedSession
  //   );
  //   const parsedTpe = Number(params.tpe);
  //   const foundTpe = foundSession?.time_program_entries?.find(
  //     (tpe) => tpe?.oid === parsedTpe
  //   );

  //   if (location?.state?.tpeCard && selectedTpe?.round) {
  //     switch (selectedTpe?.round?.status) {
  //       case 0:
  //         setEventView("entries");
  //         setSelectedEventViewTab(0);
  //         navigate(
  //           `../competitions/${params.competitionName}/events/entries/${session?.oid}/${selectedTpe?.oid}`
  //         );
  //         break;
  //       case 1:
  //       case 3:
  //         setEventView("heats");
  //         setSelectedEventViewTab(1);
  //         navigate(
  //           `../competitions/${params.competitionName}/events/heats/${session?.oid}/${selectedTpe?.oid}`
  //         );
  //         break;
  //       case 5:
  //         setEventView("summary");
  //         setSelectedEventViewTab(2);
  //         navigate(
  //           `../competitions/${params.competitionName}/events/summary/${session?.oid}/${selectedTpe?.oid}`
  //         );
  //         break;
  //     }
  //   } else if (params.eventView && params.session && params.tpe) {
  //     if (foundEventView && foundSession && foundTpe) {
  //       //console.log('found event view, session and tpe');
  //       const foundSessionIndex = sessions?.findIndex(
  //         (session) => session?.id === foundSession?.id
  //       );
  //       foundSessionIndex && setSessionTabIndex(foundSessionIndex);
  //       setEventView(foundEventView);
  //       setSelectedEventViewTab(getView.AsIndex(foundEventView));
  //       setSelectedSession(foundSession);
  //       setTimeProgramEntryId(foundTpe?.id);
  //       setEventId(foundTpe?.round?.event?.id);
  //       navigate(
  //         `../competitions/${params.competitionName}/events/${foundEventView}/${foundSession?.oid}/${foundTpe?.oid}`
  //       );
  //     } else {
  //       //TODO: if no view in params, check tpe status to decide between entries, heats and summary
  //       //console.log('eventView, session & tpe: did not find event view');
  //       setEventView("entries");
  //       setSelectedEventViewTab(0);
  //       sessions &&
  //         sessions[0].time_program_entries &&
  //         setTimeProgramEntryId(sessions[0]?.time_program_entries[0]?.id);
  //       sessions &&
  //         sessions[0].time_program_entries &&
  //         navigate(
  //           `../competitions/${params.competitionName}/events/entries/${sessions[0]?.oid}/${sessions[0]?.time_program_entries[0]?.oid}`
  //         );
  //     }
  //   } else if (params.eventView && params.session) {
  //     const foundEventView: View = findEventView(params?.eventView);
  //     const parsedSession = Number(params.session);
  //     const foundSession = sessions?.find(
  //       (session) => session?.oid === parsedSession
  //     );
  //     if (foundEventView && foundSession) {
  //       //console.log('found event view and session');
  //       setEventView(foundEventView);
  //       setSelectedEventViewTab(getView.AsIndex(foundEventView));
  //       foundSession?.time_program_entries &&
  //         setTimeProgramEntryId(foundSession?.time_program_entries[0]?.id);
  //       foundSession?.time_program_entries &&
  //         setEventId(foundSession?.time_program_entries[0]?.round?.event?.id);
  //       foundSession?.time_program_entries &&
  //         navigate(
  //           `../competitions/${params.competitionName}/events/${foundEventView}/${foundSession.oid}/${foundSession?.time_program_entries[0]?.oid}`
  //         );
  //     } else {
  //       //console.log('eventView & session: did not find event view');
  //       setEventView("entries");
  //       setSelectedEventViewTab(0);
  //       navigate(
  //         `../competitions/${params.competitionName}/events/entries/${session?.oid}/${selectedTpe?.oid}`
  //       );
  //     }
  //   } else {
  //     setEventView("entries");
  //     setSelectedEventViewTab(0);
  //     sessions &&
  //       sessions[0].time_program_entries &&
  //       setTimeProgramEntryId(sessions[0]?.time_program_entries[0]?.id);
  //     sessions &&
  //       sessions[0].time_program_entries &&
  //       setEventId(sessions[0]?.time_program_entries[0]?.round?.event?.id);
  //     sessions &&
  //       sessions[0].time_program_entries &&
  //       navigate(
  //         `../competitions/${params.competitionName}/events/entries/${sessions[0]?.oid}/${sessions[0]?.time_program_entries[0]?.oid}`
  //       );
  //   }
  // }, [eventView, timeProgramEntryId, params.eventView]);

  useEffect(() => {
    return () => {
      endSub();
    };
  }, []);
  
  const handleEventViewChange = (e: React.ChangeEvent, newValue: number) => {
    setSelectedEventViewTab(newValue);
    localStorage.setItem('lastVisitedTab', String(newValue));
    navigate(
      `../competitions/${params.competitionName}/events/${getView.AsView(
        newValue as 0 | 1 | 2 | 3
      )}/${session?.oid}/${selectedTpe?.oid}`
    );
  };

  // Handle default view settings
  useEffect(() => {
    // if a view is selected by the user then keep that view as default, else execute the logic below ...
    if(eventView === "entries" && selectedEventViewTab === 0) {
      setEventView("entries")
      setSelectedEventViewTab(0); 
    }
    if(eventView && selectedEventViewTab) {
      return
    }
    if (selectedTpe && selectedTpe.round) {
      const status = selectedTpe?.round?.status;
      const hasHeats = heatData?.heats !== undefined || heatData?.heats !== null ? true : false;
  
      if (status === 5) {
        // If status is 5, set default view to "summary" and selected tab to 2
        setEventView("summary");
        setSelectedEventViewTab(2);
      } 
      else if(hasHeats) {
        // If round is "heat", set default view to "heats" and selected tab to 1
        setEventView("heats");
        setSelectedEventViewTab(1);
      } 
      else {
        // If status is not 5 and round is not "heat", set default view to "entries" and selected tab to 0
        setEventView("entries");
        setSelectedEventViewTab(0);
      }
    }
  }, [selectedTpe]);

  useEffect(() => {
    const lastVisitedTab = localStorage.getItem('lastVisitedTab');
    const defaultView = eventView || 'entries';
    const defaultTab = lastVisitedTab ? parseInt(lastVisitedTab) : 0;
    
    // Check if a view is already selected by the user
    if (!eventView && selectedEventViewTab === 0) {
      setEventView(defaultView);
      setSelectedEventViewTab(defaultTab);
    }
  }, [eventView, selectedEventViewTab]);

  const sponsorImg = selectedTpe?.round?.event?.sponsor?.img;
  const sponsorLink = selectedTpe?.round?.event?.sponsor?.link;
  const sponsorText = selectedTpe?.round?.event?.sponsor?.name;

  const eventNumber = selectedTpe?.round?.event?.number;
  const roundType = selectedTpe?.round?.round_type;

  const {
    combinedData: competitions,
    unsub,
    restartSub,
    lanes,
    loading: combinedLoading,
    error: combinedError,
    setSelectedAgeGroup,
    selectedAgeGroup,
    setAgeGroupTabIndex,
    ageGroupTabIndex,
  } = useCombinedResults(
    combinedGroup,
    eventNumber,
    roundType,
    combinedType,
    isCompetitionActive && eventView === "combined",
    eventView
  );

  return (
    <>
      <Grid container>
        <Grid item xs={4}>
          <Paper
            elevation={3}
            sx={{
              position: "sticky",
              maxHeight: "100vh",
              overflowY: "scroll",
              "&::-webkit-scrollbar": { display: "none" },
              top: "1px",
            }}
          >
            {session && (
              <SessionView
                competitionId={competitionId}
                session={session}
                time_program_entries={tpes}
                setEventId={setEventId}
                setSelectedTpe={setSelectedTpe}
                time_programId={timeProgramEntryId}
                setSummaryTypes={setSummaryTypes}
              />
            )}
          </Paper>
        </Grid>
        <Grid item xs={8} sx={{ bgcolor: "" }}>
          <Box ml={1} sx={{ bgcolor: "" }}>
            <EventHeader
              combinedCompetitions={competitions}
              combinedGroup={combinedGroup}
              eventView={eventView}
              eventId={selectedTpe?.round?.event?.id}
              selectedEventViewTab={selectedEventViewTab}
              setEventView={setEventView}
              handleEventViewChange={handleEventViewChange}
              handleStatusClick={handleStatusClick}
              selectedTpe={selectedTpe}
              sponsorImg={sponsorImg}
              showOfficialTimeStamp={showOfficialTimeStamp}
              setShowOfficialTimeStamp={setShowOfficialTimeStamp}
              sponsorLink={sponsorLink}
              sponsorText={sponsorText}
              roundStatus={roundStatus}
              tpeFinal={tpeFinal}
              isActive={isActive}
            />

            {selectedTpe?.type === 1 && (
              <Grid item xs={12} mx={0} mt={1} mb={2} sx={{ bgcolor: "" }}>
                {eventView === "entries" && (
                  <EventEntryList
                    competitionId={competitionId}
                    event={selectedTpe?.round?.event}
                    round={selectedTpe?.round}
                    time_programId={selectedTpe?.id}
                    tpeFinal={tpeFinal}
                    eventLevel={eventLevel}
                    showAge={showAge}
                    competitionPoolType={poolType}
                    sortByName={
                      selectedTpe.round?.event?.entry_list_types?.[0] &&
                      selectedTpe.round?.event?.entry_list_types?.[0]
                        .sort_by_name
                    }
                  />
                )}
                {eventView === "heats" && (
                  <HeatList
                    eventView={eventView}
                    eventType={selectedTpe.round?.event?.event_type}
                    roundHeatSubData={roundHeatSubData}
                    isCompetitionActive={isCompetitionActive}
                    timeProgramEntry={selectedTpe}
                    round={selectedTpe?.round}
                    time_programId={selectedTpe?.id}
                    eventLevel={eventLevel}
                    showAge={showAge}
                    superliveSeo={session?.superlive_seo_link}
                  />
                )}
                {eventView === "summary" &&
                  summaryTypes &&
                  summaryTypes?.length > 0 && (
                    <Summary
                      eventView={eventView}
                      roundHeatSubData={roundHeatSubData}
                      roundStatus={selectedTpe?.round?.status}
                      isCompetitionActive={isCompetitionActive}
                      summary_types={summaryTypes}
                      time_programId={selectedTpe?.id}
                      eventLevel={eventLevel}
                      showAge={showAge}
                    />
                  )}
                {eventView === "combined" && (
                  <CombinedResults
                    restartSub={restartSub}
                    unsub={unsub}
                    ageGroupTabIndex={ageGroupTabIndex}
                    selectedAgeGroup={selectedAgeGroup}
                    setAgeGroupTabIndex={setAgeGroupTabIndex}
                    setSelectedAgeGroup={setSelectedAgeGroup}
                    loading={combinedLoading}
                    error={combinedError}
                    eventLevel={eventLevel}
                    showAge={showAge}
                    compId={competitionId}
                    competitions={competitions}
                    lanes={lanes}
                  />
                )}
              </Grid>
            )}
          </Box>
        </Grid>
      </Grid>
    </>
  );
}
Setting Up Routing
You already know the benefits of modular code. As such, our routing logic should be divided into separate files. 

One file will be responsible for the body of the website, the second will take care of the content management system, and the third one will have code for the mobile app.

Let's see how we can divide the following code into modules:

// index.js

// here, is the entry point setup
const express = require('express');

const { PORT = 3000 } = process.env;
const app = express();

// here we have data
const users = [
  { name: 'Jane', age: 22 },
  { name: 'Hugo', age: 30 },
  { name: 'Juliana', age: 48 },
  { name: 'Vincent', age: 51 }
];

// here's where we'll do our routing
app.get('/users/:id', (req, res) => {
  if (!users[req.params.id]) {
    res.send(`This user doesn't exist`);

    // it's important we don't forget to exit from the function
    return;
  }

  const { name, age } = users[req.params.id];
  
  res.send(`User ${name}, ${age} years old`);
});

app.listen(PORT, () => {
    console.log(`App listening on port ${PORT}`);
});
 Save
First things first, let's move our data into an individual file called db.js:

// db.js

module.exports = {
  users: [
    { name: 'Jane', age: 22 },
    { name: 'Hugo', age: 30 },
    { name: 'Juliana', age: 48 },
    { name: 'Vincent', age: 51 }
  ]
};
 Save
Storing the data together with the configuration code looks messy and is generally considered bad practice in app development. 

Now, let's set up routing. Our routing logic should also be moved into an individual file.

In this case, we'll need to write some more code. The response logic is described in the get() method's handler functions. In the code above, we were calling get() as a method of app. But there's no app variable in our new routing file. Further, since we can have only one app, we can't recreate this variable here.

To take care of this, Express provides us with the Router() method, which creates a new router object. Once we create this object, we can attach our handlers to it, like so:

// routes.js

const router = require('express').Router(); // creating a router
const { users } = require('./db.js'); // since this data is necessary for routing,
                                      // we need to import it

router.get('/users/:id', (req, res) => { 
  if (!users[req.params.id]) {
    res.send(`This user doesn't exist`);
    return;
  }

  const { name, age } = users[req.params.id];
  
  res.send(`User ${name}, ${age} years old`);
});

module.exports = router; // exporting the router
 Save
Finally, let's set up our entry point inside the index.js file.

To be able to use our routing, we should import the route file we just created into the index.js file. To execute the router, we need to call the use() method of the app. This method takes two parameters:

The first part of the URL. The router will only start if a request begins with this line.
The router itself, in our case, we've saved it as a const called router.
// index.js 

const express = require('express');
const router = require('./routes.js'); // importing the router

const { PORT = 3000 } = process.env;
const app = express();

app.use('/', router); // starting it

app.listen(PORT, () => {
    console.log(`App listening on port ${PORT}`);
});
 Save
We can make our code more modular by utilizing the first parameter of the use() method. We can create different routers for handling a number of routes: 

// index.js 

const express = require('express');
const router = require('./routes.js');
const api = require('./api.js');
const backoffice = require('./backoffice.js');

const { PORT = 3000 } = process.env;
const app = express();

// different routers for different requests
// looks awesome!

app.use('/', router);
app.use('/api', api);
app.use('/admin', backoffice);

app.listen(PORT, () => {
    console.log(`App listening on port ${PORT}`);
});
content{
            position: relative;
        }

        content:before {
            animation: rotate 3s linear infinite;
            border-radius: 100%; 
            box-shadow: 0 3px 0 0 rgba(225,131,194,.25), 0 -3px 0 0 rgba(165,181,222,.25), 							3px 0 0 0 rgba(225,131,194,.25), -3px 0 0 0 rgba(165,181,222,.25), 							3px -1px 0 0 rgba(195,156,208,.5), -3px 3px 0 0 										rgba(195,156,208,.5), 3px 3px 0 0 rgba(255,105,180,.75), -3px -3px 							0 0 rgba(135,206,235,.75);
            content: "";
            height: 100%;
            position: absolute;
           width: 100%;
            display: block; /* Added */
            transform: translate(-50%, -50%); /* Added */
        }

        @keyframes rotate {
            0% {
                transform: rotate(0deg) scale(1);
            }
            to {
                transform: rotate(360deg) scale(1);
            }
        }
<link rel="stylesheet" href="//cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css">

<style>
	label {
		margin: 2.5% !important;
		/* margin-left: 2.5% !important; */
		justify-content: end;
	
	}
</style>


<div class="page-wrapper">
			<!--page-content-wrapper-->
			<div class="page-content-wrapper">
				<div class="page-content">

					<div class="card radius-15">
						<div class="card-body">
							<div class="card-title">
								<div class=" align-items-center">
								<div class="col-6"><h4 class="mb-0">Feedback Details</h4></div>
								<!-- <div class="col-6" align="right">
									 <a href="<?php echo base_url('admin/notice/create'); ?>" class="btn btn-primary">Create</a> -->
								<!-- </div> --> 
								</div>
							</div>
							<hr/>
							<div class="table-responsive ">
								<table id="gallerytable" class="table mb-0 table-bordered table-striped ">
									<thead class="bg-primary text-white text-center ">
										<tr class="text-white">
											<th scope="col" class="text-white">Reason for visit</th>
											<th scope="col" class="text-white">FIR registered</th>
											<th scope="col" class="text-white">Issue addressed</th>
											<th scope="col" class="text-white">Police officer name </th>
											<th scope="col" class="text-white">Served you better</th>
											<th scope="col" class="text-white">Rate Bandra Police Station</th>
											<th scope="col" class="text-white">Victim of crime</th>
											<th scope="col" class="text-white">Safe Bandra West area</th>
											<th scope="col" class="text-white">Rate overall performance</th>
											<th scope="col" class="text-white">We contact you</th>
											<!-- <th scope="col" class="text-white">12</th>
											<th scope="col" class="text-white">13</th>
											<th scope="col" class="text-white">14</th>
											<th scope="col" class="text-white">15</th>
											<th scope="col" class="text-white">16</th>  -->
											<!-- <th scope="col" class="text-white">17</th> -->
										</tr>
									</thead>
									<tbody>
										<?php 
										
										if(!empty($feedbacklist)) { foreach($feedbacklist as $feedback) {?>
										<tr class="text-center">
											<td><?php echo $feedback->f_reason_for_visit_police_station;?></td>
											<td><?php echo $feedback->f_fir_registered;?></td>
											<td><?php echo $feedback->f_issue_addressed;?></td>
											<td><?php echo $feedback->f_police_officer_name;?></td>
											<td><?php echo $feedback->f_served_you_better;?></td>
											<td><?php echo $feedback->f_rate_bandra_police_station;?></td>
											<td><?php echo $feedback->f_victim_of_a_crime;?></td>
											<td><?php echo $feedback->f_feel_safe_in_the_bandra_west;?></td>
											<td><?php echo $feedback->f_rate_of_overall_performance;?></td>
											<td><?php echo $feedback->f_contact;?></td>
										</tr>
										<?php }} ?>
									</tbody>
								</table>
							</div>
						</div>
					</div>

			</div>
		</div>
	</div>

	<!--Datatable-->
<script src="//cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>


<script type="text/javascript">
    $('#gallerytable').DataTable();
</script>

<script type="text/javascript">

   function delete_now(n_id){

   	//console.log(b_id);
   	   var url= "<?php echo base_url('admin/notice/delete?id=') ?>" + n_id;
       var r=confirm("Do you want to delete this?")
        if (r==true){
        	//console.log(url);
         window.location.href = url;
        }
        else{
        	return false;
        }
        
          
        
   }
</script>
def reverse_string(word):
    reversed_word = ""
    for char in word:
        reversed_word = char + reversed_word
    reversed_word_caps = reversed_word.upper()
    string_count = len(word)
    return reversed_word, reversed_word_caps, string_count

#Get user input
user_input = input("Enter a word: ")

#Call the function to reverse the string
reversed_word, reversed_word_caps, string_count = reverse_string(user_input)

#Display the result
print(f"INPUT: {user_input}")
print(f"OUTPUT: {reversed_word_caps} ({string_count} characters)")
def compute_average_grade():
    #Get user input
    name = input("Name: ")
    math_grade = float(input("Math: "))
    science_grade = float(input("Science: "))
    english_grade = float(input("English: "))

    #Calculate average
    average = (math_grade + science_grade + english_grade) / 3

    #Determine status
    if average >= 75:
        status = "Passed"
        message = "Congrats! You passed the semester."
        if average >= 75 and english_grade < 75:
            message += f" But you need to re-enroll in the English subject."
        elif average >= 75 and science_grade < 75:
            message += f" But you need to re-enroll in the Science subject."
        elif average >= 75 and math_grade < 75:
            message += f" But you need to re-enroll in the Math subject."
    else:
        status = "Failed"
        message = "You failed the semester."

    #Display results
    print(f"\nAverage: {average:.1f}")
    print(f"{message}")

#Run the program
compute_average_grade()
# Constant variables
RATE_PER_HOUR = 500
TAX_RATE = 0.10

#User inputs
employee_name = input("Employee Name: ")
hours_worked = float(input("Enter number of hours: "))
sss_contribution = float(input("SSS contribution: "))
philhealth_contribution = float(input("PhilHealth contribution: "))
house_loan = float(input("Housing Loan: "))

#Calculations
gross_salary = RATE_PER_HOUR * hours_worked
tax_deduction = gross_salary * TAX_RATE
total_deductions = sss_contribution + philhealth_contribution + house_loan + tax_deduction
net_salary = gross_salary - total_deductions

#Display Employee Information
print("\n==========PAYSLIP==========")
print("\n==========EMPLOYEE INFORMATION==========\n")
print("Employee Name:", employee_name)
print("Rendered Hours:", hours_worked)
print("Rate per Hour:", RATE_PER_HOUR)
print("Gross Salary:", gross_salary)

#Display Deductions
print("\n==========DEDUCTIONS==========\n")
print("SSS:", sss_contribution)
print("PhilHealth:", philhealth_contribution)
print("Other Loan:", house_loan)
print("Tax:", tax_deduction)
print("Total Deductions:", total_deductions)


print("Net Salary:", net_salary)
#Create variables using input function
name = input("Enter your name: ")
math = float(input("Enter your Math Grade: "))
science = float(input("Enter your Science Grade: "))
english = int(input("Enter your English Grade: "))

#Calculate average
average = (math + science + english) / 3
average = round(average, 2)  

#Display the results
print("\nName:", name)
print("Math Grade:", math)
print("Science Grade:", science)
print("English Grade:", english)
print("Average:", average)



/*** +page.svelte **/

<script>
	import { onMount } from 'svelte';
	
	let Thing;
	
	const sleep = ms => new Promise(f => setTimeout(f, ms));
	
	onMount(async () => {
		await sleep(1000); // simulate network delay
		Thing = (await import('./Thing.svelte')).default;
	});
</script>

<svelte:component this={Thing} answer={42}>
	<p>some slotted content</p>
</svelte:component>



/*** Thing.svelte ***/

<script>
	export let answer;
</script>

<p>the answer is {answer}</p>
<slot></slot>

/* +page.svelte **/

<script>
    import Component2 from "./Component2.svelte";
    
    function abc() {
    	const element = new Component2({
    		target: document.querySelector('#abc')
    	})
    }
</script>

<div id="abc" use:abc>dsaads</div>

/* Component2.svelte **/

<script>
  export let params;
</script>
<div>
	<table>
		<tr>
			<td>dsadasads</td>
		</tr>
	</table>
</div>
/* +page.svelte **/

<script>
    import Component2 from "./Component2.svelte";
    
    function abc() {
    	const element = new Component2({
    		target: document.querySelector('#abc')
    	})
    }
</script>

<div id="abc" use:abc>dsaads</div>

/* Component2.svelte **/

<script>
  export let params;
</script>
<div>
	<table>
		<tr>
			<td>dsadasads</td>
		</tr>
	</table>
</div>
var grIncident = new GlideRecord('incident');
grIncident.addExtraField("caller_id.department.dept_head.name"); 
grIncident.addQuery("sys_id", "c74706c61b670094bd8120a13d4bcb03");
grIncident.query();
 
while(grIncident.next()){
  gs.info(grIncident.caller_id.department.dept_head.name.getDisplayValue())
}
add_action('init', 'services_post_type_init');
function services_post_type_init()
{
 
    $labels = array(
 
        'name' => __('Services', 'post type general name', ''),
        'singular_name' => __('Service', 'post type singular name', ''),
        'add_new' => __('Add New', 'Services', ''),
        'add_new_item' => __('Add New Service', ''),
        'edit_item' => __('Edit Service', ''),
        'new_item' => __('New Service', ''),
        'view_item' => __('View Service', ''),
        'search_items' => __('Search Services', ''),
        'not_found' =>  __('No Services found', ''),
        'not_found_in_trash' => __('No Services found in Trash', ''),
        'parent_item_colon' => ''
    );

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'rewrite' => true,
        'query_var' => true,
        'menu_icon' => 'dashicons-admin-generic',
        'capability_type' => 'post',
        'hierarchical' => true,
        'has_archive' => true,
        'show_in_nav_menus' => true,
        'menu_position' => null,
        'rewrite' => array(
            'slug' => 'services',
            'with_front' => true
        ),
        'supports' => array(
            'title',
            'editor',
            'thumbnail'
        )
    );

    register_post_type('services', $args);

    // Add a taxonomy for your custom post type
    $taxonomy_labels = array(
        'name' => _x('Service Categories', 'taxonomy general name'),
        'singular_name' => _x('Service Category', 'taxonomy singular name'),
        'search_items' =>  __('Search Service Categories'),
        'all_items' => __('All Service Categories'),
        'parent_item' => __('Parent Service Category'),
        'parent_item_colon' => __('Parent Service Category:'),
        'edit_item' => __('Edit Service Category'),
        'update_item' => __('Update Service Category'),
        'add_new_item' => __('Add New Service Category'),
        'new_item_name' => __('New Service Category Name'),
        'menu_name' => __('Service Categories'),
    );

    register_taxonomy('service_category', 'services', array(
        'hierarchical' => true,
        'labels' => $taxonomy_labels,
        'show_ui' => true,
        'query_var' => true,
        'rewrite' => array('slug' => 'service-category'),
    ));
}



// Add Shortcode [our_services];
add_shortcode('our_services', 'codex_our_services');
function codex_our_services()
{
    ob_start();
    wp_reset_postdata();
?>
 
    <div class="services-main-start">
        <div class="servicesSlider">
            <?php
            $arg = array(
                'post_type' => 'services',
                'posts_per_page' => -1,
            );
            $po = new WP_Query($arg);
            ?>
            
            <?php if ($po->have_posts()) : ?>
 
                <?php while ($po->have_posts()) : ?>
                    <?php $po->the_post(); ?>
                    
                          
                        <div class="ser-body">
                            <!--<a href="#">-->
                                <div class="thumbnail-blog">
                                    <?php echo get_the_post_thumbnail(get_the_ID(), 'full'); ?>
                                </div>
                                <div class="service-icon">
                                    <img src="<?php the_field('icon-service'); ?>">
                                </div>
                                <div class="content">
                                    <h3 class="title"><?php the_title(); ?></h3>
                                     <p><?php the_field("excerpt"); ?></p>
                                </div>
                            <!--</a>-->
                            <div class="readmore">
                                <a href="<?php the_permalink(); ?>">Read More</a>
                            </div>
                        </div>
                        
                        
                   
                <?php endwhile; ?>
 
            <?php endif; ?>
         
    </div>
    </div>
 
 
<?php
    wp_reset_postdata();
    return '' . ob_get_clean();
}
learning_rate = 1e-3
​
model = None
optimizer = None
​
################################################################################
# TODO: Instantiate and train Resnet-10.                                       #
################################################################################
# *****START OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
​
​
​
model = None
​
​
# *****END OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
################################################################################
#                                 END OF YOUR CODE                             
################################################################################
​
print_every = 700
train_part34(model, optimizer, epochs=10)
print_every = 100
########################################################################
# TODO: "Implement the forward function for the Resnet specified"        #
# above. HINT: You might need to create a helper class to              # 
# define a Resnet block and then use that block here to create         #
# the resnet layers i.e. conv2_x, conv3_x, conv4_x and conv5_x         #
########################################################################
# *****START OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
class ResNet(nn.Module):
    def __init__(self):
        super(ResNet, self).__init__()
        in_channels = 64
        out_channels = 64
        stride = 1
        self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=False)
        self.bn1 = nn.BatchNorm2d(64)
        nn.ReLU()
        self.maxpool = nn.MaxPool2d(kernel_size = 3, stride = 2, padding = 1)
        
​
        
        pass
    def forward(self):
        pass
    
    
########################################################################
#                             END OF YOUR CODE                         #
########################################################################
def maddest(d, axis=None):
    return np.mean(np.absolute(d - np.mean(d, axis)), axis)

def denoise_signal(x, wavelet='db4', level=1):
    coeff = pywt.wavedec(x, wavelet, mode="per")
    sigma = (1/0.6745) * maddest(coeff[-level])

    uthresh = sigma * np.sqrt(2*np.log(len(x)))
    coeff[1:] = (pywt.threshold(i, value=uthresh, mode='hard') for i in coeff[1:])

    return pywt.waverec(coeff, wavelet, mode='per')
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

   <script>
        function createChart(data) {
            const ctx = document.getElementById('myChart');
            new Chart(ctx, {
                type: 'bar',
                data: {
                    labels: data.labels,
                    datasets: [{
                        label: data.label,
                        data: data.data1,
                       backgroundColor: '#003f5c ',
                        borderWidth: 2
                    },
                          {
                        label: '# of Views',
                        data: data.data2,
                       backgroundColor: '#ff6e54 ',
                        borderWidth: 3
                    }    
                              
                              ]
                },
                options: {
                    scales: {
                        y: {
                            beginAtZero: true
                        }
                    }
                }
            });
        }
    </script>
/////////////////////////////////////////////////////////////////////////////////////////
//For CarApplication.java
//////////////////////////////////////////////////////////////////////////////////////////

public class CarApplication{
	public static void main(String[] args){
		
		//Create Car1 and Add values with constructor 
		Car car1 = new Car("CIVIC","2024", 7500000);
		
		//Create Car2 and Add values with constructor
		Car car2 = new Car("SWIFT","2019", 4500000);
		
		
		System.out.println("\nCar1\n");
		//Print car1 value before discount
		System.out.println("Model of Car1 = "+car1.getModel());
		System.out.println("Year of Car1 = "+car1.getYear());
		System.out.println("Price of Car1 = "+car1.getPrice()+"\n");
		
		
		car1.setDiscount(5);
		
		System.out.println("After 5% Discount");
		
		
		//Print car1 value after discount
		System.out.println("Price of Car1 = "+car1.getPrice()+"\n");
		
		
		System.out.println("Car2\n");
		
		
		//Print car1 value before discount
		System.out.println("Name of Car2 = "+car2.getModel());
		System.out.println("Year of Car2 = "+car2.getYear());
		System.out.println("Price of Car2 = "+car2.getPrice()+"\n");
		
		car2.setDiscount(7);
		
		System.out.println("After 5% Discount");
		
		//Print car1 value after discount
		System.out.println("Price of Car2 = "+car2.getPrice()+"\n");
		
		System.out.println("Numbers of Cars = "+Car.carno);
		
				
	}	
}

//////////////////////////////////////////////////////////////////////////////////////////
// FOr Car.java
//////////////////////////////////////////////////////////////////////////////////////////

public class Car{
	private String model;
	private String year;
	private double price;
	public static int carno=0;
	
	public Car(String model , String year, double price){
		setModel(model);
		setYear(year);
		setPrice(price);
		carno++;
	}
	
	public void setModel(String model){
		this.model = model;
	}
	
	public void setYear(String year){
		this.year = year;
	}
	
	public void setPrice(double price){
		if(price>0){
			this.price = price;
		}
	}
	
	public String getModel(){
		return this.model;
	}
	
	public String getYear(){
		return this.year;
	}
	
	public double getPrice(){
		return this.price;
	}
	
	public void setDis count(double discount){
		this.price =this.price - ((discount*this.price)/100);
	}
		
}

///////////////////////////////////////////////////////////////////////////////////////////
//For RectangleTest.java
///////////////////////////////////////////////////////////////////////////////////////////

public class RectangleTest{
	public static void main(String [] args){
		
		//Create rectangle1 object
		Rectangle rectangle1 = new Rectangle ();
		rectangle1.setLength(2);
		rectangle1.setWidth(4);
		
		//Print Object 1 values and method
		System.out.println("Length of Rectangle1 = "+ rectangle1.getLength());
		System.out.println("Width of Rectangle1 = "+rectangle1.getWidth());
		System.out.println("Area of Rectangle1 = "+rectangle1.getArea());
		System.out.println("Perimeter of Rectangle1 = "+rectangle1.getPerimeter());
		System.out.println();
		
		//Create rectangle2 object
		Rectangle rectangle2 = new Rectangle ();
		rectangle2.setLength(4);
		rectangle2.setWidth(6);
		
		//Print Object 2 values and method
		System.out.println("Length of Rectangle1 = "+ rectangle2.getLength());
		System.out.println("Width of Rectangle1 = "+rectangle2.getWidth());
		System.out.println("Area of Rectangle1 = "+rectangle2.getArea());
		System.out.println("Perimeter of Rectangle1 = "+rectangle2.getPerimeter());
		
		
	}
}

///////////////////////////////////////////////////////////////////////////////////////////
//For Rectangle.java
///////////////////////////////////////////////////////////////////////////////////////////


public class Rectangle{
	private double length;
	private double width;
	
	public void setLength(double length){
		this.length = length;
	}
	
	public void setWidth(double width){
		this.width = width;
	}
	
	public double getLength(){
		return length;
	}
	
	public double getWidth(){
		return width;
	}
	
	public double getArea(){
		return length * width;
	}
	
	public double getPerimeter(){
		return 2*(length + width);
	}
	
}

sudo apt update
sudo apt install mysql-server
sudo mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';
FLUSH PRIVILEGES;
exit;
<?php
function testi_loop()
{
    $arg = array(
        'post_type' => 'testimonial',
        'posts_per_page' => -1,
    );
    $testiPost = new WP_Query($arg);

    if ($testiPost->have_posts()): ?>
        <div class="testiWrapper">
            <div class="swiper testimonialsChild">
                <div class="swiper-wrapper">
                    <?php while ($testiPost->have_posts()):
                        $testiPost->the_post();
                        $url = wp_get_attachment_url(get_post_thumbnail_id($testiPost->ID)); ?>
                        <div class="swiper-slide singleTesti">
                            <div class="row">
                                <div class="col-md-8">
                                    <div class="testiReview-areaWrapper">
                                        <div class="testiReview-area">
                                            <h4>
                                                <?php the_title(); ?>
                                            </h4>
                                            <?php the_content(); ?>
                                            <div class="testi-chat-img">
                                                <img src="<?php the_field('testimonial_chatimg'); ?>" alt="profile">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="profileArea">
                                        <div class="profileImgWrapper">
                                            <img src="<?php echo $url; ?>" alt="profile">
                                        </div>
                                        <div class="authortesti">
                                            <h6>
                                                <?php the_field('client_name'); ?>
                                            </h6>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php endwhile; ?>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
    <?php endif;
    wp_reset_postdata();
}
add_shortcode('testi', 'testi_loop');
?>

<?php
function team_loop()
{
    $arg = array(
        'post_type' => 'team',
        'posts_per_page' => -1,
    );
    $teamPost = new WP_Query($arg);

    if ($teamPost->have_posts()): ?>
        <div class="swiper teamswiper">
            <div class="swiper-wrapper">
                <?php while ($teamPost->have_posts()):
                    $teamPost->the_post();
                    $url = wp_get_attachment_url(get_post_thumbnail_id($teamPost->ID)); ?>
                    <div class="swiper-slide">
                        <img src="<?php echo $url; ?>" alt="">
                        <div class="team-content">
                            <div class="team-social-wrapp">
                                <div class="team-social">
                                    <div class="share"><i class="fa-solid fa-share-nodes"></i></div>
                                    <div class="team-social-icons">
                                        <a><i class="fa-brands fa-facebook-f"></i></a>
                                        <a><i class="fa-brands fa-twitter"></i></a>
                                        <a><i class="fa-brands fa-linkedin-in"></i></a>
                                        <a><i class="fa-brands fa-square-instagram"></i></a>
                                    </div>
                                </div>
                            </div>
                            <h3>
                                <?php the_title(); ?>
                            </h3>
                            <?php the_content(); ?>
                        </div>
                    </div>
                <?php endwhile; ?>
            </div>
        </div>
    <?php endif;
    wp_reset_postdata();
}
add_shortcode('team', 'team_loop');
?>


<?php
function blog_loop()
{
    $arg = array(
        'post_type' => 'post',
        'posts_per_page' => 3,
    );
    $blogPost = new WP_Query($arg);

    ?>
    <div class="blog-card-sec">
        <div class="row">
            <?php if ($blogPost->have_posts()): ?>
                <?php while ($blogPost->have_posts()): ?>
                    <?php $blogPost->the_post();
                    $url = wp_get_attachment_url(get_post_thumbnail_id($blogPost->ID)); ?>
                    <div class="col-md-4">
                        <div class="blogcard">
                            <img src="<?php echo $url ?>" alt="" width="100%" class="blogcard-img">
                            <div class="blog-card-wrapper">
                                <div class="blog-inner">
                                    <div class="blog-status">
                                        <div class="blog-status-img">
                                            <img src="<?php echo get_template_directory_uri(); ?>/images/Content/calendar.png"
                                                alt="">
                                        </div>
                                        <h6>
                                            <?php the_time('j F, Y'); ?>
                                        </h6>
                                    </div>
                                    <div class="blog-status">
                                        <div class="blog-status-img">
                                            <img src="<?php echo get_template_directory_uri(); ?>/images/Content/user.png" alt="">
                                        </div>
                                        <h6>
                                            <?php the_author(); ?>
                                        </h6>
                                    </div>
                                </div>
                                <div class="blog-card-content">
                                    <?php $title = get_the_title();
                                    ?>
                                    <h3><a href="<?php the_permalink(); ?>">
                                            <?php echo substr($title, 0, 34); ?>
                                        </a></h3>
                                    <?php $content = get_the_content();
                                    ?>
                                    <div class="post-content">
                                        <p>
                                            <?php echo substr($content, 0, 108); ?>
                                        </p>
                                    </div>
                                    <a href="<?php the_permalink(); ?>">Read More</a>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endwhile; ?>
            <?php endif; ?>
        </div>
    </div>

    <?php
    wp_reset_postdata();
}
add_shortcode('blogAll', 'blog_loop');
?>

<?php
function posta_loop()
{
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $arg = array(
        'post_type' => 'post',
        'posts_per_page' => 4,
        'paged' => $paged
    );
    $blogPost = new WP_Query($arg);
    ?>
    <div id="mainBlog" class="blog-left">
        <?php if ($blogPost->have_posts()): ?>
            <?php while ($blogPost->have_posts()): ?>
                <?php $blogPost->the_post();
                $content = get_the_content();
                ?>
                <div class="single-blog-box">
                    <img src="<?php the_post_thumbnail_url('full'); ?>" alt="" width="100%" class="single-img">
                    <div class="single-blog-cont">
                        <div class="blog-authors">
                            <div class="blog-authors-inner">
                                <div class="blog-authors-icons">
                                    <img src="<?php echo get_template_directory_uri(); ?>/images/blog/user.png" alt="">
                                </div>
                                <h6>
                                    <?php the_author(); ?>
                                </h6>
                            </div>
                            <div class="blog-authors-inner">
                                <div class="blog-authors-icons">
                                    <img src="<?php echo get_template_directory_uri(); ?>/images/blog/chat.png" alt="">
                                </div>
                                <h6>
                                    <?php the_time('j F, Y'); ?>
                                </h6>
                            </div>
                            <div class="blog-authors-inner">
                                <div class="blog-authors-icons">
                                    <img src="<?php echo get_template_directory_uri(); ?>/images/blog/calendar.png" alt="">
                                </div>
                                <h6>No Comments</h6>
                            </div>
                        </div>
                        <h3>
                            <?php the_title(); ?>
                        </h3>
                        <?php $content = get_the_content();
                        ?>
                        <p>
                            <?php echo substr($content, 0, 308); ?>
                        </p>
                        <a href="<?php the_permalink(); ?>">Read More</a>
                    </div>
                </div>
            <?php endwhile; ?>
            <?php
            $big = 99;

            echo '<div class="pagination">';

            echo paginate_links(
                array(
                    'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
                    'format' => '?paged=%#%',
                    'current' => max(1, get_query_var('paged')),
                    'total' => $blogPost->max_num_pages,
                    'show_all' => false,
                    'prev_next' => false,
                    'before_page_number' => '0',
                    'prev_text' => __('Previous'),
                    'next_text' => __('Next'),
                    'type' => 'list',
                    'mid_size' => 2
                )
            );
            $next_link = get_next_posts_link('Next Page', $blogPost->max_num_pages);
            if ($next_link) {
                echo '<button>' . $next_link . '</button>';
            }

            echo '</div>';
            ?>
        <?php endif; ?>
    </div>
    <?php
    wp_reset_postdata();
}
add_shortcode('allBlogsss', 'posta_loop');
?>

<?php

function dynamic_categories_shortcode()
{
    ob_start();

    $categories = get_categories(
        array(
            'taxonomy' => 'category',
            'object_type' => array('post', 'blogPost'),
        )
    );

    if ($categories) {
        echo '<div class="categories">';
        echo '<h4>Categories</h4>';
        echo '<ul>';
        foreach ($categories as $category) {
            echo '<li><a href="' . esc_url(get_category_link($category->term_id)) . '">' . esc_html($category->name) . '</a></li>';
        }
        echo '</ul>';
        echo '</div>';
    }

    $output = ob_get_clean();
    return $output;
}
add_shortcode('dynamicCategories', 'dynamic_categories_shortcode');
?>


<?php
function faq_loop()
{
    $args = array(
        'post_type' => 'faq',
        'posts_per_page' => -1,
    );
    $faq_posts = new WP_Query($args);
    if ($faq_posts->have_posts()): ?>
        <div class="row">
            <div class="col-md-6">
                <div class="accordion" id="accordionLeft">
                    <?php $count = 0; ?>
                    <?php while ($faq_posts->have_posts() && $count < 4):
                        $faq_posts->the_post(); ?>
                        <div class="accordion-item">
                            <h2 class="accordion-header" id="heading-<?php the_ID(); ?>">
                                <button class="accordion-button<?php echo ($count === 0) ? '' : ' collapsed'; ?>" type="button"
                                    data-bs-toggle="collapse" data-bs-target="#collapse-<?php the_ID(); ?>"
                                    aria-expanded="<?php echo ($count === 0) ? 'true' : 'false'; ?>"
                                    aria-controls="collapse-<?php the_ID(); ?>">
                                    <?php the_title(); ?>
                                </button>
                            </h2>
                            <div id="collapse-<?php the_ID(); ?>" class="accordion-collapse collapse<?php if ($count === 0)
                                  echo ' show'; ?>" aria-labelledby="heading-<?php the_ID(); ?>"
                                data-bs-parent="#accordionRight">
                                <div class="accordion-body">
                                    <?php the_content(); ?>
                                </div>
                            </div>
                        </div>
                        <?php $count++; ?>
                    <?php endwhile; ?>
                </div>
            </div>
            <div class="col-md-6">
                <div class="accordion" id="accordionRight">
                    <?php while ($faq_posts->have_posts()):
                        $faq_posts->the_post(); ?>
                        <div class="accordion-item">
                            <h2 class="accordion-header" id="heading-<?php the_ID(); ?>">
                                <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                                    data-bs-target="#collapse-<?php the_ID(); ?>" aria-expanded="false"
                                    aria-controls="collapse-<?php the_ID(); ?>">
                                    <?php the_title(); ?>
                                </button>
                            </h2>
                            <div id="collapse-<?php the_ID(); ?>" class="accordion-collapse collapse"
                                aria-labelledby="heading-<?php the_ID(); ?>" data-bs-parent="#accordionRight">
                                <div class="accordion-body">
                                    <?php the_content(); ?>
                                </div>
                            </div>
                        </div>
                    <?php endwhile; ?>
                </div>
            </div>
        </div>
    <?php endif;
    wp_reset_postdata();
}
add_shortcode('faq', 'faq_loop');
?>


<?php
function generate_tab_navigation()
{
    $args = array('post_type' => 'casestudie', 'posts_per_page' => -1);
    $casestudiePost = new WP_Query($args);
    if ($casestudiePost->have_posts()): ?>
        <div class="project-tabs-wrapper">
            <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
                <?php
                $nav_counter = 1;
                while ($casestudiePost->have_posts()):
                    $casestudiePost->the_post(); ?>

                    <li class="nav-item" role="presentation">
                        <button class="nav-link <?php echo ($nav_counter === 1) ? 'active' : ''; ?>"
                            id="pills-home-tab-<?php echo $nav_counter; ?>-tab" data-bs-toggle="pill"
                            data-bs-target="#pills-home-<?php echo $nav_counter; ?>" type="button" role="tab"
                            aria-controls="pills-home-<?php echo $nav_counter; ?>"
                            aria-selected="<?php echo ($nav_counter === 1) ? 'true' : 'false'; ?>">
                            <?php the_title(); ?>
                        </button>
                    </li>
                    <?php $nav_counter++;
                endwhile; ?>
            </ul>
        </div>

        <?php
    endif;
    wp_reset_postdata();
}


function generate_tab_content()
{
    $args = array('post_type' => 'casestudie', 'posts_per_page' => -1);
    $casestudiePost = new WP_Query($args);
    if ($casestudiePost->have_posts()): ?>
        <div class="verticl-tab-cont">
            <div class="tab-content" id="v-pills-tabContent">
                <?php
                $content_counter = 1;
                while ($casestudiePost->have_posts()):
                    $casestudiePost->the_post(); ?>
                    <div class="tab-pane fade <?php echo ($content_counter === 1) ? 'show active' : ''; ?>"
                        id="pills-home-<?php echo $content_counter; ?>" role="tabpanel"
                        aria-labelledby="pills-home-tab-<?php echo $content_counter; ?>-tab">
                        <div class="tabs-content-wrapper">
                            <div class="row">
                                <?php
                                $repeatcont = get_field('caserepeaters');
                                foreach ($repeatcont as $repeatcase) { ?>
                                    <div class="col-md-6">
                                        <div class="single-project-card">
                                            <img src="<?php echo $repeatcase['casetabs_img'] ?>">
                                            <div class="project-card-cont">
                                                <div class="projectcard-tittle">
                                                    <h3>
                                                        <?php echo $repeatcase['casetabs_tittle'] ?>
                                                    </h3>
                                                    <h6>
                                                        <?php echo $repeatcase['casetabs_date'] ?>
                                                    </h6>
                                                </div>
                                                <?php echo $repeatcase['casetab_para'] ?>
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                } ?>
                            </div>
                        </div>
                    </div>
                    <?php $content_counter++;
                endwhile; ?>
            </div>
        </div>
        <?php
    endif;
    wp_reset_postdata();
}

function casestudies_tab_navigation_shortcode()
{
    ob_start();
    generate_tab_navigation();
    return ob_get_clean();
}
add_shortcode('casestudies_tabs', 'casestudies_tab_navigation_shortcode');

function casestudies_tab_content_shortcode()
{
    ob_start();
    generate_tab_content();
    return ob_get_clean();
}
add_shortcode('casestudies_content', 'casestudies_tab_content_shortcode');
?>





<?php
function ecommerceguru_shortcode()
{
    ob_start();
    ?>
    <div class="swiper GameGurruswiper">
        <div class="swiper-wrapper">
            <?php
            $arg = array(
                'post_type' => 'gamingguru',
                'posts_per_page' => -1,
            );
            $gamingguruPost = new WP_Query($arg);

            if ($gamingguruPost->have_posts()):
                while ($gamingguruPost->have_posts()):
                    $gamingguruPost->the_post();
                    ?>
                    <div class="swiper-slide">
                        <div class="gaminggurruTabsWrapper">
                            <div class="gaminggurruTabs-btn">
                                <div class="nav nav-tabs" id="gaminggurruTabs<?php echo get_the_ID(); ?>" role="tablist">
                                    <button class="nav-link active" id="nav-home<?php echo get_the_ID(); ?>-tab"
                                        data-bs-toggle="tab" data-bs-target="#nav-home<?php echo get_the_ID(); ?>" type="button"
                                        role="tab" aria-controls="nav-home<?php echo get_the_ID(); ?>" aria-selected="true">
                                        <img src="<?php echo get_field('first_profile_tabimg'); ?>" alt="">
                                    </button>
                                    <button class="nav-link" id="nav-home2<?php echo get_the_ID(); ?>-tab" data-bs-toggle="tab"
                                        data-bs-target="#nav-home2<?php echo get_the_ID(); ?>" type="button" role="tab"
                                        aria-controls="nav-home2<?php echo get_the_ID(); ?>" aria-selected="false">
                                        <img src="<?php echo get_field('caseprofile_tabimg'); ?>" alt="">
                                    </button>
                                </div>
                            </div>
                            <div class="tab-content" id="nav-tabContent">
                                <div class="tab-pane fade show active" id="nav-home<?php echo get_the_ID(); ?>" role="tabpanel"
                                    aria-labelledby="nav-home<?php echo get_the_ID(); ?>-tab">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="gameGurru-profileImg">
                                                <img src="<?php echo get_field('firstprof_mainimg'); ?>" alt="">
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="gameGurruTabs-contentWrapper">
                                                <div class="singleGameGurru">
                                                    <h2>
                                                        <?php echo get_field('first_profiletittle'); ?>
                                                    </h2>
                                                    <h3>
                                                        <?php echo get_field('first_profilesubtittle'); ?>
                                                    </h3>
                                                </div>
                                                <div class="gameGurrulLabels">
                                                    <ul>
                                                        <?php
                                                        $firstprofi = get_field('firstprofileboxes');
                                                        foreach ($firstprofi as $firstprofi): ?>
                                                            <li>
                                                                <p>
                                                                    <?php echo $firstprofi['firstprofileboxes_subtittle']; ?>
                                                                </p>
                                                                <h6>
                                                                    <?php echo $firstprofi['firstprofileboxes_tittle']; ?>
                                                                </h6>
                                                            </li>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                                <h4>
                                                    <?php echo get_field('linkedin_head'); ?>
                                                </h4>
                                                <?php echo get_field('linkedin_para'); ?>
                                                <div class="gameGurrulButtonWrapper">
                                                    <a href="<?php echo get_field('firstprof_btnlink1'); ?>">
                                                        <?php echo get_field('firstprof_btntxt1'); ?>
                                                    </a>
                                                    <a href="<?php echo get_field('firstprof_btnlink2'); ?>">
                                                        <?php echo get_field('firstprof_btntxt2'); ?>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane fade" id="nav-home2<?php echo get_the_ID(); ?>" role="tabpanel"
                                    aria-labelledby="nav-home2<?php echo get_the_ID(); ?>-tab">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="gameGurru-profileImg">
                                                <img src="<?php echo get_field('caseprof_mainimg'); ?>" alt="">
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="gameGurruTabs-contentWrapper">
                                                <div class="singleGameGurru">
                                                    <h2>
                                                        <?php echo get_field('caseprofile_tabtittle'); ?>
                                                    </h2>
                                                    <h3>
                                                        <?php echo get_field('caseprofile_tabsubtittle'); ?>
                                                    </h3>
                                                </div>
                                                <div class="gameGurrulLabels">
                                                    <ul>
                                                        <?php
                                                        $caseprofil = get_field('caseprofileboxes');
                                                        foreach ($caseprofil as $caseprofil): ?>
                                                            <li>
                                                                <p>
                                                                    <?php echo $caseprofil['caseprofileboxes_tittle']; ?>
                                                                </p>
                                                                <h6>
                                                                    <?php echo $caseprofil['caseprofileboxes_subtittle']; ?>
                                                                </h6>
                                                            </li>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                                <h4>
                                                    <?php echo get_field('linkedin_head2'); ?>
                                                </h4>
                                                <?php echo get_field('linkedin_para2'); ?>
                                                <div class="gameGurrulButtonWrapper">
                                                    <a href="<?php echo get_field('caseprof_btnlink1'); ?>">
                                                        <?php echo get_field('caseprof_btntxt1'); ?>
                                                    </a>
                                                    <a href="<?php echo get_field('caseprof_btnlink2'); ?>">
                                                        <?php echo get_field('caseprof_btntxt2'); ?>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php
                endwhile;
                wp_reset_postdata();
            endif;
            ?>
        </div>
    </div>
    <?php
    return ob_get_clean();
}
add_shortcode('ecommerceguru', 'ecommerceguru_shortcode');
?>



<?php
function gamingguru_shortcode()
{
    ob_start();
    ?>
    <div class="swiper GameGurruswiper">
        <div class="swiper-wrapper">
            <?php
            $arg = array(
                'post_type' => 'gamingguru',
                'posts_per_page' => -1,
            );
            $gamingguruPost = new WP_Query($arg);

            if ($gamingguruPost->have_posts()):
                while ($gamingguruPost->have_posts()):
                    $gamingguruPost->the_post();
                    ?>
                    <div class="swiper-slide">
                        <div class="gaminggurruTabsWrapper">
                            <div class="gaminggurruTabs-btn">
                                <div class="nav nav-tabs" id="gaminggurruTabs<?php echo get_the_ID(); ?>" role="tablist">
                                    <button class="nav-link active" id="nav-home<?php echo get_the_ID(); ?>-tab"
                                        data-bs-toggle="tab" data-bs-target="#nav-home<?php echo get_the_ID(); ?>" type="button"
                                        role="tab" aria-controls="nav-home<?php echo get_the_ID(); ?>" aria-selected="true">
                                        <img src="<?php echo get_field('gamingnormalprofile_tabimg'); ?>" alt="">
                                    </button>
                                    <button class="nav-link" id="nav-home2<?php echo get_the_ID(); ?>-tab" data-bs-toggle="tab"
                                        data-bs-target="#nav-home2<?php echo get_the_ID(); ?>" type="button" role="tab"
                                        aria-controls="nav-home2<?php echo get_the_ID(); ?>" aria-selected="false">
                                        <img src="<?php echo get_field('gamingpersonalprofile_tabimg'); ?>" alt="">
                                    </button>
                                </div>
                            </div>
                            <div class="tab-content" id="nav-tabContent">
                                <div class="tab-pane fade show active" id="nav-home<?php echo get_the_ID(); ?>" role="tabpanel"
                                    aria-labelledby="nav-home<?php echo get_the_ID(); ?>-tab">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="gameGurru-profileImg">
                                                <img src="<?php echo get_field('gamingnormalprofile_mainimg'); ?>" alt="">
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="gameGurruTabs-contentWrapper">
                                                <div class="singleGameGurru">
                                                    <h2>
                                                        <?php echo get_field('gamingnormalprofile_tabtittle'); ?>
                                                    </h2>
                                                    <h3>
                                                        <?php echo get_field('gamingnormalprofile_tabsubtittle'); ?>
                                                    </h3>
                                                </div>
                                                <div class="gameGurrulLabels">
                                                    <ul>
                                                        <?php
                                                        $gamingnormalprofilebox = get_field('gamingnormalprofileboxes');
                                                        foreach ($gamingnormalprofilebox as $gamingnormalprofilebox): ?>
                                                            <li>
                                                                <p>
                                                                    <?php echo $gamingnormalprofilebox['gamingnormalprofileboxes_tittle']; ?>
                                                                </p>
                                                                <h6>
                                                                    <?php echo $gamingnormalprofilebox['gamingnormalprofileboxes_subtittle']; ?>
                                                                </h6>
                                                            </li>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                                <h4>
                                                    <?php echo get_field('gamingnormalprofile_linkedin_head'); ?>
                                                </h4>
                                                <?php echo get_field('gamingnormalprofile_linkedin_para'); ?>
                                                <div class="gameGurrulButtonWrapper">
                                                    <a href="<?php echo get_field('gamingnormalprofile_first_btnlink1'); ?>">
                                                        <?php echo get_field('gamingnormalprofile_firstprof_btntxt1'); ?>
                                                    </a>
                                                    <a href="<?php echo get_field('gamingnormalprofile_first_btnlink2'); ?>">
                                                        <?php echo get_field('gamingnormalprofile_firstprof_btntxt2'); ?>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane fade" id="nav-home2<?php echo get_the_ID(); ?>" role="tabpanel"
                                    aria-labelledby="nav-home2<?php echo get_the_ID(); ?>-tab">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="gameGurru-profileImg">
                                                <img src="<?php echo get_field('gamingpersonalprofileboxes_mainimg'); ?>" alt="">
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="gameGurruTabs-contentWrapper">
                                                <div class="singleGameGurru">
                                                    <h2>
                                                        <?php echo get_field('gamingpersonalprofile_tabtittle'); ?>
                                                    </h2>
                                                    <h3>
                                                        <?php echo get_field('gamingpersonalprofile_tabsubtittle'); ?>
                                                    </h3>
                                                </div>
                                                <div class="gameGurrulLabels">
                                                    <ul>
                                                        <?php
                                                        $gamingpersonalprofilebox = get_field('gamingpersonalprofileboxes');
                                                        foreach ($gamingpersonalprofilebox as $gamingpersonalprofilebox): ?>
                                                            <li>
                                                                <p>
                                                                    <?php echo $gamingpersonalprofilebox['gamingpersonalprofileboxes_tittle']; ?>
                                                                </p>
                                                                <h6>
                                                                    <?php echo $gamingpersonalprofilebox['gamingpersonalprofileboxes_subtittle']; ?>
                                                                </h6>
                                                            </li>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                                <h4>
                                                    <?php echo get_field('gamingpersonalprofile_linkdin_head'); ?>
                                                </h4>
                                                <?php echo get_field('gamingpersonalprofile_linkdin_para'); ?>
                                                <div class="gameGurrulButtonWrapper">
                                                    <a href="<?php echo get_field('gamingpersonalprofile_firstprof_btnlink1'); ?>">
                                                        <?php echo get_field('gamingpersonalprofile__firstprof_btntxt1'); ?>
                                                    </a>
                                                    <a href="<?php echo get_field('gamingpersonalprofile_firstprof_btnlink_2'); ?>">
                                                        <?php echo get_field('gamingpersonalprofile_firstprof_btntxt2'); ?>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php
                endwhile;
                wp_reset_postdata();
            endif;
            ?>
        </div>
    </div>
    <?php
    return ob_get_clean();
}
add_shortcode('gamingguru', 'gamingguru_shortcode');
?>


<?php


function generate_gamingtab_navigation()
{
    $args = array('post_type' => 'gamingtab', 'posts_per_page' => -1);
    $gamingtabPost = new WP_Query($args);
    if ($gamingtabPost->have_posts()): ?>
        <div class="gamegallery-tabs">
            <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
                <?php
                $nav_counter = 1;
                while ($gamingtabPost->have_posts()):
                    $gamingtabPost->the_post(); ?>
                    <button class="nav-link" id="v-pills-<?php echo $nav_counter; ?>-tab" data-bs-toggle="pill"
                        data-bs-target="#v-pills-<?php echo $nav_counter; ?>" type="button" role="tab"
                        aria-controls="v-pills-<?php echo $nav_counter; ?>" aria-selected="true">
                        <div class="accordion" id="accordion-<?php echo $nav_counter; ?>">
                            <div class="accordion-item">
                                <h2 class="accordion-header" id="heading-<?php echo $nav_counter; ?>">
                                    <div class="accordion-button" type="button" data-bs-toggle="collapse"
                                        data-bs-target="#collapse-<?php echo $nav_counter; ?>"
                                        aria-expanded="<?php echo ($nav_counter == 1) ? 'true' : 'false'; ?>"
                                        aria-controls="collapse-<?php echo $nav_counter; ?>">
                                        <span>
                                            <?php the_title(); ?>
                                        </span>
                                    </div>
                                </h2>
                                <div id="collapse-<?php echo $nav_counter; ?>"
                                    class="accordion-collapse <?php echo ($nav_counter == 1) ? 'show' : 'collapse'; ?>"
                                    aria-labelledby="heading-<?php echo $nav_counter; ?>"
                                    data-bs-parent="#accordion-<?php echo $nav_counter; ?>">
                                    <div class="accordion-body">
                                        <?php
                                        $mainimagestabs_nav = get_field('mainimagestabs');
                                        if ($mainimagestabs_nav):
                                            foreach ($mainimagestabs_nav as $index => $mainimagestab): ?>
                                                <div
                                                    onclick="showImage('<?php echo $mainimagestab['main_images_tabs_id']; ?>', '<?php echo $mainimagestab['main_images_tab_img']; ?>')">
                                                    <span>
                                                        <?php echo $mainimagestab['main_images_tabs_tittle']; ?>
                                                    </span>
                                                </div>
                                            <?php endforeach;
                                        endif; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </button>
                    <?php $nav_counter++;
                endwhile; ?>
            </div>
        </div>
        <?php
    endif;
    wp_reset_postdata();
}

function gamingtab_tab_content()
{
    $args = array('post_type' => 'gamingtab', 'posts_per_page' => -1);
    $gamingtabPost = new WP_Query($args);
    if ($gamingtabPost->have_posts()): ?>
        <div class="tab-content" id="v-pills-tabContent">
            <?php
            $content_counter = 1;
            while ($gamingtabPost->have_posts()):
                $gamingtabPost->the_post(); ?>
                <div class="tab-pane fade <?php echo ($content_counter === 1) ? 'show active' : ''; ?>"
                    id="v-pills-<?php echo $content_counter; ?>" role="tabpanel"
                    aria-labelledby="v-pills-<?php echo $content_counter; ?>-tab">
                    <div class="main-tabcont-wrapper">
                    
                        <div class="gameimage-container">
                            <?php
                            $mainimagestabs_content = get_field('mainimagestabs');
                            if ($mainimagestabs_content):
                                foreach ($mainimagestabs_content as $index => $mainimagestab): ?>
                                    <?php if ($index === 0): ?>
                                        <div class="gameimage active" id="<?php echo $mainimagestab['main_images_tabs_id']; ?>">
                                            <img src="<?php echo $mainimagestab['main_images_tab_img']; ?>" alt="">
                                        </div>
                                    <?php else: ?>
                                        <div class="gameimage" id="<?php echo $mainimagestab['main_images_tabs_id']; ?>">
                                            <img src="<?php echo $mainimagestab['main_images_tab_img']; ?>" alt="">
                                        </div>
                                    <?php endif; ?>
                                <?php endforeach;
                            endif; ?>
                        </div>
                        <div class="gamestabs-uppercont">
                            <?php the_content(); ?>
                            <div class="gamestabs-imggrid">
                                <?php
                                $imageboxes = get_field('imageboxes');
                                foreach ($imageboxes as $imagebox): ?>
                                    <div class="gametabs-img active">
                                        <img src="<?php echo $imagebox['imageboxes_img']; ?>" alt="">
                                        <h4>
                                            <?php echo $imagebox['imageboxes_tittle']; ?>
                                        </h4>
                                    </div>
                                <?php endforeach; ?>
                            </div>
                        </div>
                    </div>
                </div>
                <?php $content_counter++;
            endwhile; ?>
        </div>
        <?php
    endif;
    wp_reset_postdata();
}





function generate_gamingtab_navigation_shortcode()
{
    ob_start();
    generate_gamingtab_navigation();
    return ob_get_clean();
}
add_shortcode('gamingtab_tabs', 'generate_gamingtab_navigation_shortcode');

function gamingtab_tab_content_shortcode()
{
    ob_start();
    gamingtab_tab_content();
    return ob_get_clean();
}
add_shortcode('gamingtab_content', 'gamingtab_tab_content_shortcode');

?>
a=int(input("enter a"))
b=int(input("enter b"))
c=int(input("enter c"))
if(a==0):
                print("quadratic does not exist")
else:
                d=b*b-4*a*c
                if(d>0):
                                x=(-b+sqrt(d))/2*a
                                y=(-b-sqrt(d))/2*a
                                print(x,y)
                elif(d==0):
                                    x=-b/(2*a)
                                    y=-b/(2*a)
                                    print(x,y)
                else:
                                    print("roots are imaginary")
p=int(input("inter p="))
x=0
n=2
while (n<p):
  if (p%n==0):
    x=1
  n=n+1
if (x==1):
  print("given number is not a prime number")
else:
  print("given number is a prime number")
import calmap

temp_df = df.groupby(["state_id", "date"])["value"].sum()
temp_df = temp_df.reset_index()
temp_df = temp_df.set_index("date")

fig, axs = plt.subplots(3, 1, figsize=(10, 10))
calmap.yearplot(temp_df.loc[temp_df["state_id"] == "CA", "value"], year=2015, ax=axs[0])
axs[0].set_title("CA")
calmap.yearplot(temp_df.loc[temp_df["state_id"] == "TX", "value"], year=2015, ax=axs[1])
axs[1].set_title("TX")
calmap.yearplot(temp_df.loc[temp_df["state_id"] == "WI", "value"], year=2015, ax=axs[2])
axs[2].set_title("WI")
import { getMessaging, onBackgroundMessage } from "firebase/messaging/sw"; // note: we MUST use the sw version of the messaging API and NOT the one from "firebase/messaging"
import { getToken } from "firebase/messaging";
import { initializeApp } from "firebase/app";

const firebase = initializeApp({
  // your Firebase config here
});

chrome.runtime.onInstalled.addListener(async () => {
  const token = await getToken(getMessaging(), {
    serviceWorkerRegistration: self.registration, // note: we use the sw of ourself to register with
  });

  // Now pass this token to your server and use it to send push notifications to this user
});

onBackgroundMessage(getMessaging(firebase), async (payload) => {
  console.log(`Huzzah! A Message.`, payload);

  // Note: you will need to open a notification here or the browser will do it for you.. something, something, security
});
html {
  font-size: 100%;
  line-height: 1.5;
}

main {
  padding: 1rlh; /* 🫶 */
}
Buy mind warp strain cake Disposable
https://darkwebmarketbuyer.com/product/mind-warp-cake-disposable/
Buy Cake Carts Mind Warp - Mind Warp Cake Disposable
Cake carts Mind Warp. A cake delta 8 carts to get you out of your melancholy night!

Mind Warp is a Sativa ruling half-breed (70% Sativa/30% Indica) cartridge with a name that sounds like a fast entertainment ride. This strong cartridge is famous for its mind-dissolving powers, which may rapidly end up being a lot for unpracticed clients, and is energized by a THC content as high as 89-95%. Some might be misdirected by the sensitive fragrance of this bud, which has a strong extravagant, natural pine smell. You’ll detect the force of this cartridge when you taste it, so it’s ideally suited for hauling the individual out of the desolate night.
 <div class="col-md-6">
                <div class="accordion" id="accordionLeft">
                    <?php $count = 0; ?>
                    <?php while ($faq_posts->have_posts() && $count < 4):
                        $faq_posts->the_post(); ?>
<div class="accordion-item">
    <h2 class="accordion-header" id="heading-<?php the_ID(); ?>">
        <button class="accordion-button<?php echo ($count === 0) ? '' : ' collapsed'; ?>" type="button" data-bs-toggle="collapse"
            data-bs-target="#collapse-<?php the_ID(); ?>" aria-expanded="<?php echo ($count === 0) ? 'true' : 'false'; ?>"
            aria-controls="collapse-<?php the_ID(); ?>">
            <?php the_title(); ?>
        </button>
    </h2>
    <div id="collapse-<?php the_ID(); ?>" class="accordion-collapse collapse<?php if ($count === 0) echo ' show'; ?>"
        aria-labelledby="heading-<?php the_ID(); ?>" data-bs-parent="#accordionRight">
        <div class="accordion-body">
            <?php the_content(); ?>
        </div>
    </div>
</div>
                        <?php $count++; ?>
                    <?php endwhile; ?>
                </div>
            </div>
$numericArray = array("Apple", "Banana", "Orange");

$i = 0;
do {
    echo $numericArray[$i] . "<br>";
    $i++;
} while ($i < count($numericArray));
$numericArray = array("Apple", "Banana", "Orange");

$i = 0;
while ($i < count($numericArray)) {
    echo $numericArray[$i] . "<br>";
    $i++;
}
$assocArray = array("name" => "John", "age" => 25, "city" => "New York");

foreach ($assocArray as $key => $value) {
    echo "$key: $value <br>";
}
$numericArray = array("Apple", "Banana", "Orange");

foreach ($numericArray as $value) {
    echo $value . "<br>";
}
$numericArray = array("Apple", "Banana", "Orange");

for ($i = 0; $i < count($numericArray); $i++) {
    echo $numericArray[$i] . "<br>";
}
[DataContractAttribute]
public class NW_POConfirmationContract
{
    str 25            RequestID;
    TransDate         RequestDate;
    PurchIdBase       PurchaseOrder;
    PurchRFQCaseId    RFQId;
    PurchReqId        PurchReqId;
    Email             Email;
    str 200           SubjectOrProjectTitle;
    str               PoReport;
    EcoResProductType ProductType;
    VendAccount       Supplier;
    DlvDate           DeliveryDate;
    NW_Attachement    Attachment;
    List              Lines;

    [DataMemberAttribute('RequestID')]
    public str ParmRequestID(str _RequestID = RequestID)
    {
        RequestID = _RequestID;
        return RequestID;
    }

    [DataMemberAttribute('RequestDate')]
    public TransDate ParmRequestDate(TransDate _RequestDate = RequestDate)
    {
        RequestDate = _RequestDate;
        return RequestDate;
    }

    [DataMemberAttribute('PurchaseOrder')]
    public PurchIdBase ParmPurchaseOrder(PurchIdBase _PurchaseOrder = PurchaseOrder)
    {
        PurchaseOrder = _PurchaseOrder;
        return PurchaseOrder;
    }

    [DataMemberAttribute('RFQId')]
    public PurchRFQCaseId ParmRFQId(PurchRFQCaseId _RFQId = RFQId)
    {
        RFQId = _RFQId;
        return RFQId;
    }

    [DataMemberAttribute('OfficialContactEmail')]
    public Email ParmOfficialContactEmail(Email _Email = Email)
    {
        Email = _Email;
        return Email;
    }

    [DataMemberAttribute('PurchReqId')]
    public PurchReqId ParmPurchReqId(PurchReqId _PurchReqId = PurchReqId)
    {
        PurchReqId = _PurchReqId;
        return PurchReqId;
    }

    [DataMemberAttribute('SubjectOrProjectTitle')]
    public str ParmSubjectOrProjectTitle(str _SubjectOrProjectTitle = SubjectOrProjectTitle)
    {
        SubjectOrProjectTitle = _SubjectOrProjectTitle;
        return SubjectOrProjectTitle;
    }

    [DataMemberAttribute('ProductType')]
    public EcoResProductType ParmProductType(EcoResProductType _ProductType = ProductType)
    {
        ProductType = _ProductType;
        return ProductType;
    }

    [DataMemberAttribute('Supplier')]
    public VendAccount ParmSupplier(VendAccount _Supplier = Supplier)
    {
        Supplier = _Supplier;
        return Supplier;
    }

    [DataMemberAttribute('DeliveryDate')]
    public DlvDate ParmDeliveryDate(DlvDate _DeliveryDate = DeliveryDate)
    {
        DeliveryDate = _DeliveryDate;
        return DeliveryDate;
    }

    [DataMemberAttribute('POReport')]
    public str ParmPoReport(str _PoReport = PoReport)
    {
        PoReport = _PoReport;
        return PoReport;
    }

    [DataMemberAttribute('Attachment')]
    public NW_Attachement ParmAttachment(NW_Attachement _Attachment = Attachment)
    {
        Attachment = _Attachment;
        return Attachment;
    }

    [DataMemberAttribute('Lines') , 
        AifCollectionType('Lines',Types::Class , classStr(NW_POConfirmationLinesContract))]
    public List ParmLines(List _Lines = Lines)
    {
        Lines = _Lines;
        return Lines;
    }

}

//---------------
 [AifCollectionTypeAttribute('return' , Types::Class , classStr(NW_POConfirmationContract))]
    public list GetPOConfirmation()
    {
        NW_POConfirmationHeader NW_POConfirmationHeader;
        NW_POConfirmationLines  NW_POConfirmationLines;
        List HeaderList;
        List LinesList;
        NW_POConfirmationContract       POContractRequest;
        NW_Attachement                  NW_Attachement;
        NW_POConfirmationLinesContract  POContractLines;

        List errors = new List(Types::String);
        HeaderList = new List(Types::Class);
        changecompany('SHC')
        {
            try
            {

                while select NW_POConfirmationHeader
                    where NW_POConfirmationHeader.IsConfirmedFromFO == NoYes::No && NW_POConfirmationHeader.IsConfirmedFromPortal == NoYes::No &&
                    NW_POConfirmationHeader.IsRejected == NoYes::No
                {
                    POContractRequest = new NW_POConfirmationContract();
                    NW_Attachement = new NW_Attachement();

                    POContractRequest.ParmRequestID(NW_POConfirmationHeader.RequestID);
                    POContractRequest.ParmRequestDate(NW_POConfirmationHeader.RequestDate);
                    POContractRequest.ParmPurchaseOrder(NW_POConfirmationHeader.PurchaseOrder);
                    POContractRequest.ParmRFQId(NW_POConfirmationHeader.RFQId);
                    POContractRequest.ParmPurchReqId(NW_POConfirmationHeader.PurchReqId);
                    POContractRequest.ParmSubjectOrProjectTitle(NW_POConfirmationHeader.SubjectOrProjectTitle);
                    POContractRequest.ParmProductType(NW_POConfirmationHeader.ProductType);
                    POContractRequest.ParmSupplier(NW_POConfirmationHeader.Supplier);
                    POContractRequest.ParmDeliveryDate(NW_POConfirmationHeader.DeliveryDate);
                    POContractRequest.ParmOfficialContactEmail(NW_POConfirmationHeader.OfficialContactEmail);
                    POContractRequest.ParmPoReport(NW_POConfirmationHeader.POReport);
                    NW_Attachement.ParmAttachment(NW_POConfirmationHeader.Attachment);
                    NW_Attachement.ParmFileName(NW_POConfirmationHeader.FileName);
                    NW_Attachement.ParmFileType(NW_POConfirmationHeader.FileType);
                    POContractRequest.ParmAttachment(NW_Attachement);

                    LinesList = new List(Types::Class);

                    while select NW_POConfirmationLines where NW_POConfirmationLines.RequestID == NW_POConfirmationHeader.RequestID
                    {
                        POContractLines = new NW_POConfirmationLinesContract();
                
                        POContractLines.ParmItemId(NW_POConfirmationLines.ItemId);
                        POContractLines.ParmDescription(NW_POConfirmationLines.Description);
                        POContractLines.ParmCategoryName(NW_POConfirmationLines.CategoryName);
                        POContractLines.ParmQuantity(NW_POConfirmationLines.Quantity);
                        POContractLines.ParmPurchUnit(NW_POConfirmationLines.PurchUnit);
                        POContractLines.ParmPrice(NW_POConfirmationLines.Price);
                        POContractLines.ParmCurrencyCode(NW_POConfirmationLines.CurrencyCode);
                        POContractLines.ParmTotalPrice(NW_POConfirmationLines.TotalPrice);
                        POContractLines.ParmDeliveryLocation(NW_POConfirmationLines.DeliveryLocation);
                        POContractLines.ParmTax(NW_POConfirmationLines.Tax);
                        POContractLines.ParmTotalOrderPrice(NW_POConfirmationLines.TotalOrderPrice);
                        POContractLines.ParmAdditionalNotes(NW_POConfirmationLines.AdditionalNotes);

                        LinesList.addEnd(POContractLines);
                    }
                    POContractRequest.ParmLines(LinesList);
                    HeaderList.addEnd(POContractRequest);
                }
            }
            catch
            {
                SysInfologEnumerator enumerator;
                SysInfologMessageStruct msgStruct;
 
                enumerator = SysInfologEnumerator::newData(infolog.cut());
 
                while(enumerator.moveNext())
                {
                    msgStruct = new SysInfologMessageStruct(enumerator.currentMessage());
 
                    errors.addEnd(msgStruct.message());
                    HeaderList.addEnd(errors);
                }
            }
        }
        return HeaderList;
    }
// Creating a multidimensional associative array
$employees = array(
    array("name" => "John", "age" => 30, "position" => "Developer"),
    array("name" => "Alice", "age" => 25, "position" => "Designer"),
    array("name" => "Bob", "age" => 35, "position" => "Manager")
);

// Accessing elements in a multidimensional associative array
echo $employees[0]["name"];      // Outputs "John"
echo $employees[1]["position"];  // Outputs "Designer"
echo $employees[2]["age"];       // Outputs 35
// Creating a multidimensional array
$matrix = array(
    array(1, 2, 3),
    array(4, 5, 6),
    array(7, 8, 9)
);

// Accessing elements in a two-dimensional array
echo $matrix[0][1]; // Outputs 2
echo $matrix[1][2]; // Outputs 6
echo $matrix[2][0]; // Outputs 7
// Adding a new element
$person["occupation"] = "Developer";

// Modifying an existing element
$person["age"] = 26;

// Accessing the updated elements
echo $person["occupation"]; // Outputs "Developer"
echo $person["age"];        // Outputs 26
// Creating an associative array
$person = array(
    "name" => "John",
    "age" => 25,
    "city" => "New York"
);

// Accessing elements by key
echo $person["name"]; // Outputs "John"
echo $person["age"];  // Outputs 25
echo $person["city"]; // Outputs "New York"
// Adding a new element
$fruits[] = "Grapes";

// Accessing the newly added element
echo $fruits[3]; // Outputs "Grapes"
// Creating a numeric array
$fruits = array("Apple", "Banana", "Orange");

// Accessing elements by index
echo $fruits[0]; // Outputs "Apple"
echo $fruits[1]; // Outputs "Banana"
echo $fruits[2]; // Outputs "Orange"
kubectl get pods -A | grep Evicted | awk '{print $2 " -n " $1}' | xargs -n 3 kubectl delete pod
import {Metadata} from "next";

import {API_BASE_URL} from "@/app/constants";
import {getFrameVersion} from "@/app/actions";
import {MetadataProps} from "@/app/types";


export async function generateMetadata(
  {searchParams}: MetadataProps,
): Promise<Metadata> {

  const version = await getFrameVersion();

  const {gameId} = searchParams;

  const imageUrl = `${API_BASE_URL}/images/level?gameId=${gameId}&version=${version}`;

  const fcMetadata: Record<string, string> = {
    "fc:frame": "vNext",
    "fc:frame:post_url": `${API_BASE_URL}/next?version=${version}`,
    "fc:frame:image": imageUrl,
    "fc:frame:button:1": "MVP",
    "fc:frame:button:2": "Not MVP",
  };

  return {
    title: "MVP or not MVP?",
    openGraph: {
      title: "MVP or not MVP?",
      images: ["/api/splash"],
    },
    other: {
      ...fcMetadata,
    },
    metadataBase: new URL(process.env["HOST"] || "")
  };
}

export default async function Page() {
  return <p>next</p>;
}
class Solution(object):
  def lengthOfLongestSubstring(self, s):
    max_sub_length = 0
    start = 0
    s_length = len(s)
    
    for end in range(1, s_length):
      if s[end] in s[start:end]:
        start = s[start:end].index(s[end]) + 1 + start
      else:
        max_sub_length = max(max_sub_length, end - start + 1)
	return max_sub_length    
star

Thu Mar 07 2024 07:59:08 GMT+0000 (Coordinated Universal Time)

@nick

star

Thu Mar 07 2024 06:23:17 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/b6629a6f-5d70-4029-a634-7dca975e9779/task/f4f07989-943e-473b-b51e-012b8ffb3dc9/

@Marcelluki

star

Thu Mar 07 2024 04:35:07 GMT+0000 (Coordinated Universal Time)

@riyadhbin

star

Thu Mar 07 2024 04:27:16 GMT+0000 (Coordinated Universal Time)

@codeing #dotenv #css

star

Thu Mar 07 2024 03:13:25 GMT+0000 (Coordinated Universal Time)

@jerichobongay

star

Thu Mar 07 2024 02:54:27 GMT+0000 (Coordinated Universal Time)

@jerichobongay

star

Thu Mar 07 2024 02:34:26 GMT+0000 (Coordinated Universal Time)

@jerichobongay

star

Thu Mar 07 2024 02:03:34 GMT+0000 (Coordinated Universal Time)

@jerichobongay

star

Thu Mar 07 2024 01:44:59 GMT+0000 (Coordinated Universal Time)

@marcopinero #javascript #sveltekit

star

Thu Mar 07 2024 01:42:31 GMT+0000 (Coordinated Universal Time)

@marcopinero #javascript #sveltekit

star

Thu Mar 07 2024 01:42:30 GMT+0000 (Coordinated Universal Time)

@marcopinero #javascript #sveltekit

star

Thu Mar 07 2024 01:30:03 GMT+0000 (Coordinated Universal Time)

@RahmanM

star

Wed Mar 06 2024 23:51:04 GMT+0000 (Coordinated Universal Time)

@Muhammad_Waqar

star

Wed Mar 06 2024 21:04:29 GMT+0000 (Coordinated Universal Time) https://datahub.ucsd.edu/user/j6villanueva/notebooks/private/assignment5/assignment5.ipynb

@joshwithaj #undefined

star

Wed Mar 06 2024 21:04:26 GMT+0000 (Coordinated Universal Time) https://datahub.ucsd.edu/user/j6villanueva/notebooks/private/assignment5/assignment5.ipynb

@joshwithaj #undefined

star

Wed Mar 06 2024 20:10:57 GMT+0000 (Coordinated Universal Time) https://chromewebstore.google.com/detail/save-code/annlhfjgbkfmbbejkbdpgbmpbcjnehbb?pli

@faruk

star

Wed Mar 06 2024 15:50:26 GMT+0000 (Coordinated Universal Time)

@Milados

star

Wed Mar 06 2024 15:06:32 GMT+0000 (Coordinated Universal Time)

@automationateli #javascript

star

Wed Mar 06 2024 14:46:27 GMT+0000 (Coordinated Universal Time)

@msaadshahid #java

star

Wed Mar 06 2024 14:39:41 GMT+0000 (Coordinated Universal Time)

@msaadshahid #java

star

Wed Mar 06 2024 12:51:19 GMT+0000 (Coordinated Universal Time) https://technoderivation.com/saas-development-company

@garvit #saasdevelopmentcompany #customsaasdevelopmentsolution #saas

star

Wed Mar 06 2024 12:49:45 GMT+0000 (Coordinated Universal Time) https://technoderivation.com/job-portal-development

@garvit #jobportaldevelopment #jobportalcompany #jobportal

star

Wed Mar 06 2024 12:48:19 GMT+0000 (Coordinated Universal Time) https://technoderivation.com/ott-app-development

@garvit ##ottappdevelopment #ottappdevelopmentcompany #ottappcompany

star

Wed Mar 06 2024 12:43:17 GMT+0000 (Coordinated Universal Time) https://technoderivation.com/fantasy-sports-app-development

@garvit

star

Wed Mar 06 2024 12:31:02 GMT+0000 (Coordinated Universal Time)

@vallarasuk

star

Wed Mar 06 2024 11:17:38 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Wed Mar 06 2024 10:29:03 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 06 2024 10:13:08 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 06 2024 03:14:45 GMT+0000 (Coordinated Universal Time)

@Milados

star

Tue Mar 05 2024 19:36:10 GMT+0000 (Coordinated Universal Time) https://mikecann.co.uk/posts/firebase-cloud-messaging-and-chrome-extension-manifest-v3

@lebind12

star

Tue Mar 05 2024 15:34:14 GMT+0000 (Coordinated Universal Time) https://pawelgrzybek.com/vertical-rhythm-using-css-lh-and-rlh-units/

@Sebhart #css #typography #layout

star

Tue Mar 05 2024 14:52:36 GMT+0000 (Coordinated Universal Time) https://darkwebmarketbuyer.com/product/mind-warp-cake-disposable/

@darkwebmarket

star

Tue Mar 05 2024 14:44:42 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Tue Mar 05 2024 14:22:31 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 14:21:34 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 14:19:59 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 14:18:45 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 14:17:01 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 13:09:24 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Mar 05 2024 13:08:07 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 13:06:45 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 13:04:13 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 13:03:22 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 12:59:56 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 12:58:47 GMT+0000 (Coordinated Universal Time)

@codewarrior

star

Tue Mar 05 2024 12:02:33 GMT+0000 (Coordinated Universal Time) https://i.imgur.com/tcgiWzN.png

@odesign

star

Tue Mar 05 2024 11:18:10 GMT+0000 (Coordinated Universal Time)

@emjumjunov

star

Tue Mar 05 2024 10:53:03 GMT+0000 (Coordinated Universal Time)

@tudorizer

star

Tue Mar 05 2024 10:45:50 GMT+0000 (Coordinated Universal Time) https://funpay.com/orders/

@Misha

star

Tue Mar 05 2024 09:57:33 GMT+0000 (Coordinated Universal Time)

@leafsummer #python

Save snippets that work with our extensions

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