Snippets Collections
const express = require('express');
const bodyParser = require('body-parser');
const userRoutes = require('./routes/userRoutes');
require('dotenv').config();
require('./services/firebaseService'); // Initialize Firebase

const app = express();
app.use(bodyParser.json());

app.use('/users', userRoutes);

app.listen(3000, () => {
  console.log('Firebase app running on http://localhost:3000');
});
const admin = require('firebase-admin');
const serviceAccount = require('../firebase-key.json'); // adjust path
require('dotenv').config(); // Make sure this line is included

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount),
  databaseURL: process.env.FIREBASE_DB_URL // This must not be undefined
});

const db = admin.database();
const ref = db.ref('users');

module.exports = ref;
const express = require('express');
const router = express.Router();
const usersRef = require('../services/firebaseService');

// Add user
router.post('/', (req, res) => {
  const newUser = usersRef.push();
  newUser.set(req.body);
  res.send({ message: 'User added', id: newUser.key });
});

// Get users
router.get('/', (req, res) => {
  usersRef.once('value', snapshot => {
    res.send(snapshot.val());
  });
});

// Update user
router.put('/:id', (req, res) => {
  usersRef.child(req.params.id).update(req.body);
  res.send({ message: 'User updated' });
});

// Delete user
router.delete('/:id', (req, res) => {
  usersRef.child(req.params.id).remove();
  res.send({ message: 'User deleted' });
});

module.exports = router;
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const dotenv = require('dotenv');
const userRoutes = require('./routes/users');

dotenv.config(); // Load .env file

const app = express();
app.use(bodyParser.json());

// Connect to MongoDB using .env variable
mongoose.connect(process.env.MONGO_URI)
    .then(() => console.log("MongoDB connected"))
    .catch(err => console.log(err));

// Use user routes
app.use('/', userRoutes);

app.listen(5000, () => {
    console.log("Server started at http://localhost:5000");
});
const mongoose = require('mongoose');

const userSchema = new mongoose.Schema({
    name: String,
    email: String,
    phone: String
});

const User = mongoose.model('User', userSchema);

module.exports = User;
const express = require('express');
const router = express.Router();
const User = require('../models/User');

// CREATE
router.post('/', async (req, res) => {
    try {
        const user = new User(req.body);
        await user.save();
        res.send(user);
    } catch (err) {
        res.status(500).send({ error: err.message });
    }
});

// READ all
router.get('/', async (req, res) => {
    const users = await User.find();
    res.send(users);
});

// UPDATE
router.put('/:id', async (req, res) => {
    const user = await User.findByIdAndUpdate(req.params.id, req.body, { new: true });
    res.send(user);
});

// DELETE
router.delete('/:id', async (req, res) => {
    await User.findByIdAndDelete(req.params.id);
    res.send({ message: 'User deleted' });
});

module.exports = router;
$counters = “\ServerNameProcessor(_Total)% Processor Time”, “\ServerNameMemoryAvailable MBytes”, “\ServerNameLogicalDisk(C:)% Free Space” $interval = 5 $duration = (New–TimeSpan –Minutes 30) $path = “C:PerformanceData.csv” $samples = $duration.TotalSeconds / $interval $data = @() for ($i=1; $i –le $samples; $i++) { $sample = Get–Counter –Counter $counters –SampleInterval $interval $data += $sample.CounterSamples | Select–Object –Property Timestamp, Path, CookedValue } $data | Export–Csv –Path $path –NoTypeInformation
import React from "react";
import { Card, CardContent } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Cpu, HardDrive, Network, Cloud } from "lucide-react";

const mockStats = {
  cpu: "24%",
  ram: "3.2 GB / 8 GB",
  disk: "120 GB / 256 GB",
  network: "Down: 5 Mbps | Up: 1 Mbps",
};

export default function Dashboard() {
  return (
    <div className="min-h-screen bg-gray-900 text-white p-6 grid gap-6 grid-cols-1 md:grid-cols-2 xl:grid-cols-4">
      <Card className="bg-gray-800 rounded-2xl shadow-lg">
        <CardContent className="p-4">
          <div className="flex items-center space-x-4">
            <Cpu className="text-yellow-400 w-8 h-8" />
            <div>
              <h3 className="text-xl font-semibold">CPU Usage</h3>
              <p>{mockStats.cpu}</p>
            </div>
          </div>
        </CardContent>
      </Card>
      <Card className="bg-gray-800 rounded-2xl shadow-lg">
        <CardContent className="p-4">
          <div className="flex items-center space-x-4">
            <HardDrive className="text-green-400 w-8 h-8" />
            <div>
              <h3 className="text-xl font-semibold">RAM Usage</h3>
              <p>{mockStats.ram}</p>
            </div>
          </div>
        </CardContent>
      </Card>
      <Card className="bg-gray-800 rounded-2xl shadow-lg">
        <CardContent className="p-4">
          <div className="flex items-center space-x-4">
            <Cloud className="text-blue-400 w-8 h-8" />
            <div>
              <h3 className="text-xl font-semibold">Disk Space</h3>
              <p>{mockStats.disk}</p>
            </div>
          </div>
        </CardContent>
      </Card>
      <Card className="bg-gray-800 rounded-2xl shadow-lg">
        <CardContent className="p-4">
          <div className="flex items-center space-x-4">
            <Network className="text-pink-400 w-8 h-8" />
            <div>
              <h3 className="text-xl font-semibold">Network</h3>
              <p>{mockStats.network}</p>
            </div>
          </div>
        </CardContent>
      </Card>
      <div className="col-span-full mt-4">
        <Button className="w-full bg-indigo-600 hover:bg-indigo-700">Sync Files Now</Button>
      </div>
    </div>
  );
}
Tired of guessing when to buy or sell crypto? Our advanced algorithmic trading bot takes the stress out of trading. It runs 24/7, analyzing real-time market data to make smart trades for you – fast, accurate, and emotion-free. Whether you're a beginner or an experienced trader, this bot helps you grow your portfolio with ease. It’s fully automated, secure, and easy to use. Set it up once and let it work while you focus on other things. Join hundreds of users already seeing results with our powerful crypto trading tool.

Visitnow>> https://www.beleaftechnologies.com/crypto-algo-trading-bot-development
Whatsapp :  +91 8056786622
Email id :  business@beleaftechnologies.com
Telegram : https://telegram.me/BeleafSoftTech 
# Download attestations for a local artifact linked with an organization
$ gh attestation download example.bin -o github

# Download attestations for a local artifact linked with a repository
$ gh attestation download example.bin -R github/example

