Snippets Collections
//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>




<script>configObj={"shadowSize":"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","roundnessSize":"20%","buttonDToBottom":"4rem","buttonDToRight":"2rem","selectedBackgroundColor":"#F84724","selectedIconColor":"#ffffff","buttonWidth":"3rem","buttonHeight":"3rem","svgContent":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" class=\"injected-svg\">\n                            <path d=\"M11.573 11.672a.615.615 0 0 1 .854 0l3.896 3.824a.578.578 0 0 1 0 .832.615.615 0 0 1-.853 0L12 12.92l-3.47 3.408a.615.615 0 0 1-.853 0 .578.578 0 0 1 0-.832zm0-4a.615.615 0 0 1 .854 0l3.896 3.824a.578.578 0 0 1 0 .832.615.615 0 0 1-.853 0L12 8.92l-3.47 3.408a.615.615 0 0 1-.853 0 .578.578 0 0 1 0-.832z\" fill=\"#ffffff\">\n                            </path>\n                        </svg>"};function createButton(o,t){const e=document.querySelector("body"),n=document.createElement("span");n.classList.add("softr-back-to-top-button"),n.id="softr-back-to-top-button",t?t.appendChild(n):e.appendChild(n),n.style.width=o.buttonWidth,n.style.height=o.buttonHeight,n.style.marginRight=o.buttonDToRight,n.style.marginBottom=o.buttonDToBottom,n.style.borderRadius=o.roundnessSize,n.style.boxShadow=o.shadowSize,n.style.color=o.selectedBackgroundColor,n.style.backgroundColor=o.selectedBackgroundColor,t?n.style.position="absolute":n.style.position="fixed",n.style.outline="none",n.style.bottom="0px",n.style.right="0px",n.style.cursor="pointer",n.style.textAlign="center",n.style.border="solid 2px currentColor",n.style.display="none",n.innerHTML=o.svgContent,t||(window.onscroll=function(){document.body.scrollTop>20||document.documentElement.scrollTop>20?n.style.display="block":n.style.display="none"},n.onclick=function(){document.body.scrollTop=0,document.documentElement.scrollTop=0})}document.addEventListener("DOMContentLoaded",function(){createButton(configObj,null)});</script>      
      


<style>
  /* Empêche le débordement horizontal */
  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  /* Assurez-vous que les conteneurs respectent la largeur de l'écran */
  * {
    box-sizing: border-box;
  }

  /* Correction pour les éléments qui pourraient déborder */
  img, iframe, .container, .row, .section {
    max-width: 100%;
    width: 100%;
  }
</style>

<!DOCTYPE html>
<html>
<head>
<style>
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 1em;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.05em;
  background: #171A31;
  color: white;
  margin: 0;
  padding: 20px;
}

.timeline {
  margin: 4em auto;
  position: relative;
  max-width: 46em;
  padding: 0;
}

.timeline:before {
  background-color: white;
  content: '';
  margin-left: -1px;
  position: absolute;
  top: 0;
  left: 2em;
  width: 2px;
  height: 100%;
}

.timeline-event {
  position: relative;
  margin: 3em 0;
  list-style: none;
}

.timeline-event-icon {
  transition: transform 0.2s ease-in;
  transform: rotate(45deg);
  background-color: white;
  outline: 10px solid #171A31;
  display: block;
  margin: 0.5em 0.5em 0.5em -0.5em;
  position: absolute;
  top: 0;
  left: 2em;
  width: 1em;
  height: 1em;
}

.timeline-event:hover .timeline-event-icon {
  transform: rotate(-45deg);
  background-color: #E74C3C;
}