# Download attestations for an OCI image linked with an organization
$ gh attestation download oci://example.com/foo/bar:latest -o github
gh attestation download [<file-path> | oci://<image-uri>] [--owner | --repo] [flags]
//192.168.0.5/storage /media/myname/TK-Public/ cifs rw,guest,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <activeProfiles>
    <activeProfile>github</activeProfile>
  </activeProfiles>

  <profiles>
    <profile>
      <id>github</id>
      <repositories>
        <repository>
          <id>central</id>
          <url>https://repo1.maven.org/maven2</url>
        </repository>
        <repository>
          <id>github</id>
          <url>https://maven.pkg.github.com/OWNER/REPOSITORY</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <servers>
    <server>
      <id>github</id>
      <username>USERNAME</username>
      <password>TOKEN</password>
    </server>
  </servers>
</settings>
<valid semver> ::= <version core>
                 | <version core> "-" <pre-release>
                 | <version core> "+" <build>
                 | <version core> "-" <pre-release> "+" <build>

<version core> ::= <major> "." <minor> "." <patch>

<major> ::= <numeric identifier>

<minor> ::= <numeric identifier>

<patch> ::= <numeric identifier>

<pre-release> ::= <dot-separated pre-release identifiers>

<dot-separated pre-release identifiers> ::= <pre-release identifier>
                                          | <pre-release identifier> "." <dot-separated pre-release identifiers>

<build> ::= <dot-separated build identifiers>

<dot-separated build identifiers> ::= <build identifier>
                                    | <build identifier> "." <dot-separated build identifiers>

<pre-release identifier> ::= <alphanumeric identifier>
                           | <numeric identifier>

<build identifier> ::= <alphanumeric identifier>
                     | <digits>

<alphanumeric identifier> ::= <non-digit>
                            | <non-digit> <identifier characters>
                            | <identifier characters> <non-digit>
                            | <identifier characters> <non-digit> <identifier characters>

<numeric identifier> ::= "0"
                       | <positive digit>
                       | <positive digit> <digits>

<identifier characters> ::= <identifier character>
                          | <identifier character> <identifier characters>

<identifier character> ::= <digit>
                         | <non-digit>

<non-digit> ::= <letter>
              | "-"

<digits> ::= <digit>
           | <digit> <digits>

<digit> ::= "0"
          | <positive digit>

<positive digit> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

<letter> ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J"
           | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T"
           | "U" | "V" | "W" | "X" | "Y" | "Z" | "a" | "b" | "c" | "d"
           | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n"
           | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x"
           | "y" | "z"
/* M5Card Basic Dashboard - Time, Temperature, Weather */
#include <M5Cardputer.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <NTPClient.h>
#include <WiFiUdp.h>

// WiFi Credentials
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";

// OpenWeather API
const char* apiKey = "YOUR_OPENWEATHER_API_KEY";
const char* city = "Kuala Lumpur";
String weatherURL = "http://api.openweathermap.org/data/2.5/weather?q=" + String(city) + "&appid=" + apiKey + "&units=metric";

WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", 28800, 60000);

void setup() {
    M5Cardputer.begin();
    M5Cardputer.Display.setTextFont(2);
    M5Cardputer.Display.clear();
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
    }
    timeClient.begin();
}

void loop() {
    timeClient.update();
    M5Cardputer.Display.clear();
    M5Cardputer.Display.setCursor(10, 20);
    M5Cardputer.Display.printf("Time: %s", timeClient.getFormattedTime().c_str());

    if (WiFi.status() == WL_CONNECTED) {
        HTTPClient http;
        http.begin(weatherURL);
        int httpCode = http.GET();
        if (httpCode > 0) {
            String payload = http.getString();
            DynamicJsonDocument doc(1024);
            deserializeJson(doc, payload);
            float temp = doc["main"]["temp"];
            String weather = doc["weather"][0]["description"];
            M5Cardputer.Display.setCursor(10, 50);
            M5Cardputer.Display.printf("Temp: %.1f C", temp);
            M5Cardputer.Display.setCursor(10, 80);
            M5Cardputer.Display.printf("Weather: %s", weather.c_str());
        }
        http.end();
    }
    delay(10000);
}
/* M5Card Basic Dashboard - Time, Temperature, Weather */
#include <M5Cardputer.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <NTPClient.h>
#include <WiFiUdp.h>

// WiFi Credentials
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";

// OpenWeather API
const char* apiKey = "YOUR_OPENWEATHER_API_KEY";
const char* city = "Kuala Lumpur";
String weatherURL = "http://api.openweathermap.org/data/2.5/weather?q=" + String(city) + "&appid=" + apiKey + "&units=metric";

WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", 28800, 60000);

void setup() {
    M5Cardputer.begin();
    M5Cardputer.Display.setTextFont(2);
    M5Cardputer.Display.clear();
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
    }
    timeClient.begin();
}

void loop() {
    timeClient.update();
    M5Cardputer.Display.clear();
    M5Cardputer.Display.setCursor(10, 20);
    M5Cardputer.Display.printf("Time: %s", timeClient.getFormattedTime().c_str());

    if (WiFi.status() == WL_CONNECTED) {
        HTTPClient http;
        http.begin(weatherURL);
        int httpCode = http.GET();
        if (httpCode > 0) {
            String payload = http.getString();
            DynamicJsonDocument doc(1024);
            deserializeJson(doc, payload);
            float temp = doc["main"]["temp"];
            String weather = doc["weather"][0]["description"];
            M5Cardputer.Display.setCursor(10, 50);
            M5Cardputer.Display.printf("Temp: %.1f C", temp);
            M5Cardputer.Display.setCursor(10, 80);
            M5Cardputer.Display.printf("Weather: %s", weather.c_str());
        }
        http.end();
    }
    delay(10000);
}
try 
{
	newAccessTokenResp = invokeurl
	[
		url :"https://accounts.zoho.com/oauth/v2/token?refresh_token=1000.4dbfd6f3f7f126438dfb3401fd8dd576.4a3dede786ffa5cb2eb17686172b500e&client_id=1000.SYSU4K6QTILBGIZXBYI9MP7B1SBXYD&client_secret=9397985b78e1b9d2ddd6d3bd39f2da147fbe278489&redirect_uri=https://accounts.zohoportal.com/accounts/extoauth/clientcallback&grant_type=refresh_token"
		type :POST
	];
	newAccessToken = newAccessTokenResp.get("access_token");
	O_AuthToken = Map();
	O_AuthToken.put("Authorization","Zoho-oauthtoken " + newAccessToken + "");
	//info O_AuthToken;
	/////Get latest Employee ID FROM Zoho People///////
	People_Rec_ID = 448415000045594312;
	get_Data = zoho.people.getRecordByID("Latest_Employee_ID_Employee_Users",People_Rec_ID);
	//info get_Data;
	get_latatest_emp_id = get_Data.get("Latest_Employee_ID");
	info "latest employee id: " + get_latatest_emp_id;
	//////////
	///////////
	//////
	get_data = invokeurl
	[
		url :"https://recruit.zoho.com/recruit/v2/Candidates/" + rec_id + ""
		type :GET
		headers:O_AuthToken
	];
	//info get_data;
	data = get_data.get("data");
	for each  data in data
	{
		//info data;
		Candidate_Status = data.get("Candidate_Status");
		//info Candidate_Status;
		if(Candidate_Status == "Hired")
		{
			First_name = data.get("FirstName");
			//info First_name;
			Last_Name = data.get("LastName");
			//info Last_Name;
			////////////
			////////
			department = data.get("Employee_Department").get("id");
			//info department;
			/////
			//////////
			get_department_data = invokeurl
			[
				url :"https://recruit.zoho.com/recruit/v2/Departments/" + department + ""
				type :GET
				headers:O_AuthToken
			];
			//info get_department_data;
			dep_data = get_department_data.get("data");
			//info "Department Data RECRUIT" + dep_data;
			for each  rec in dep_data
			{
				zoho_people_dep_id = rec.get("Zoho_People_Rec_ID");
				//info zoho_people_dep_id;
			}
			///////
			//////
			//info Employee_id;
			Street = data.get("Street");
			City = data.get("City");
			State = data.get("State");
			Country = data.get("Country");
			Mobile = data.get("Mobile");
			address = Street + " " + City + " " + State + " " + Country;
			//info address;
			//Secondary_Email = data.get("Secondary_Email");
			Department = data.get("Employee_Department").get("name");
			////prob
			//info Department;
			Employee_Seating_Location = data.get("Employee_Seating_Location");
			//info Employee_Seating_Location;
			Title_Designation = data.get("Employee_Designation_Title");
			//info Title_Designation;
			Client_Type = ifnull(data.get("Client_Type"),"");
			if(Client_Type == "External")
			{
				Client_Name = ifnull(data.get("Client_Name"),"");
				//Billing_Rate = ifnull(data.get("Billing_Rate").toDecimal(),0.00);
			}
			else
			{
				Client_Name = "";
				Billing_Rate = 0.00;
			}
			Manager_s_Email_ID = data.get("Manager_s_Email_ID");
			info Manager_s_Email_ID;
			Zoho_Access_Required = data.get("Zoho_Access_Required");
			//info Title_Designation;
			Date_Of_joining = data.get("Date_Of_joining").toString("dd-MMM-yyyy");
			//info Date_Of_joining;
			Location = data.get("Employee_Seating_Location");
			///prob
			//info Location;
			Working_hrs = data.get("Shift_Timings");
			//info Working_hrs;
			Employee_Role = ifnull(data.get("Employee_Role"),"");
			//info Employee_Role;
			Email_Client = ifnull(data.get("Email_Client"),"");
			//info Email_Client;
			Employee_type = data.get("Employee_type");
			//Email_id = data.get("Email");
			// // 		//////////
			//find find location, desigination, department
			//https://people.zoho.com/people/api/forms/department/views
			AllDesignations = list();
			fetchDesignationsList = {1,2,3,4,5,6,7,8,9,10};
			for each  designationList in fetchDesignationsList
			{
				if(designationList == 1)
				{
					startIndex = 1;
				}
				else
				{
					startIndex = (designationList - 1) * 100 + 1;
				}
				get_designation = invokeurl
				[
					url :"https://people.zoho.com/people/api/forms/P_DesignationView/records?sIndex=" + startIndex + "&rec_limit=100"
					type :GET
					headers:O_AuthToken
				];
				//info get_designation;
				for each  des in get_designation
				{
					AllDesignations.add(des);
				}
				if(get_designation.size() < 100)
				{
					break;
				}
			}
			designationID = null;
			for each  desig in AllDesignations
			{
				if(desig.get("Designation Name") == Title_Designation)
				{
					designationID = desig.get("recordId");
					//info designationID;
					break;
				}
			}
			//info designationID;
			// // ////////////////////////
			////
			/////for adding reporting to
			///////////////////
			get_manager_data = invokeurl
			[
				url :"https://people.zoho.com/people/api/forms/employee/getRecords?searchParams={searchField: 'EmailID', searchOperator: 'Is', searchText : " + Manager_s_Email_ID + "}"
				type :GET
				headers:O_AuthToken
			];
			data = get_manager_data.get("response").get("result");
			//info "manager data" + data;
			for each  data in data
			{
				manager_id = data.keys();
				//info "Manager email id: " + manager_id;
				manager_id = manager_id.substring(0);
				manager_id = manager_id.toNumber();
			}
			/////////////////
			/////////////
			/////////////////
			///////////////////
			data = {"EmployeeID":get_latatest_emp_id,"FirstName":First_name,"LastName":Last_Name,"Work_location":Location,"Designation":designationID,"Dateofjoining":Date_Of_joining,"Working_Hours":Working_hrs,"Role":Employee_Role,"Email_Client":Email_Client,"Employee_type":Employee_type,"Department":zoho_people_dep_id,"Zoho_Access_Required":Zoho_Access_Required,"Reporting_To":manager_id,"Client_Type":Client_Type,"Client_Name":Client_Name};
			inputdata = Collection();
			inputdata.insert("inputData":data);
			inputdata.insert("isNonUser":true);
			create_employee = invokeurl
			[
				url :"https://people.zoho.com/people/api/forms/json/employee/insertRecord"
				type :POST
				parameters:inputdata.toMap()
				headers:O_AuthToken
			];
			info "Create employee response: " + create_employee;
		}
	}
}
catch (e)
{
	sendmail
	[
		from :zoho.adminuserid
		to :"usman@erphub.biz","auto@rebiz.zohodesk.com"
		subject :"Zoho Recruit/Workflow Failure/create_employee_on_zoho_people / " + First_name + Last_Name
		message :e + "   RECORD ID: " + rec_id
	]
}
<div class="coupon--card-content">
<h2>Limited Time Offer Flat 20% Off!</h2>														<p>Get 20% off on your first order of medicines. Shop now and save on your healthcare essentials!</p>
<h3>FLAT20</h3>
<a href="javascript:void(0)" data-coupon="FLAT20" class="copy-text">
Use Coupon</a></div>

import $, { contains } from 'jquery';

class Coupon {
	constructor(element) {
		this.$element = $(element);
		this.$copy = $(element).find('.copy-text');
		this.init();
	}