.timeline-event-copy {
  padding: 2em;
  position: relative;
  top: -1.875em;
  left: 4em;
  width: 80%;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

.timeline-event-copy h3 {
  font-size: 1.75em;
  margin: 0 0 0.5em;
}

.timeline-event-copy h4 {
  font-size: 1.2em;
  margin: 0 0 1.2em;
}

.timeline-event-copy strong {
  font-weight: 700;
}

.timeline-event-copy p {
  margin: 0 0 1.2em;
}

.timeline-event-thumbnail {
  color: white;
  font-size: 0.75em;
  background-color: #E74C3C;
  display: inline-block;
  margin-bottom: 1.2em;
  padding: 0.25em 1em;
  border-radius: 25px;
}
</style>
</head>
<body>

<ul class="timeline">
  <li class="timeline-event">
    <label class="timeline-event-icon"></label>
    <div class="timeline-event-copy">
      <p class="timeline-event-thumbnail">2022 - Present</p>
      <h3>Company One</h3>
      <h4>Senior Developer</h4>
      <p><strong>Frontend Development</strong><br>
      Building responsive and adaptive websites using modern technologies.</p>
    </div>
  </li>
  <li class="timeline-event">
    <label class="timeline-event-icon"></label>
    <div class="timeline-event-copy">
      <p class="timeline-event-thumbnail">2020 - 2022</p>
      <h3>Company Two</h3>
      <h4>Web Developer</h4>
      <p>Design and development of digital products using latest web technologies.</p>
    </div>
  </li>
  <li class="timeline-event">
    <label class="timeline-event-icon"></label>
    <div class="timeline-event-copy">
      <p class="timeline-event-thumbnail">2018 - 2020</p>
      <h3>Company Three</h3>
      <h4>Junior Developer</h4>
      <p><strong>Development & Consulting</strong><br>
      Working on various client projects and internal systems.</p>
    </div>
  </li>
</ul>

</body>
</html>






<style>
    /* Appliquer un ruban à la rangée */
    #row-33298a79 {
      position: relative; /* Nécessaire pour positionner le ruban */
    }
  
    /* Ruban avec texte */
    #row-33298a79::before {
      content: "RÉDUCTION -15%"; /* Texte affiché sur le ruban */
      font-size: 12px; /* Taille du texte */
      font-weight: bold; /* Texte en gras */
      color: #fff; /* Couleur du texte */
      --f: 0.5em; /* Contrôle la taille de la partie pliée */
      
      position: absolute;
      top: 0;
      right: 0;
      line-height: 1.8;
      padding: 5px 20px; /* Espacement autour du texte */
      border-image: conic-gradient(#ff000088 0 0) 51%/var(--f);
      clip-path: polygon(
        100% calc(100% - var(--f)),
        100% 100%,
        calc(100% - var(--f)) calc(100% - var(--f)),
        var(--f) calc(100% - var(--f)),
        0 100%,
        0 calc(100% - var(--f)),
        999px calc(100% - var(--f) - 999px),
        calc(100% - 999px) calc(100% - var(--f) - 999px)
      );
      transform: translate(calc((1 - cos(45deg)) * 100%), -100%) rotate(45deg);
      transform-origin: 0% 100%;
      background-color: #FF2F4E; /* Couleur principale */
      z-index: 10; /* Place le ruban au-dessus de la rangée */
    }
  </style>
  
<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Bouton WhatsApp</title>
  <style>
    /* Style du bouton rectangulaire */
    .whatsapp-button {
      position: fixed;
      bottom: 20px; /* Position en bas */
      right: 20px; /* Position à droite */
      background-color: #25D366; /* Couleur officielle de WhatsApp */
      color: white; /* Couleur du texte */
      border: none;
      border-radius: 5px; /* Coins légèrement arrondis */
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px 15px; /* Espacement intérieur */
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Ombre légère */
      cursor: pointer;
      font-size: 14px; /* Taille du texte */
      font-family: Arial, sans-serif; /* Police du texte */
      transition: transform 0.3s ease, background-color 0.3s ease; /* Animation au survol */
    }

    /* Icône WhatsApp dans le bouton */
    .whatsapp-button i {
      margin-right: 10px; /* Espace entre l'icône et le texte */
      font-size: 18px; /* Taille de l'icône */
    }

    /* Effet au survol */
    .whatsapp-button:hover {
      background-color: #1ebe57; /* Couleur légèrement plus foncée au survol */
      transform: scale(1.05); /* Légère augmentation de taille */
    }
  </style>
  <!-- FontAwesome pour l'icône WhatsApp -->
  <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