	init() {
		this.$copy.on('click', function (e) {
			e.preventDefault();
			let target = $(this).data('coupon');
			navigator.clipboard.writeText(target).then(() => {
				console.log(`Copied: ${target}`);
			});
		});
	}
}

$('[data-coupon]').each((index, element) => new Coupon(element));
This Case Study Assignment Help program is designed to enhance students' analytical, research, and writing skills. It covers:

✅ Understanding Case Studies – Learn different types (Business, Law, Nursing, etc.) and their structure.
✅ Research & Data Collection – Identify credible sources and interpret qualitative & quantitative data.
✅ Writing Techniques – Develop problem statements, analyze cases, and present well-structured solutions.
✅ Editing & Proofreading – Avoid common mistakes, ensure proper formatting (APA, MLA, Harvard), and refine your work.
✅ Practice & Expert Support – Review sample case studies, receive personalized feedback, and consult industry experts.

This program provides hands-on learning, real-world applications, and access to expert guidance, helping students excel in case study assignments.
Visit : https://myassignmenthelp.expert/case-study-assignment-help.html
---------- set bearer token-----------
const token = pm.environment.get("TOKEN");

console.log(token)

if (!token) {
    console.error("Token is not set in the environment.");
    throw new Error("Token is missing. Please set the token in the environment.");
}

pm.request.headers.add({
    key: "Authorization",
    value: `Bearer ${token}`
});
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":cute-sun: Boost Days - What's On This Week :cute-sun:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n :xero-hackathon: Happy Hackathon Week Melbourne! :xero-hackathon:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Xero Café :coffee:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :new-thing: *This week we are offering:* \n\n :gingerman: Ginger Crunch Slice  \n\n :lemon-flower: Lemon Yuzu Coconut Slice \n\n *Weekly Café Special:* _Creme Egg Latte_ :easter_egg:"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Monday, 7th April :calendar-date-7:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hackathon kick off lunch in the L3 Breakout Space! Enjoy some burgers and sides from Royal Stacks :homer-eating-burger: "
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " Wednesday, 9th April :calendar-date-9:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": " \n\n :lunch: *Light Lunch*: Provided by Kartel Catering from *12pm* \n\n"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Thursday, 10th April :calendar-date-10:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am - 10:30am* in the Wominjeka Breakout Space."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":xero-hackathon: Hackathon 2025 :xero-hackathon: ",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Hackathon is BACK!* We will have fresh juices and treats to fuel our participants brains and supercharge your days in the L3 Kitchen every single day this week!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned for more fun throughout the year. :party-wx:"
			}
		}
	]
}
01)Minimum Platforms

https://www.geeksforgeeks.org/problems/minimum-platforms-1587115620/1
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " :sunshine::x-connect: Boost Days: What's on this week :x-connect: :sunshine:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Good morning Brisbane, \n\n Happy Hackathon week for those participating! See below for what's on this week."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-7: Monday, 7th April",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :meow-coffee: *Café Partnership*: Enjoy free coffee and café-style beverages from our Cafe partner *Edwards*.\n\n :Lunch: *Lunch*: provided by _Greenstreat_ from *12pm* in the kitchen.\n\n:massage:*Wellbeing*: Pilates at *SP Brisbane City* is bookable every Monday!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-9: Wednesday, 9th April",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n :meow-coffee: *Café Partnership*: Enjoy free coffee and café-style beverages from our Cafe partner *Edwards*. \n\n:lunch: *Morning Tea*: provided by _Etto Catering_ from *10am* in the kitchen!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":xero-hackathon: Hackathon 2025 :xero-hackathon:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "To Supercharge your brains for Hackathon and get the creative juices flowing, we'll have cold juice and delicious snacks on offer every single day for you to help yourselves to! :juicebox: "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19uY2M4cDN1NDRsdTdhczE0MDhvYjZhNnRjb0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Brisbane Social Calendar*>\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
OLLAMA_ORIGINS='*' OLLAMA_HOST=localhost:11434 ollama serve
cp -RPp ./example.env ./.env
npm clean-install
npm run dev
git clone https://github.com/ollama-webui/ollama-webui.git ./ollama-webui/
pushd ./ollama-webui/
webi node@lts
source ~/.config/envman/PATH.env
~/.config/envman/PATH.env
~/.local/bin/ollama
~/.ollama/models/
ollama pull mistral
ollama run mistral
OLLAMA_ORIGINS='*' OLLAMA_HOST=localhost:11434 ollama serve
curl -sS https://webi.sh/ollama | sh; \
source ~/.config/envman/PATH.env
^\s*<TCEforms(?:\s+[^>]*)?>\s*\n|\n\s*</TCEforms>\s*$
Dreaming of launching a cryptocurrency exchange? With Opris Cryptocurrency Exchange Development Services, you can bring that dream to life with a secure, scalable, and fully customizable platform that stands out in the crypto world.

🔹 Centralized & Decentralized Exchange Development
🔹 P2P & OTC Trading Solutions
🔹 Seamless Wallet Integration & Multi-Currency Support
🔹 High-Speed Order Matching Engine
🔹 Advanced Security Features – Protect Your Users
🔹 Regulatory Compliance – Expand Globally

Your exchange, your rules. Don’t miss out on the next big thing in crypto! 💡
/* Proven method to visually hide something but */
/* still make it available to assistive technology */
.visually-hidden {
  position: absolute;
  top: auto;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE 6/7 */
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  white-space: nowrap;
}
<!-- Instead of… -->
<span aria-label="Vegetarian">
	🌱
</span>

<!-- You could do… -->
<span aria-hidden="true">🌱</span>
<span class="visually-hidden">Vegetarian</span>

<!-- In some cases -->
  <!-- It might be more appropriate to expose these like images… -->
<span role="img" aria-label="Vegetarian">
	🌱
</span>
<span role="img" aria-label="Kaomoji table flip">
	(╯°□°)╯︵ ┻━┻
</span>
Protect your cryptocurrency assets with an advanced Cryptocurrency Wallet Development solution. Addus Technologies offers safe multi-cryptocurrency wallet building services using blockchain technology, which may be customized to meet your specific business requirements.  Stay ahead of the crypto market with a scalable Cryptocurrency Wallet Development platform built for smooth transactions and outstanding security.
import { createHmac } from 'crypto';
import { NextResponse } from 'next/server';

const WEBHOOK_SECRET = process.env.MP_WEBHOOK_SECRET;
const MP_ACCESS_TOKEN = process.env.MP_ACCESS_TOKEN;