</head>
<body>
  <!-- Bouton WhatsApp -->
  <button class="whatsapp-button" id="whatsappBtn">
    <i class="fab fa-whatsapp"></i> Posez des questions
  </button>

  <script>
    // Fonction pour ouvrir WhatsApp
    document.getElementById('whatsappBtn').addEventListener('click', function() {
      const phoneNumber = "23058009839"; // Numéro WhatsApp sans "+" ni espaces
      const message = "Bonjour, j'ai une question à propos de ."; // Message par défaut
      const whatsappURL = `https://wa.me/${phoneNumber}?text=${encodeURIComponent(message)}`;
      window.open(whatsappURL, "_blank"); // Ouvrir dans un nouvel onglet
    });
  </script>
</body>
</html>

<div id="row-59920160" class="RowUi-okiyiz-0 fyvZZg" style="background-size: initial; background-position: 50% 50%; background-repeat: repeat; background-attachment: initial;"><div size="12" class="ColumnUi-sc-2n8p1b-0 kxDUMc"><div class="StyleWrapperUi-tm5iqm-0 kKyYSI"><div id="rawhtml-988044f0" class="RawHtmlUi-sc-1lqhwfx-0 ePOjZl"><ul class="faq">
    <li><input type="checkbox" checked="checked"> <i></i>
    <h2><span>1:</span> What is in the course?</h2>
    <p>Inside the course you'll get access to a series of short, straight to the point, videos that will give you all the information you need to improve your content creation process.</p>
    </li>
    <li><input type="checkbox" checked="checked"> <i></i>
    <h2><span>2:</span> How does it compare to other courses out there?</h2>
    <p> This process is the documentation of over 3 years of content creation optimization. You'll learn my way of creating content, fast, consistently and in a way that connects with your audience and boosts interest and desire.</p>
    </li>
    <li><input type="checkbox" checked="checked"> <i></i>
    <h2><span>3:</span> When can I see results?</h2>
    <p>You'll be able to finish the course in just a few hours, and start implementing right away. Results will vary from person to person, but the sooner you start improving your content the faster you'll get results. </p>
    </li>
    <li><input type="checkbox" checked="checked"> <i></i>
    <h2><span>4:</span> Is there any guarantee?</h2>
    <p> I offer no refunds nor guarantees, every purchase is final. But I can confidently say that I've personally generated 6-figures and won a $100k award using the content strategy and framework that I teach inside this course. If you're looking for straight to the point, no BS information this will give you exactly that.</p>
    </li>
    <li><input type="checkbox" checked="checked"> <i></i>
    <h2><span>5:</span> Is there any support available</h2>
    <p> Since this course is straight forward, I don't offer a specific support method. But you can get my 1-on-1 mentorship if you'd like to have consistent support, or send me an email if you have any questions about the course.</p>
    </li>
    </ul>
    <style> .transition, p, .faq li i:before, .faq li i:after {
        transition: all 0.25s ease-in-out;
    }
    .flipIn, h1, .faq li {
        animation: flipdown 0.5s ease both;
    }
    .no-select, h2 {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    .faq p {
        color: rgba(22, 22, 55, 0.8);
        font-size: 14px;
        line-height: 26px;
        position: relative;
        overflow: hidden;
        max-height: 800px;
        opacity: 1;
        transform: translate(0, 0);
        margin-top: 14px;
        margin-bottom: 0;
        z-index: 2;
        font-family: 'Poppins', sans-serif !important;
    }
    .faq {
        list-style: none;
        perspective: 900;
        padding: 0;
        margin: 0;
    }
    .faq h2{
        margin: 0;
        color: black;
        font-size: 16px;
        font-family: 'Poppins', sans-serif !important;
    }
    .faq li {
        position: relative;
        padding: 0;
        margin-top: 20px;
        color: white;
        background: #F3F4F3;
        padding: 20px;
        border: 1px solid rgb(255, 255, 255, 0.2);
    }
    .faq li:nth-of-type(1) {
        animation-delay: 0.5s;
    }
    .faq li:nth-of-type(2) {
        animation-delay: 0.75s;
    }
    .faq li:nth-of-type(3) {
        animation-delay: 1s;
    }
    .faq span{
        color: #50E3C2;
        margin-right: 5px;
    }
    .faq li i {
        position: absolute;
        transform: translate(-6px, 0);
        right: 0;
        top: 10px;
    }
    .faq li i:before, .faq li i:after {
        content: "";
        position: absolute;
        background: #161637;
        width: 3px;
        height: 9px;
        right: 23px;
        top: 20px;
    }
    .faq li i:before {
        transform: translate(-2px, 0) rotate(45deg);
    }
    .faq li i:after {
        transform: translate(2px, 0) rotate(-45deg);
    }
    .faq li input[type=checkbox] {
        background: #161637;
        position: absolute;
        cursor: pointer;
        width: 100%;
        height: 100%;
        z-index: 1;
        opacity: 0;
        left: 0px;
        top: 0;
    }
    .faq li input[type=checkbox]:checked ~ p {
        background: #161637;
        margin: 0;
        max-height: 0;
        opacity: 0;
        transform: translate(0, 50%);
    }
    .faq li input[type=checkbox]:checked ~ i:before {
        background: #161637;
        transform: translate(2px, 0) rotate(45deg);
    }
    .faq li input[type=checkbox]:checked ~ i:after {
        background: #161637;
        transform: translate(-2px, 0) rotate(-45deg);
    }
    @keyframes flipdown {
        0% {
            opacity: 0;
            transform-origin: top center;
            transform: rotateX(-90deg);
        }
        5% {
            opacity: 1;
        }
        80% {
            transform: rotateX(8deg);
        }
        83% {
            transform: rotateX(6deg);
        }
        92% {
            transform: rotateX(-3deg);
        }
        100% {
            transform-origin: top center;
            transform: rotateX(0deg);
        }
    }
     </style>
    </div></div></div></div>

  <!-- Ajoute ce code ci-dessous là où tu veux que la FAQ soit -->

    
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FAQ</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <!-- Chargement des icônes Font Awesome -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<div class="faq-container">
    <div class="faq-item">
        <div class="faq-question">Qu'est-ce que Systeme.io? <span class="faq-icon"><i class="fa-solid fa-plus"></i></span></div>
        <div class="faq-answer">
            <p>Systeme.io est une plateforme de marketing en ligne tout-en-un qui permet de créer des tunnels de vente, des pages de capture, des espaces membres et bien plus encore.</p>
        </div>
    </div>

    <div class="faq-item">
        <div class="faq-question">Comment puis-je commencer avec Systeme.io? <span class="faq-icon"><i class="fa-solid fa-plus"></i></span></div>
        <div class="faq-answer">
            <p>Pour commencer avec Systeme.io, vous devez vous inscrire sur leur site web, créer un compte et choisir le plan qui convient le mieux à vos besoins.</p>
        </div>
    </div>

    <div class="faq-item">
        <div class="faq-question">Est-ce que Systeme.io offre un essai gratuit? <span class="faq-icon"><i class="fa-solid fa-plus"></i></span></div>
        <div class="faq-answer">
            <p>Oui, Systeme.io propose un essai gratuit de 14 jours pour vous permettre d'explorer toutes les fonctionnalités de la plateforme avant de vous engager.</p>
        </div>
    </div>

    <!-- Ajoute d'autres questions/réponses selon tes besoins -->

</div>


        
        
        
        
        
         <!-- Ajoute ce code ci-dessous en footer -->


<script>
$(".faq-question").click(function() {
    var container = $(this).parent(".faq-item");
    var answer = container.find(".faq-answer");
    var icon = $(this).find(".faq-icon i");

    // Fermer toutes les autres réponses
    $(".faq-answer").not(answer).slideUp(200).removeClass("scale-in-ver-top");
    $(".faq-icon i").not(icon).removeClass("fa-minus").addClass("fa-plus");

    // Ouvrir ou fermer la réponse actuelle
    answer.slideToggle(200).css("transform-origin", "top").toggleClass("scale-in-ver-top");

    if (icon.hasClass("fa-plus")) {
        icon.removeClass("fa-plus").addClass("fa-minus");
    } else {
        icon.removeClass("fa-minus").addClass("fa-plus");
    }
});
</script>

</body>
</html>

<style>
  
body {
    font-family: Arial, sans-serif;
    background-color: #000; /* Fond noir pour la page */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #fff; /* Couleur de texte blanche par défaut */
}

.faq-container {
    width: 70%;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #01ffff21; /* Bordure inférieure sombre entre les questions */
    background: rgb(2, 0, 36);
    background: linear-gradient(90deg, #002424 0%, #000000 100%); /* Dégradé léger */
    padding: 20px;
    margin-bottom: 12px; /* Espacement entre chaque question/réponse */
    border-radius: 4px; /* Coins arrondis */
}

.faq-question {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff; /* Couleur principale pour les questions */
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pour aligner le texte à gauche et l'icône à droite */
    position: relative; /* Position relative pour le contour */
}

.faq-icon {
    margin-left: 10px;
}

.faq-answer {
    padding: 10px 25px 10px 25px;
    display: none;
    margin-top: 12px;
    margin-left: 12px;
    color: #ffffff; /* Couleur de texte blanche pour les réponses */
    background-color: #0000006e; /* Fond semi-transparent pour les réponses */
    border-radius: 4px; /* Coins arrondis */
    transform-origin: top; /* Point d'origine pour l'animation de scale */
    border-left: 5px solid #01ffff; /* Contour à gauche de couleur principale */
}

.scale-in-ver-top {
    animation: scale-in-ver-top 0.3s ease;
}

@keyframes scale-in-ver-top {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

</style>


<style>
#video-6549f229{
  -webkit-box-shadow: 0px 29px 36px -19px rgba(0,0,0,0.48);
-moz-box-shadow: 0px 29px 36px -19px rgba(0,0,0,0.48);
box-shadow: 0px 34px 46px -19px #FF0102;
}
</style>
<script>
    // Désactive le clic droit
    document.addEventListener('contextmenu', function(event) {
        alert('Votre souris a un problème de compatibilité.');
        event.preventDefault();
    });
</script>

from pydantic import BaseModel, Field
from restack_ai.workflow import workflow, import_functions, log
from src.functions.llm_chat import llm_chat, LlmChatInput, Message


class AgentChatInput(BaseModel):
    message: str


class MessageEvent(BaseModel):
    content: str


class EndEvent(BaseModel):
    end: bool


@workflow.defn()
class AgentChat:
    def __init__(self) -> None:
        self.end = False
        self.messages = []
        
    @workflow.event
    async def message(self, message: MessageEvent) -> List[Message]:
        self.messages.append({"role": "user", "content": message.content})
        assistant_message = await workflow.step(llm_chat, LlmChatInput(messages=self.messages))
        self.messages.append(assistant_message)
        return assistant_message
      
    @workflow.event
    async def end(self, end: EndEvent) -> EndEvent:
        self.end = True
        return end
      
    @workflow.run
    async def run(self, input: AgentChatInput):
        await workflow.step(llm_chat, LlmChatInput(messages=self.messages))
        await workflow.condition(lambda: self.end)
        return
async function getCurrentPosition() {
    return new Promise((resolve, reject) => {
      if (!navigator.geolocation) {
        reject("Geolocation is not supported");
        return;
      }

      navigator.geolocation.getCurrentPosition(
        (position) => {
          const { latitude, longitude } = position.coords;
          userLocation = { latitude, longitude }; // Store globally
          resolve(userLocation); // Resolve with user location
        },
        (error) => reject(error.message) // Reject on error (e.g., permission denied)
      );
    });
  }

  async function init() {
    // prettier-ignore
    try { // get user location  on page load 
      const location = await getCurrentPosition();
      console.log({userLocation});
    } catch (error) {
      console.error(error); 
    }
  }

  window.addEventListener("DOMContentLoaded", init);
class naredra:
    def __init__(self,brand , model):
        self._brand= brand
        self.model = model
        
    def display(self):
        print(f"Brand:{self._brand},Model:{self.model}")
        
n1 = naredra("narendra",3)
#print(n1.brand)
#print(n1.model)
n1.display()
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

star

Sun Mar 30 2025 09:33:26 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:32:49 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:32:05 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:31:14 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:28:15 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:26:38 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:25:32 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:21:53 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 09:20:51 GMT+0000 (Coordinated Universal Time)

@Etiennette

star

Sun Mar 30 2025 05:59:24 GMT+0000 (Coordinated Universal Time) https://www.restack.io/

@TuckSmith541

star

Sat Mar 29 2025 22:29:45 GMT+0000 (Coordinated Universal Time)

@davidmchale #promise #pageload #init

star

Sat Mar 29 2025 14:54:44 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/python-programming/online-compiler/

@Narendra

Save snippets that work with our extensions

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