function validateWebhookSignature(
    signature: string,
    requestId: string,
    resourceId: string,
): boolean {
    try {
        if (!WEBHOOK_SECRET) {
            console.error('WEBHOOK_SECRET não configurado');
            return false;
        }

        // Extrair timestamp e assinatura
        const [timestampPart, signaturePart] = signature.split(',');
        const timestamp = timestampPart.replace('ts=', '');
        const receivedSignature = signaturePart.replace('v1=', '');

        // Criar manifesto
        const manifest = `id:${resourceId};request-id:${requestId};ts:${timestamp};`;

        // Gerar assinatura
        const generatedSignature = createHmac('sha256', WEBHOOK_SECRET)
            .update(manifest)
            .digest('hex');

        // Comparar assinaturas
        return receivedSignature === generatedSignature;
    } catch (error) {
        console.error('Erro na validação da assinatura:', error);
        return false;
    }
}

export async function POST(request: Request) {
    try {
        if (!MP_ACCESS_TOKEN) {
            console.error('MP_ACCESS_TOKEN não configurado');
            return NextResponse.json({ success: false });
        }

        // Obter headers necessários
        const signature = request.headers.get('x-signature');
        const requestId = request.headers.get('x-request-id');
        const body = await request.json();

        // Verifica se é uma notificação de pagamento
        if (body.type === 'payment' && body.data.id) {
            const paymentId = body.data.id.toString();

            // Validar assinatura do webhook
            if (!signature || !requestId) {
                console.error('Headers de assinatura ausentes');
                return NextResponse.json(
                    { error: 'Headers de assinatura ausentes' },
                    { status: 401 }
                );
            }

            if (!validateWebhookSignature(signature, requestId, paymentId)) {
                console.error('Assinatura do webhook inválida');
                return NextResponse.json(
                    { error: 'Assinatura inválida' },
                    { status: 401 }
                );
            }

            // Verifica o status do pagamento no Mercado Pago
            const mpResponse = await fetch(`https://api.mercadopago.com/v1/payments/${paymentId}`, {
                headers: {
                    'Authorization': `Bearer ${MP_ACCESS_TOKEN}`
                }
            });

            if (!mpResponse.ok) {
                console.error('Erro ao consultar status do pagamento no Mercado Pago');
                return NextResponse.json(
                    { error: 'Erro ao consultar status do pagamento' },
                    { status: 500 }
                );
            }

            const mpData = await mpResponse.json();

            if (mpData.status === 'approved') {
                try {
                    console.log("Pagamento aprovado.");
                } catch (error) {
                    console.error('Erro ao processar licença:', error);
                }
            }

            return NextResponse.json({ success: true });
        }

        return NextResponse.json({ success: true });
    } catch (error) {
        console.error('Erro no webhook:', error);
        return NextResponse.json(
            { error: error instanceof Error ? error.message : 'Erro interno do servidor' },
            { status: 500 }
        );
    }
} 
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../entities/api_errors.dart';
import '../services/storage_service.dart';


enum FirebaseApiFilterType {
  isEqualTo,
  isNotEqualTo,
  isGreaterThan,
  isGreaterThanOrEqualTo,
  isLessThan,
  isLessThanOrEqualTo,
  arrayContains,
  arrayContainsAny,
  whereIn,
  whereNotIn,
  isNull,
}

class FirebaseFilterEntity {
  final String field;
  final FirebaseApiFilterType operator;
  final dynamic value;

  FirebaseFilterEntity({
    required this.field,
    required this.operator,
    required this.value,
  });
}

abstract class FirebaseApiClient {
  Future<dynamic> get(String collection,{int limit = 20 ,List<FirebaseFilterEntity>? filters});
  Future<dynamic> getById(String collection, String id);
  Future<dynamic> postWithId(String collection, {required Map<String, dynamic> params});
  Future<void> post(String collection, {required String id, required Map<String, dynamic> params});
  Future<void> putWithId(String collection, {required String id, required Map<String, dynamic> params});
  Future<void> put(String collection, {required Map<String, dynamic> params});
  Future<void> deleteDoc(String collection, String id);
}

class FirebaseApiClientImpl extends FirebaseApiClient {
  final FirebaseFirestore _client = FirebaseFirestore.instance;

  // ================ CACHE ================ //


  static const Duration firebaseCacheDuration = Duration(minutes: 10); // или сколько нужно

  String _buildCacheKey(String collection, [String? id]) =>
      id != null ? 'firebase_cache_$collection\_$id' : 'firebase_cache_$collection';

  String _buildTimestampKey(String collection, [String? id]) =>
      id != null ? 'firebase_cache_time_$collection\_$id' : 'firebase_cache_time_$collection';

  final _storageService = StorageService();

  bool _isCacheValid(DateTime? cachedTime) {
    if (cachedTime == null) return false;
    final now = DateTime.now();
    return now.difference(cachedTime) < firebaseCacheDuration;
  }

  // ================ METHODS ================ //






  @override
  Future<dynamic> get(String collection,{int limit = 20 ,List<FirebaseFilterEntity>? filters}) async {
    try {
      final cacheKey = _buildCacheKey(collection);
      final timeKey = _buildTimestampKey(collection);

      // Получение из кэша
      final cachedTimeRaw = await _storageService.get(key: timeKey);
      final cachedData = await _storageService.get(key: cacheKey);

      final cachedTime = cachedTimeRaw is String ? DateTime.tryParse(cachedTimeRaw) : null;

      if (_isCacheValid(cachedTime) && cachedData != null) {
        debugPrint("⚡️ Firebase cache hit: $collection");
        return cachedData;
      }

      debugPrint("🔥 Firebase fetch: $collection");

      Query query = _client.collection(collection);

      if (filters != null) {
        for (var filter in filters) {
          switch (filter.operator) {
            case FirebaseApiFilterType.isEqualTo:
              query = query.where(filter.field, isEqualTo: filter.value);
              break;
            case FirebaseApiFilterType.isNotEqualTo:
              query = query.where(filter.field, isNotEqualTo: filter.value);
              break;
            case FirebaseApiFilterType.isGreaterThan:
              query = query.where(filter.field, isGreaterThan: filter.value);
              break;
            case FirebaseApiFilterType.isGreaterThanOrEqualTo:
              query = query.where(filter.field, isGreaterThanOrEqualTo: filter.value);
              break;
            case FirebaseApiFilterType.isLessThan:
              query = query.where(filter.field, isLessThan: filter.value);
              break;
            case FirebaseApiFilterType.isLessThanOrEqualTo:
              query = query.where(filter.field, isLessThanOrEqualTo: filter.value);
              break;
            case FirebaseApiFilterType.arrayContains:
              query = query.where(filter.field, arrayContains: filter.value);
              break;
            case FirebaseApiFilterType.arrayContainsAny:
              query = query.where(filter.field, arrayContainsAny: filter.value);
              break;
            case FirebaseApiFilterType.whereIn:
              query = query.where(filter.field, whereIn: filter.value);
              break;
            case FirebaseApiFilterType.whereNotIn:
              query = query.where(filter.field, whereNotIn: filter.value);
              break;
            case FirebaseApiFilterType.isNull:
              query = query.where(filter.field, isNull: filter.value);
              break;
            default:
              throw ArgumentError('Unsupported operator: ${filter.operator}');
          }
        }
      }

      final response = await query.limit(limit).get();
      final result = response.docs.map((doc) => doc.data()).toList();

      // Сохраняем в кэш
      await _storageService.save(key: cacheKey, value: result);
      await _storageService.save(key: timeKey, value: DateTime.now().toIso8601String());

      return result;
    } catch (e) {
      throw _handleError(e, "errorGettingDataCollection".tr);
    }
  }

  @override
  Future<dynamic> getById(String collection, String id) async {
    try {
      final response = await _client.collection(collection).doc(id).get();
      if (!response.exists) {
        throw Exception('Document with ID $id not found in collection $collection');
      }
      return response.data();
    } catch (e) {
      throw _handleError(e, "errorGettingDocumentById".tr);
    }
  }

  @override
  Future<void> put(String collection, {required Map<String, dynamic> params}) async {
    if (!params.containsKey('id')) {
      throw ArgumentError('documentIdIsRequiredToUpdate'.tr);
    }
    try {
      await _client.collection(collection).doc(params['id']).update(params);
    } catch (e) {
      throw _handleError(e, 'errorUpdatingDocument'.tr);
    }
  }

  @override
  Future<void> deleteDoc(String collection, String id) async {
    try {
      await _client.collection(collection).doc(id).delete();
    } catch (e) {
      throw _handleError(e, 'errorDeletingDocument'.tr);
    }
  }

  Exception _handleError(dynamic error, String defaultMessage) {
    if (error is FirebaseException) {
      switch (error.code) {
        case 'permission-denied':
          return UnauthorisedException();
        case 'not-found':
          return Exception(defaultMessage);
        default:
          return ExceptionWithMessage('$defaultMessage: ${error.message}');
      }
    }
    return Exception(defaultMessage);
  }

  @override
  Future<void> post(String collection, {required String id, required Map<String, dynamic> params}) async {
    try {
      await _client.collection(collection).doc(id).set(params);
    } catch (e) {
      throw _handleError(e, 'errorPostingDataCollection'.tr);
    }
  }


  @override
  Future<dynamic> postWithId(String collection, {required Map<String, dynamic> params}) async {
    try {
      debugPrint("Post data $collection\n$params");
      await _client.collection(collection).doc(params['id']).set(params);
      return params;
    } catch (e) {
      throw _handleError(e, 'errorPostingDataCollection'.tr);
    }
  }


  @override
  Future<void> putWithId(String collection, {required String id, required Map<String, dynamic> params}) async {
    try {
      await _client.collection(collection).doc(id).update(params);
    } catch (e) {
      throw _handleError(e, 'errorUpdatingDocument'.tr);
    }
  }
}
<?php
/*
Plugin Name: WooCommerce - Schedule showing and hiding of products
Plugin URI: https://www.damiencarbery.com/2025/01/schedule-showing-and-hiding-of-woocommerce-products/
Description: Add the ability to show and hide a product on specified dates.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1.20250108
Requires Plugins: woocommerce
*/


class ScheduleHideProducts {
	private $show_hide_dates_start_key;
	private $show_hide_dates_end_key;


	// Returns an instance of this class. 
	public static function get_instance() {
		if ( null == self::$instance ) {
			self::$instance = new self;
		} 
		return self::$instance;
	}


	// Initialize the plugin variables.
	public function __construct() {
		// The custom meta key for the start and end dates.
		$this->show_hide_dates_start_key = '_show_hide_dates_start';
		$this->show_hide_dates_end_key = '_show_hide_dates_end';

		$this->init();
	}


	// Set up WordPress specfic actions.
	public function init() {
		// Declare that this plugin supports WooCommerce HPOS.
		// This plugin does not interact with WooCommerce orders so it doesn't have to do anything special to support HPOS.
		add_action( 'before_woocommerce_init', function() {
			if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
			\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
			}
		} );

		// Add the date fields to the Product/General tab.
		add_action( 'woocommerce_product_options_pricing', array( $this, 'add_hide_date' ) );
		// Save the date fields values if set.
		add_action( 'woocommerce_process_product_meta', array( $this, 'save_show_hide_dates' ), 10, 2 );
		// Scheduled check for products to show or hide.
		add_action( 'woocommerce_scheduled_sales', array( $this, 'scheduled_show_hide_check' ) );

		// For debugging.
		add_shortcode( 'show_hide', array( $this, 'show_hide_shortcode' ) );
	}


	public function show_hide_shortcode() {
		$product_id = 32;

		$visibility_terms = $this->get_visibility_terms( $product_id );
		echo '<pre>', var_export( $visibility_terms, true ), '</pre>';
		
		array_push( $visibility_terms, 'exclude-from-catalog', 'exclude-from-search' );
		echo '<pre>', var_export( $visibility_terms, true ), '</pre>';
	}

	// Get the terms without the 'exclude-from-catalog' or 'exclude-from-search' terms.
	private function get_visibility_terms( $product_id ) {
		// Get the term slugs.
		$visibility_terms = wp_list_pluck( wp_get_object_terms( $product_id, 'product_visibility' ), 'slug' );
		
		// Remove 'exclude-from-catalog' or 'exclude-from-search' terms, if present.
		$visibility_terms = array_filter( $visibility_terms, function( $x ) { return $x != 'exclude-from-catalog' && $x != 'exclude-from-search'; } );
		
		return $visibility_terms;
	}


	// Add the date fields to the Product/General tab.
	public function add_hide_date() {
		$post_id = get_the_ID();
		$product_type = WC_Product_Factory::get_product_type( $post_id );
		$classname = WC_Product_Factory::get_product_classname( $post_id, $product_type ? $product_type : 'simple' );
		$product = new $classname( $post_id );

		$show_hide_dates_start_timestamp = $product->get_meta( $this->show_hide_dates_start_key, true, 'edit' );
		$show_hide_dates_end_timestamp = $product->get_meta( $this->show_hide_dates_end_key, true, 'edit' );

		// Convert the timestamp into Y-m-d format.
		$show_hide_dates_start = $show_hide_dates_start_timestamp ? date_i18n( 'Y-m-d', $show_hide_dates_start_timestamp ) : '';
		$show_hide_dates_end = $show_hide_dates_end_timestamp ? date_i18n( 'Y-m-d', $show_hide_dates_end_timestamp ) : '';

		// Attach DatePicker to the two fields.
		echo "
		<script>
		jQuery( function ( $ ) {
			$( '.show_hide_dates_fields' ).each( function () {
				$( this )
					.find( 'input' )
					.datepicker( {
						defaultDate: '',
						dateFormat: 'yy-mm-dd',
						numberOfMonths: 1,
						showButtonPanel: true,
					} );
			} );
			$( '#woocommerce-product-data' ).on(
				'click',
				'.cancel_show_hide_schedule',
				function () {
					var wrap = $( this ).closest( 'div, table' );

					//$( this ).hide();  // Hide the 'Cancel' link.
					wrap.find( '.show_hide_dates_fields' ).find( 'input' ).val( '' );

					return false;
				}
			);
		} );
		</script>
		";
		echo '
		<style>
		.woocommerce_options_panel .show_hide_dates_fields .short:first-of-type { margin-bottom: 1em; }
		.woocommerce_options_panel .show_hide_dates_fields .short:nth-of-type(2) { clear: left; }
		</style>
		<p class="form-field show_hide_dates_fields">
			<label for="'.$this->show_hide_dates_start_key.'">' . esc_html__( 'Show/hide dates', 'woocommerce' ) . '</label>
			<input type="text" class="short" name="'.$this->show_hide_dates_start_key.'" id="'.$this->show_hide_dates_start_key.'" value="' . esc_attr( $show_hide_dates_start ) . '" placeholder="' . esc_html( _x( 'Starting&hellip;', 'placeholder', 'woocommerce' ) ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
			<input type="text" class="short" name="'.$this->show_hide_dates_end_key.'" id="'.$this->show_hide_dates_end_key.'" value="' . esc_attr( $show_hide_dates_end ) . '" placeholder="' . esc_html( _x( 'Ending&hellip;', 'placeholder', 'woocommerce' ) ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />' .
			'<a href="#" class="description cancel_show_hide_schedule">' . esc_html__( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The product will be shown at 00:00:00 of "Starting" date and hidden at 23:59:59 of "Ending" date.', 'woocommerce' ) ) . '
		</p>';
	}


	// Save the date fields values if set.
	public function save_show_hide_dates( $post_id, $post ) {
		$product_type = empty( $_POST['product-type'] ) ? WC_Product_Factory::get_product_type( $post_id ) : sanitize_title( wp_unslash( $_POST['product-type'] ) );
		$classname = WC_Product_Factory::get_product_classname( $post_id, $product_type ? $product_type : 'simple' );
		$product = new $classname( $post_id );

		// Handle show/hide dates.
		$show_hide_dates_start = '';
		$show_hide_dates_end   = '';

		// Force 'date from' to beginning of day.
		if ( isset( $_POST['_show_hide_dates_start'] ) ) {
			$show_hide_dates_start = wc_clean( wp_unslash( $_POST['_show_hide_dates_start'] ) );

			if ( ! empty( $show_hide_dates_start ) ) {
				// ToDo: Maybe use code from set_date_prop() in woocommerce/includes/abstracts/abstract-wc-data.php.
				$show_hide_dates_start = new WC_DateTime( date( 'Y-m-d 00:00:00', strtotime( $show_hide_dates_start ) ), new DateTimeZone( 'UTC' ) );

				// ToDo: If $show_hide_dates_start is in the future I should hide the product now! (set product_visibility terms)?
			}
		}

		// Force 'date to' to the end of the day.
		if ( isset( $_POST['_show_hide_dates_end'] ) ) {
			$show_hide_dates_end = wc_clean( wp_unslash( $_POST['_show_hide_dates_end'] ) );

			if ( ! empty( $show_hide_dates_end ) ) {
				// ToDo: Maybe use code from set_date_prop() in woocommerce/includes/abstracts/abstract-wc-data.php.
				$show_hide_dates_end = new WC_DateTime( date( 'Y-m-d 00:00:00', strtotime( $show_hide_dates_end ) ), new DateTimeZone( 'UTC' ) );
			}
		}

		$product->update_meta_data( $this->show_hide_dates_start_key, $show_hide_dates_start ? $show_hide_dates_start->getTimestamp() : $show_hide_dates_start );
		$product->update_meta_data( $this->show_hide_dates_end_key, $show_hide_dates_end ? $show_hide_dates_end->getTimestamp() : $show_hide_dates_end );
		$product->save();
	}


	// Returns an array of IDs of products that will be shown soon.
	public function get_starting_shows() {
		global $wpdb;

		return $wpdb->get_col(
			$wpdb->prepare(
				"SELECT postmeta.post_id FROM {$wpdb->postmeta} as postmeta
				WHERE postmeta.meta_key = '%s'
					AND postmeta.meta_value > 0
					AND postmeta.meta_value < %s",
				$this->show_hide_dates_start_key, time()
			)
		);
	}


	// Returns an array of IDs of products that are due to be hidden.
	public function get_ending_shows() {
		global $wpdb;

		return $wpdb->get_col(
			$wpdb->prepare(
				"SELECT postmeta.post_id FROM {$wpdb->postmeta} as postmeta
				WHERE postmeta.meta_key = '%s'
					AND postmeta.meta_value > 0
					AND postmeta.meta_value < %s",
				$this->show_hide_dates_end_key, time()
			)
		);
	}


	// Scheduled check for products to show or hide.
	public function scheduled_show_hide_check() {
		// Get products to be shown (or published).
		$product_ids = $this->get_starting_shows();

		if ( $product_ids ) {
			$visibility_ids = wc_get_product_visibility_term_ids();

			foreach ( $product_ids as $product_id ) {
				$product = wc_get_product( $product_id );

				if ( $product ) {
					$visibility_terms = $this->get_visibility_terms( $product_id );

					wp_set_object_terms( $product_id, $visibility_terms, 'product_visibility' );

					// Delete the start date so we don't keep changing the product_visibility terms.
					$product->delete_meta_data( $this->show_hide_dates_start_key );
					$product->save();
				}
			}
		}


		// Get products to be hidden (or unpublished).
		$product_ids = $this->get_ending_shows();

		if ( $product_ids ) {
			foreach ( $product_ids as $product_id ) {
				$product = wc_get_product( $product_id );

				if ( $product ) {
					// Get the terms without the 'exclude-from-catalog' or 'exclude-from-search' terms.
					$visibility_terms = $this->get_visibility_terms( $product_id );
					// Add 'exclude-from-catalog' and 'exclude-from-search' terms so that the product will be hidden.
					array_push( $visibility_terms, 'exclude-from-catalog', 'exclude-from-search' );

					// Hide product by adding 'exclude-from-catalog' and 'exclude-from-search' terms.
					wp_set_object_terms( $product_id, $visibility_terms, 'product_visibility' );

					// Delete the end date so we don't keep hiding this product.
					$product->delete_meta_data( $this->show_hide_dates_end_key );
					$product->save();
				}
			}
		}
	}
}

$ScheduleHideProducts = new ScheduleHideProducts();
Object.keys(this.obj).forEach(key => this.obj[key] = '')
<style>

#row-f84a0e6a, #row-1d8c3a6d {
  position: relative; /* Permet de superposer l'élément */
  z-index: 10; /* Définit un niveau supérieur pour placer la rangée au-dessus */
  margin-top: -20px; /* Ajuste la marge négative selon vos besoins */
}

#image-1fdce2fa {
  position: relative; /* Permet à l'élément de rester en dessous */
  z-index: 5; /* Niveau inférieur pour assurer que cet élément reste en dessous */
}


</style>




star

Sun Apr 06 2025 17:45:02 GMT+0000 (Coordinated Universal Time)

@exam3

star

Sun Apr 06 2025 17:44:30 GMT+0000 (Coordinated Universal Time)

@exam3

star

Sun Apr 06 2025 17:42:31 GMT+0000 (Coordinated Universal Time)

@exam3

star

Sun Apr 06 2025 17:40:45 GMT+0000 (Coordinated Universal Time)

@exam3

star

Sun Apr 06 2025 17:39:28 GMT+0000 (Coordinated Universal Time)

@exam3

star

Sun Apr 06 2025 17:38:25 GMT+0000 (Coordinated Universal Time)

@exam3

star

Sun Apr 06 2025 12:31:43 GMT+0000 (Coordinated Universal Time) https://rootguide.co.za/2023/01/27/powershell-scripts-for-automating-windows-server-management/

@thefunkytechguy #powershell #activedirectory #windowserver #wsus

star

Sun Apr 06 2025 11:40:26 GMT+0000 (Coordinated Universal Time) https://github.com/migo557/temurin-build/pull/1

@Mido4477

star

Sat Apr 05 2025 15:55:22 GMT+0000 (Coordinated Universal Time)

@yummyo

star

Sat Apr 05 2025 12:26:25 GMT+0000 (Coordinated Universal Time) https://www.beleaftechnologies.com/crypto-algo-trading-bot-development

@raydensmith #crypto #algo

star

Sat Apr 05 2025 05:55:26 GMT+0000 (Coordinated Universal Time) https://cli.github.com/manual/gh_attestation_download

@Mido4477

star

Sat Apr 05 2025 05:55:16 GMT+0000 (Coordinated Universal Time) https://cli.github.com/manual/gh_attestation_download

@Mido4477

star

Sat Apr 05 2025 04:18:17 GMT+0000 (Coordinated Universal Time)

@wizyOsva #bash #cifs

star

Sat Apr 05 2025 00:29:52 GMT+0000 (Coordinated Universal Time) https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry

@Mido4477

star

Fri Apr 04 2025 23:05:36 GMT+0000 (Coordinated Universal Time) https://semver.org/

@Mido4477

star

Fri Apr 04 2025 14:32:52 GMT+0000 (Coordinated Universal Time)

@yummyo

star

Fri Apr 04 2025 14:32:52 GMT+0000 (Coordinated Universal Time)

@yummyo

star

Fri Apr 04 2025 14:11:26 GMT+0000 (Coordinated Universal Time)

@Hassnain_Abbas #html

star

Fri Apr 04 2025 12:40:39 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #css #html

star

Fri Apr 04 2025 10:44:14 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/cryptocurrency-wallet-development-company/

@CharleenStewar

star

Fri Apr 04 2025 09:59:44 GMT+0000 (Coordinated Universal Time) https://myassignmenthelp.expert/case-study-assignment-help.html

@john09

star

Fri Apr 04 2025 08:10:06 GMT+0000 (Coordinated Universal Time)

@StephenThevar

star

Fri Apr 04 2025 06:40:28 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/localcryptos-clone-script/

@janetbrownjb #peertopeercryptoexchange #localcryptosclonescript #cryptoexchangedevelopment #p2pexchangeplatform #cryptocurrencystartup

star

Fri Apr 04 2025 03:45:17 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Thu Apr 03 2025 15:52:59 GMT+0000 (Coordinated Universal Time)

@aniket_chavan

star

Thu Apr 03 2025 05:00:53 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Wed Apr 02 2025 09:14:34 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/bitstamp-clone-script/

@janetbrownjb #bitstampclonescript #cryptoexchangedevelopment #launchcryptoexchange #cryptotradingplatform #bitstamplikeexchange

star

Tue Apr 01 2025 20:28:45 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:28:29 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:28:13 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:27:55 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:27:38 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:27:14 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:26:46 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 20:26:24 GMT+0000 (Coordinated Universal Time) https://webinstall.dev/ollama/

@hmboyd

star

Tue Apr 01 2025 12:46:40 GMT+0000 (Coordinated Universal Time)

@mhaschke_works #rekursiv #bash #chmod

star

Tue Apr 01 2025 08:38:28 GMT+0000 (Coordinated Universal Time)

@linabalciunaite #accessibility #css

star

Tue Apr 01 2025 08:29:34 GMT+0000 (Coordinated Universal Time)

@linabalciunaite #accessibility #aria

star

Tue Apr 01 2025 05:40:23 GMT+0000 (Coordinated Universal Time) https://www.malgotechnologies.com/dream11-clone-script

@benjaminvalor #dream11 #fantasy #clone #ipl

star

Tue Apr 01 2025 01:21:50 GMT+0000 (Coordinated Universal Time)

@Gaimo #typescript

star

Mon Mar 31 2025 17:30:33 GMT+0000 (Coordinated Universal Time)

@Curable1600 #browsers #windows

star

Mon Mar 31 2025 13:54:36 GMT+0000 (Coordinated Universal Time) /cart/?add-to-cart=2888

@odesign

star

Mon Mar 31 2025 05:30:12 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/create-erc20-token/

@LilianAnderson #createerc20token #erc20tokendevelopment #blockchainforstartups #cryptotokencreation #ethereumtokenguide

star

Sun Mar 30 2025 19:10:53 GMT+0000 (Coordinated Universal Time)

@satinbest #php

star

Sun Mar 30 2025 16:37:35 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Sun Mar 30 2025 09:34:04 GMT+0000 (Coordinated Universal Time)

@Etiennette

Save snippets that work with our extensions

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