Snippets Collections
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta http-equiv="Content-Language" content="en" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<link rel="icon" href="https://dash.infinityfree.com/images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="https://dash.infinityfree.com/images/favicon.ico" type="image/x-icon" />
<title>Domain Checker - InfinityFree</title>
<link rel="preload" as="style" href="https://dash.infinityfree.com/build/assets/clients-c731c904.css" /><link rel="stylesheet" href="https://dash.infinityfree.com/build/assets/clients-c731c904.css" data-navigate-track="reload" /> <style>[wire\:loading][wire\:loading], [wire\:loading\.delay][wire\:loading\.delay], [wire\:loading\.inline-block][wire\:loading\.inline-block], [wire\:loading\.inline][wire\:loading\.inline], [wire\:loading\.block][wire\:loading\.block], [wire\:loading\.flex][wire\:loading\.flex], [wire\:loading\.table][wire\:loading\.table], [wire\:loading\.grid][wire\:loading\.grid], [wire\:loading\.inline-flex][wire\:loading\.inline-flex] {display: none;}[wire\:loading\.delay\.none][wire\:loading\.delay\.none], [wire\:loading\.delay\.shortest][wire\:loading\.delay\.shortest], [wire\:loading\.delay\.shorter][wire\:loading\.delay\.shorter], [wire\:loading\.delay\.short][wire\:loading\.delay\.short], [wire\:loading\.delay\.default][wire\:loading\.delay\.default], [wire\:loading\.delay\.long][wire\:loading\.delay\.long], [wire\:loading\.delay\.longer][wire\:loading\.delay\.longer], [wire\:loading\.delay\.longest][wire\:loading\.delay\.longest] {display: none;}[wire\:offline][wire\:offline] {display: none;}[wire\:dirty]:not(textarea):not(input):not(select) {display: none;}:root {--livewire-progress-bar-color: #2299dd;}[x-cloak] {display: none !important;}</style>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@600&family=Roboto:wght@400;500">
<link rel="modulepreload" href="https://dash.infinityfree.com/build/assets/clients-98837046.js" /><script type="module" src="https://dash.infinityfree.com/build/assets/clients-98837046.js" data-navigate-track="reload"></script>

<script async src="https://www.googletagmanager.com/gtag/js?id=G-GVH0G3RGPP"></script>
<script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){window.dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'G-GVH0G3RGPP', {
                            'user_id': '8627467',
                        'send_page_view': false
        });

        gtag('event', 'page_view', {'ad_provider': 'adsense'});

            </script>
<script type="text/javascript">
        gtag('event', 'ad_page_view', {'ad_provider': 'adsense'});
    </script>
<link rel="modulepreload" href="https://dash.infinityfree.com/build/assets/choice-964d40cc.js" /><script type="module" src="https://dash.infinityfree.com/build/assets/choice-964d40cc.js" data-navigate-track="reload"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script async src="https://fundingchoicesmessages.google.com/i/pub-9174038688046015?ers=1" nonce="Tv9Lv6bQCFc028wtzrUmEw"></script><script nonce="Tv9Lv6bQCFc028wtzrUmEw">(function() {function signalGooglefcPresent() {if (!window.frames['googlefcPresent']) {if (document.body) {const iframe = document.createElement('iframe'); iframe.style = 'width: 0; height: 0; border: none; z-index: -1000; left: -1000px; top: -1000px;'; iframe.style.display = 'none'; iframe.name = 'googlefcPresent'; document.body.appendChild(iframe);} else {setTimeout(signalGooglefcPresent, 0);}}}signalGooglefcPresent();})();</script>
<link rel="modulepreload" href="https://dash.infinityfree.com/build/assets/recovery-d34bec3e.js" /><script type="module" src="https://dash.infinityfree.com/build/assets/recovery-d34bec3e.js" data-navigate-track="reload"></script> </head>
<body class="antialiased    ">
<div class="wrapper">
<header class="navbar navbar-expand-md navbar-light d-print-none">
<div class="container-xl">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu">
<span class="navbar-toggler-icon"></span>
</button>
<h1 class="navbar-brand d-none-navbar-horizontal pe-0 pe-md-3">
<a href="https://dash.infinityfree.com">
<img src="https://dash.infinityfree.com/images/logo.svg" width="110" height="32" alt="InfinityFree" class="navbar-brand-image d-inline-block">
<span class="align-middle">InfinityFree</span>
</a>
</h1>
<div class="navbar-nav flex-row order-md-last">
<div class="nav-item d-none d-md-flex me-3">
<div class="btn-list">
<a href="https://www.infinityfree.com/go/ifastnet" class="btn btn-warning" target="_blank" onclick="gtag('event', 'affiliate_click', {vendor: 'ifastnet', method: 'dash-main-menu'});">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-arrow-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"></path>
<path d="M12 8l-4 4"></path>
<path d="M12 8v8"></path>
<path d="M16 12l-4 -4"></path>
</svg>
Go Premium
</a>
</div>
</div>
<div class="nav-item dropdown">
<a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
<span class="avatar avatar-sm" style="background-image: url(https://www.gravatar.com/avatar/de39f2b654d558ffe5504af16aaf7e04?s=80&amp;d=retro&amp;r=pg)"></span>
<div class="d-none d-xl-block ps-2">
<div><span class="__cf_email__" data-cfemail="45262436243524292820372429052228242c296b262a28">[email&#160;protected]</span></div>
</div>
</a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<a class="dropdown-item" href="https://dash.infinityfree.com/users/8627467">
Profile
</a>
<a class="dropdown-item" href="https://dash.infinityfree.com/users/8627467/logins">
Login History
</a>
<a class="dropdown-item" href="https://dash.infinityfree.com/logout">
Sign out
</a>
</div>
</div>
</div>
</div>
</header>
<div class="navbar-expand-md">
<div class="collapse navbar-collapse" id="navbar-menu">
<div class="navbar navbar-light">
<div class="container-xl">
<ul class="navbar-nav">
<li class="nav-item">
<a href="https://dash.infinityfree.com" class="nav-link">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<polyline points="5 12 3 12 12 3 21 12 19 12"></polyline>
<path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"></path>
<path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"></path>
</svg>
</span>
<span class="nav-link-title">
Home
</span>
</a>
</li>
<li class="nav-item ">
<a href="https://dash.infinityfree.com/users/8627467" class="nav-link">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><circle cx="12" cy="7" r="4" /><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" /></svg>
</span>
<span class="nav-link-title">
Profile
</span>
</a>
</li>
<li class="nav-item ">
<a href="https://dash.infinityfree.com/accounts" class="nav-link">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-server" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="3" y="4" width="18" height="8" rx="3"></rect>
<rect x="3" y="12" width="18" height="8" rx="3"></rect>
<line x1="7" y1="8" x2="7" y2="8.01"></line>
<line x1="7" y1="16" x2="7" y2="16.01"></line>
</svg>
</span>
<span class="nav-link-title">
Accounts
</span>
</a>
</li>
<li class="nav-item ">
<a href="https://dash.infinityfree.com/sslCertificates" class="nav-link">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-shield-lock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3"></path>
<circle cx="12" cy="11" r="1"></circle>
<line x1="12" y1="12" x2="12" y2="14.5"></line>
</svg>
</span>
<span class="nav-link-title">
Free SSL Certificates
</span>
</a>
</li>
<li class="nav-item ">
<a href="https://dash.infinityfree.com/sitePros" class="nav-link">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><rect x="5" y="3" width="14" height="6" rx="2" /><path d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2" /><rect x="10" y="15" width="4" height="6" rx="1" /></svg>
</span>
<span class="nav-link-title">
Site Builders
</span>
</a>
</li>
<li class="nav-item active">
<a href="https://dash.infinityfree.com/domainChecker" class="nav-link">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="12" r="9"></circle>
<path d="M9 12l2 2l4 -4"></path>
</svg>
</span>
<span class="nav-link-title">
Domain Checker
</span>
</a>
</li>
<li class="nav-item">
<a href="https://forum.infinityfree.com/docs" class="nav-link" target="_blank">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-help" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="12" r="9"></circle>
<line x1="12" y1="17" x2="12" y2="17.01"></line>
<path d="M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"></path>
</svg>
</span>
<span class="nav-link-title">
Knowledge Base
</span>
</a>
</li>
<li class="nav-item">
<a href="https://forum.infinityfree.com" class="nav-link" target="_blank">
<span class="nav-link-icon d-md-none d-lg-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-messages" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10"></path>
<path d="M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2"></path>
</svg>
</span>
<span class="nav-link-title">
Community Forum
</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="page-wrapper">
<div class="page-header">
<div class="container-xl content-container">
<div class="row g-2 align-items-center">
<div class="col">
<div class="page-pretitle">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page">Domain Checker</li>
</ol>
</nav>
</div>
<h2 class="page-title">
Domain Checker </h2>
</div>
<div class="col-auto ms-auto d-print-none">
<div class="btn-list">
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-xxl d-none d-xxl-block">

<div class="siderail ms-auto text-end">
<ins class="adsbygoogle" style="display:block" data-ad-format="vertical" data-ad-client="ca-pub-9174038688046015" data-ad-slot="9073625064"></ins>
<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script>
                                    (adsbygoogle = window.adsbygoogle || []).push({});
                                </script>
</div>
</div>
<div class="col-12 col-xxl-auto">
<div class="container-xl content-container">

<div class="row clearfix text-center mb-3">
<div class="col-md-12">
<ins class="adsbygoogle" style="display:block; height: 90px" data-full-width-responsive="true" data-ad-client="ca-pub-9174038688046015" data-ad-slot="1189692857"></ins>
<script>
            (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
</div>
</div>
<div class="row">
<div class="col-12">
<div wire:snapshot="{&quot;data&quot;:{&quot;errors&quot;:[[],{&quot;s&quot;:&quot;arr&quot;}]},&quot;memo&quot;:{&quot;id&quot;:&quot;aVnD9cPHZsdhkRql9Dnl&quot;,&quot;name&quot;:&quot;clients.global-messages&quot;,&quot;path&quot;:&quot;domainChecker&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;children&quot;:[],&quot;scripts&quot;:[],&quot;assets&quot;:[],&quot;errors&quot;:[],&quot;locale&quot;:&quot;en&quot;},&quot;checksum&quot;:&quot;cf8be263473ebf86ccefd5f10a8ecd4d94f48f76a5d3f1d1f7f0d4806685056e&quot;}" wire:effects="{&quot;listeners&quot;:[&quot;global-errors&quot;,&quot;reset-global-errors&quot;]}" wire:id="aVnD9cPHZsdhkRql9Dnl" class="alert alert-important alert-danger d-none">
<div class="d-flex">
<div>
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-alert-circle alert-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"></path>
<path d="M12 8v4"></path>
<path d="M12 16h.01"></path>
</svg>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
<div class="page-body mt-0">
<div class="row row-cards">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Enter a domain name to check</h3>
</div>
<div class="card-body">
<p>
Verify your domain name is set up correctly and identify common issues by entering it in the box below.
</p>
<form method="post" action="https://dash.infinityfree.com/domainChecker">
<div class="mb-3">
<label for="domain" class="form-label">Domain Name</label>
<input type="text" id="domain" name="domain" class="form-control" value placeholder="example.com">
</div>
<button class="btn btn-primary">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path>
<path d="M21 21l-6 -6"></path>
</svg>
Check Domain Name
</button>
<input type="hidden" name="_token" value="QpmboMzPJjWZoEVAtwLVjWQumo3hn0AlY0FU2hWE" autocomplete="off">
</form>
</div>
</div>
</div>
</div>
<div class="row"><div class="col-12 mt-3"></div></div>

<div class="row clearfix text-center mb-3">
<div class="col-md-12">
<ins class="adsbygoogle" style="display:block" data-ad-format="auto" data-full-width-responsive="true" data-ad-client="ca-pub-9174038688046015" data-ad-slot="6594062774"></ins>
<script>
            (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
</div>
</div>
</div>
</div>
</div>
<div class="col-xxl d-none d-xxl-block">

<div class="siderail">
<ins class="adsbygoogle" style="display:block" data-ad-format="vertical" data-ad-client="ca-pub-9174038688046015" data-ad-slot="5872746653"></ins>
<script>
                                    (adsbygoogle = window.adsbygoogle || []).push({});
                                </script>
</div>
</div>
</div>
</div>
<footer class="footer footer-transparent d-print-none">
<div class="container">
<div class="row text-center align-items-center flex-row-reverse">
<div class="col-lg-auto ms-lg-auto">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item">
Powered by
<a href="https://www.infinityfree.com/go/ifastnet" target="_blank" rel="nofollow" onclick="gtag('event', 'affiliate_click', {vendor: 'ifastnet', method: 'dash-footer'});">
iFastNet
</a>
</li>
</ul>
</div>
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item">
Copyright &copy; 2016 - 2024
<a href="https://www.infinityfree.com">InfinityFree</a>.
All rights reserved.
</li>
</ul>
</div>
</div>
</div>
</footer>
</div>
</div>
<script src="/livewire/livewire.min.js?id=239a5c52" data-csrf="QpmboMzPJjWZoEVAtwLVjWQumo3hn0AlY0FU2hWE" data-update-uri="/livewire/update" data-navigate-once="true"></script>
</body>
</html>
get_stylesheet_directory_uri()


get_template_directory_uri()


get_stylesheet_uri()
import UIKit

struct Utility{
    
    static func setCornerRadius(to anyObject: AnyObject,_ cornerRadius: CGFloat, _ borderWidth: CGFloat, _ borderColor: UIColor){
        anyObject.layer.cornerRadius = cornerRadius
        anyObject.layer.borderWidth = borderWidth
        anyObject.layer.borderColor = borderColor.cgColor
    }
    
}
interpreter --api_base "http://localhost:1234/v1" --api_key "fake_key"
winget install --id Microsoft.Powershell --source winget
winget install --id Microsoft.Powershell.Preview --source winget
Employee.java

public class Employee {
    private String cnic;
    private String name;
    private double salary;

    public Employee() {
        System.out.println("No-argument constructor called");
    }

    public Employee(String cnic, String name) {
        setCnic(cnic);
        setName(name);
    }

    public Employee(String cnic, String name, double salary) {
        this(cnic,name);
        setSalary(salary);
    }

    public String getCnic() {
        return cnic;
    }

    public void setCnic(String cnic) {
        this.cnic = cnic;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void getEmployee(){
        System.out.println("CNIC: " + cnic);
        System.out.println("Name: " + name);
        System.out.println("Salary: " + salary);
    }
}

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

EmployeeTest.java

public class EmployeeTest {
    public static void main(String[] args) {
        System.out.println();
        Employee employee1 = new Employee();
        Employee employee2 = new Employee("34104-1234567-9","Muhammad Abdul Rehman");
        Employee employee3 = new Employee("34104-9876543-2","Ahmad",100000);


        employee1.getEmployee();
        System.out.println("----------------");
        employee2.getEmployee();
        System.out.println("-----------------");
        employee3.getEmployee();
        System.out.println("-----------------");
    }

}

function deepCopy(obj){
    let newObj = {};

    for( let key in obj){
        if(typeof obj[key] === 'object'){
            newObj[key] = deepCopy(obj[key]);
        } else {
            newObj[key] = obj[key];
        }
    }
    return newObj;
}
//Create tabBar Controller in storyBoard and give that class "TabBarController"

import UIKit

class TabBarController: UITabBarController {
    
    override func viewDidLoad() {
        super.viewDidLoad()

    }
    
}

//To the tabBar of that TabBarController give it a class "TabBar"

import UIKit

class TabBar: UITabBar {

        var color: UIColor?
        @IBInspectable var radii: CGFloat = 20
        
        private var shapeLayer: CALayer?
        
        override func draw(_ rect: CGRect) {
            
            addShape()
            
        }
        
        private func addShape() {
            let shapeLayer = CAShapeLayer()
            
            shapeLayer.path = createPath()
//            shapeLayer.strokeColor = UIColor.gray.cgColor
            shapeLayer.fillColor = color?.cgColor ?? UIColor.white.cgColor
//            shapeLayer.lineWidth = 1
//            shapeLayer.shadowColor = UIColor.gray.cgColor
//            shapeLayer.shadowOffset = CGSize(width: 0, height: 0);
//            shapeLayer.shadowOpacity = 0.21
//            shapeLayer.shadowRadius = 8
            shapeLayer.shadowPath =  UIBezierPath(roundedRect: bounds, cornerRadius: radii).cgPath
            
            if let oldShapeLayer = self.shapeLayer {
                layer.replaceSublayer(oldShapeLayer, with: shapeLayer)
            } else {
                layer.insertSublayer(shapeLayer, at: 0)
            }
            
            self.shapeLayer = shapeLayer
        }
        
        private func createPath() -> CGPath {
            let path = UIBezierPath(
                roundedRect: bounds,
                byRoundingCorners: [.topLeft, .topRight],
                cornerRadii: CGSize(width: radii, height: 0.0))
            
            return path.cgPath
        }
        
        override func layoutSubviews() {
            super.layoutSubviews()
            self.isTranslucent = true
            var tabFrame = self.frame
            let bottomSafeArea: CGFloat
            
            if #available(iOS 11.0, *) {
                bottomSafeArea = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
            } else {
                // Fallback for older iOS versions
                bottomSafeArea = 0
            }
            
//            print(bottomSafeArea)
            tabFrame.size.height = 68 + bottomSafeArea
//            print(tabFrame.size.height)
            tabFrame.origin.y = self.frame.origin.y + self.frame.height - 68 - bottomSafeArea
//            print(tabFrame.origin.y)
//            self.layer.cornerRadius = 18
            self.frame = tabFrame
//            print(self.frame)
            
            let imageGradient = UIImage.gradientImageToTabBar(bounds: self.bounds, colors: [UIColor(resource: .color1),UIColor(resource: .color2),UIColor(resource: .color3)])
            self.color = UIColor(patternImage: imageGradient)
            
//            self.color = .brown
            self.items?.forEach({ $0.titlePositionAdjustment = UIOffset(horizontal: 0.0, vertical: 0.0) })
        }
        
    

}

import UIKit

extension UITableView{
    
    func setCornerRadius(_ cornerRadius: CGFloat,_ borderWidth: CGFloat,_ borderColor: UIColor){
        self.layer.cornerRadius = cornerRadius
        self.layer.borderWidth = borderWidth
        self.layer.borderColor = borderColor.cgColor
    }
    
    
}
import UIKit

extension UITextField{
    
    func setCornerRadius(_ cornerRadius: CGFloat, _ borderWidth: CGFloat, _ borderColor: UIColor){
        self.layer.cornerRadius = cornerRadius
        self.layer.borderWidth = borderWidth
        self.layer.borderColor = borderColor.cgColor
    }
    
}
import UIKit

extension UIButton{
    
    func cornerRadiusToCircle(){
        self.layer.cornerRadius = self.bounds.size.height / 2
    }
    
}
import UIKit

extension UIView{
    
    func makeCornerRadiusWithBorder(_ cornerRadius: CGFloat, _ borderWidth: CGFloat, _ borderColor: UIColor){
        self.layer.cornerRadius = cornerRadius
        self.layer.borderWidth = borderWidth
        self.layer.borderColor = borderColor.cgColor
    }
    
}
import UIKit

extension String{
    func createRange(linkWord : String) -> NSRange{
        let range = (self as NSString).range(of: linkWord, options: .caseInsensitive)
        return range
    }
  
  var asUrl: URL?{
    return URL(string: self)
  }
  
}
import UIKit

extension UIImageView{
    func setCornerRadiusToCircle(){
        self.layer.cornerRadius = self.bounds.height/2
    }
}
//Don't Forget to add permissions in info.pList for camera and gallery

struct ImagePicker{
    static func callImagePicker(_ viewController: UIViewController){
        let imagePicker = UIImagePickerController()
        imagePicker.delegate = viewController as? any UIImagePickerControllerDelegate & UINavigationControllerDelegate
        imagePicker.allowsEditing = true
        
        let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
        
        alertController.addAction(UIAlertAction(title: "Photo Library", style: .default, handler: { (action) in
            imagePicker.sourceType = .photoLibrary
            viewController.present(imagePicker, animated: true, completion: nil)
        }))
        
        if UIImagePickerController.isSourceTypeAvailable(.camera) {
            alertController.addAction(UIAlertAction(title: "Camera", style: .default, handler: { (action) in
                imagePicker.sourceType = .camera
                viewController.present(imagePicker, animated: true, completion: nil)
            }))
        }
        
        alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
        
        viewController.present(alertController, animated: true, completion: nil)
    }
}

//Inside view Controller

extension Your_View_Controller: UIImagePickerControllerDelegate, UINavigationControllerDelegate{
    
    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
        if let image = info[UIImagePickerController.InfoKey(rawValue: "UIImagePickerControllerEditedImage")] as? UIImage{
            Your_Image_View.image = image
            picker.dismiss(animated: true, completion: nil)
        }
    }
    
    func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
        picker.dismiss(animated: true, completion: nil)
    }
    
}
        let animation = CAKeyframeAnimation(keyPath: "transform.scale")
        animation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
        animation.duration = 1
        animation.values = [1.0, 1.5, 1.0, 1.5, 1]
        animation.keyTimes = [0, 0.2, 0.4, 0.7, 1]
        animation.repeatCount = .infinity
        Your_Button_Name.layer.add(animation, forKey: "heartbeat")
File -> Workspace Setting -> Derived Data
public boolean isPowerOfFour(int n) {
        // If a number is power of 2, It will have 1 bit at even position and if its a power of 4, 
        // which is not a power of 2 e.g. 128 it will have 1 bit at odd position.

        return (n >0) && ((n &(n-1)) ==0) && ((n & 0xaaaaaaaa) ==0);
        
    }
Nơi nào có sự hy sinh, nơi đó có người nào đó thu thập thành quả của những hy sinh đó. Nơi nào có sự phục vụ, nơi đó có người nào đó được phục vụ. Người nào nói với bạn về sự hy sinh là đang nói về người nô lệ và chủ nô lệ, và muốn trở thành người chủ nô lệ.
<?php
/*
 *
 * Author: Pascal Bajorat
 * Copyright (c) 2010 Pascal Bajorat
 * www.webdesign-podcast.de
 *
 * GNU General Public License lizenziert
 * http://www.gnu.org/licenses/gpl.html
 * http://creativecommons.org/licenses/GPL/2.0/deed.de
 *
 * DomainCheck Script
 * Version 1.0.0
 *
 * DomainCheck Script. Zum testen ob Domains bereits vergeben sind oder noch registriert werden können.
 *
 */
 
/* Array mit DomainTopLevel => Whois Url || Rückgabewert wenn die Domain frei ist */
$nic = array(
	'de' => 'whois.nic.de||free',
	'at' => 'whois.nic.at||nothing found',
	'com' => 'whois.crsnic.net||no match for'
);
// Fehlermeldung, wenn die Eingabe der Domain fehlerhaft ist
$WrongDomain = 'Die eingegebene Domain ist fehlerhaft. Bitte &uuml;berpr&uuml;fen Sie Ihre Schreibweise: domain.tld';
// Fehlermledung wenn diese TopLevel Domain nicht überprüft werden soll
$DontSellDomain = 'Bitte entschuldigen Sie, aber wir vertreiben diese TopLevelDomain nicht. Bitte entscheiden Sie sich für eine: .de, .at oder .com Domain.';
// Fehlermeldung wenn der Server der NIC Vergabestelle nicht erreichbar ist
$ServerNotReachable = 'Der Server der Vergabestelle ist aktuell nicht erreichbar, bitte versuchen Sie es später noch einmal.';
/*
 * $_REQUEST['domain'] ist die Variable über die die Domain die überprüft werden soll übergeben wird
 * strtolower() wandelt den kompletten String in Kleinbuchstaben um
 * trim() entfernt Leerzeichen am Anfang und Ende des Strings
 * strip_tags() entfernt HTML Tags
 *
 * Der geänderte und bearbeitete String wird in der Variable $domain gesichert
 *
 */
$domain 	= strip_tags(trim(strtolower($_REQUEST['domain'])));
 
// Überprüfen das die Variable $domain nicht leer ist ansonsten wird eine Fehlermeldung ausgegeben
if( !empty($domain) ){
	// Aus der $domain Variable werden die ggf. vom Nutzer mit eingegebenen http:// und www. Teile entfernt
	$domain = str_replace('http://', '', $domain);
	$domain = str_replace('www.', '', $domain);
 
	// Die Domain wird anhand des Punktes in zwei Teile geteilt DomainName.TopLevel
	$domain = explode('.', $domain);
	$domainCount = count($domain);
 
	// Danach wird überprüft ob die Domain auch wirklich nur aus zwei Teilen besteht,
	// damit z.B. keine Subdomains eingegeben werden Sub.DomainName.TopLevel
	if($domainCount > 2){ die($WrongDomain); }
 
	// Überprüfung ob die eingegebene TLD in unserem Array ($nic) enthalten ist und überprüft werden kann
	if( empty($nic[$domain[1]]) ){ die($DontSellDomain); }else{
		// Wenn der Array Teil für die entsprechende TLD vorhanden ist wird dieser anhand des || gesplittet
		$myNic = explode('||', $nic[$domain[1]]);
		// $NicServer enthält die Server URL
		$NicServer = $myNic[0];
		// $NicFreeResponse enthält den Rückgabewert wenn die Domain frei ist
		$NicFreeResponse = $myNic[1];
	}
 
	// Checken ob der entsprechende whois Server erreichbar ist und dann Verbindung aufbauen
	if ( !($fp = fsockopen($NicServer, 43)) ) {
		// Wenn nicht wird diese Fehlermeldung ausgegeben
		die($ServerNotReachable);
	}
 
	// Dem Server den zu überprüfenden Domainnamen übergeben
	fwrite($fp, $domain[0].'.'.$domain[1]."\r\n");
	$result = '';
 
	// Antwort vom whois Server holen
	while (!feof($fp)) {
		$result .= fread($fp, 1024);
	}
 
	// Verbindung zum Server wieder trennen
	fclose($fp);
 
	// Die Antwort des whois Servers mit dem Rückgabewert aus dem Array vergleichen
	if( strstr($result, $NicFreeResponse) ){
		// Ist der Vergleich erfolgreich, so wird die Nachricht zurückgegeben
		echo 'Die Domain '.$domain[0].'.'.$domain[1].' ist noch nicht vergeben. Wir k&ouml;nnen die Domain f&uuml;r Sie registrieren.';
	}else{
		// Ist die Domain bereits vergeben, erscheint diese Fehlermeldung
		echo 'Es tut uns leid, die Domain '.$domain[0].'.'.$domain[1].' ist leider vergeben. Vielleicht m&ouml;chten Sie eine andere Domain-Kombination ausprobieren?';
	}
}else{
	// Fehlermeldung wenn der Inhalt der Variable $domain leer ist
	echo $WrongDomain;
}
?>
public String addBinary(String a, String b) {
       BigInteger num1 = new BigInteger(a,2);
       BigInteger num2 = new BigInteger(b,2);
       BigInteger zero = new BigInteger("0",2);
       BigInteger carry, answer;
       while(!num2.equals(zero)) {
        answer = num1.xor(num2);
        carry = num1.and(num2).shiftLeft(1);
        num1 = answer;
        num2 = carry;
       }
        return num1.toString(2);
    }
<section class="search-bar sb2 section-space">
	<div class="container sb">
		<div class="col-md-8 center-block">
			!-- Search Form -->
			<form action="https://www.iholytech.com/cg/domainchecker.php" method="post">
			<!-- Search Field -->
				<div class="row fadesimple">
					<div  class="default-title">
						<h3 class="text-white">Search your Domain</h3>
					<div class="title-arrow1"></div>
						<p>Register your domain with in short time</p>
					</div>
					<div class="form-group">
						<div class="input-group">
							<input class="form-control bar" name="domain" type="text" placeholder="Enter your domain name" required="">
							<button class="btn button search-button btn-lg" type="submit"> Search Domain </button>
						</div>
						<div class="ltds clearfix">
							<div class="col-sm-3 col-xs-1 border-right1">
								<p class="blue">.com <span>$10.91</span></p>
							</div>
							<div class="col-sm-3 col-xs-1 border-right2">
								<p class="yellow">.org <span>$13.11</span></p>
							</div>
							<div class="col-sm-3 col-xs-1 border-right3">
								<p class="orange">.net <span>$14.95</span></p>
							</div>
							<div class="col-sm-3 col-xs-1 border-right4">
								<p class="green">.info <span>$15.32</span></p>
							</div>
						</div>
					</div>
				</div>
			</form>
			<!-- End of Search Form -->
		</div>
	</div>
</section>	
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;

class Errorpage extends StatefulWidget {
  const Errorpage({super.key});

  @override
  State<Errorpage> createState() => _ErrorpageState();
}

class _ErrorpageState extends State<Errorpage> {
  @override
  void initState() {
    super.initState();
    getval2();
    Data1;
  }

  bool? Data1;
  Future<void> getval2() async {
    try {
      final res = await http.get(Uri.parse("https://reqres.in/api/users/23"));

      if (res.statusCode == 404) {
        setState(() {
          Data1 = false;
        });
        print(Data1);
      }
    } catch (e) {
      print('Error fetching data: $e');
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: Container(
          child: Data1 == false
              ? const Text("404 : PAGE NOT FOUND")
              : const Text("PAGE FOUND")),
    ));
  }
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Handcrafted Show Piece and Idols</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
  <header>
    <!-- Header content goes here -->
  </header>

  <section>
    <div class="product">
      <img src="https://source.unsplash.com/300x200/?flower" alt="Flower 1">
      <h3>Flower 1</h3>
      <p>Description of Flower 1</p>
      <button class="button">Buy Now</button>
    </div>

    <!-- Add more flowers here in similar structure -->
    <div class="product">
      <img src="https://picsum.photos/300" alt="Flower 2">
      <h3>Flower 2</h3>
      <p>Description of Flower 2</p>
      <button class="button">Buy Now</button>
    </div>
  </section>

  <footer class="footer">
    <p>Copyright &copy; 2024 Your Company</p>
    <a href="#">Terms of Service</a>
  </footer>
</body>



<style>
/* Here is some starter CSS code for your page. You can customize these styles as needed. */
body {
font-family: Arial, Helvetica, sans-serif;
}

header {
background-color: #333;
color: #fff;
padding: 10px;
}

section {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}

.product {
width: 30%;
margin-bottom: 30px;
display: flex;
flex-direction: column;
align-items: center;
border: 1px solid #ddd;
padding: 20px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); 
border-radius: 5px; }

.product img { width: 80%; margin-bottom: 10px; }

.product h3 { font-size: 1.4rem; margin-bottom: 10px; }

.product p { font-size: 1rem; line-height: 1.4; text-align: center; }

.button{ background-color: #4CAF50; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; }

.footer { background-color: #f2f2f2; padding: 20px;
border-top: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; }

.footer p { font-size: 0.8rem; }

.footer a { color: #333; text-decoration: none; font-size: 0.8rem; }

@media screen and (max-width: 768px) { section { display: block; margin: 20px auto; max-width: 500px; }

.product { width: 100%; } }
</style>
</html>
class Get1 {
  Data data;
  Support support;

  Get1({required this.data, required this.support});

  factory Get1.fromJson(Map<String, dynamic> json) => Get1(
        data: Data.fromJson(json["data"]),
        support: Support.fromJson(json["support"]),
      );

  Map<String, dynamic> toJson() => {
        "data": data.toJson(),
        "support": support.toJson(),
      };
}

class Data {
  int id;
  String email;
  String firstName;
  String lastName;
  String avatar;

  Data({
    required this.id,
    required this.email,
    required this.firstName,
    required this.lastName,
    required this.avatar,
  });

  factory Data.fromJson(Map<String, dynamic> json) => Data(
        id: json["id"],
        email: json["email"],
        firstName: json["first_name"],
        lastName: json["last_name"],
        avatar: json["avatar"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "email": email,
        "first_name": firstName,
        "last_name": lastName,
        "avatar": avatar,
      };
}

class Support {
  String url;
  String text;

  Support({
    required this.url,
    required this.text,
  });

  factory Support.fromJson(Map<String, dynamic> json) => Support(
        url: json["url"],
        text: json["text"],
      );

  Map<String, dynamic> toJson() => {
        "url": url,
        "text": text,
      };
}

/////////////////////
  
  
  
  
  
   List<Get1> Data = [];
  List<Get1> Support = [];

  @override
  void initState() {
    super.initState();
    getval();
  }

  Future<void> getval() async {
    try {
      final res = await http.get(Uri.parse("https://reqres.in/api/users/2"));
      Get1 val = Get1.fromJson(json.decode(res.body));
      setState(() {
        Data.add(val);
      });
      if (res.statusCode == 200) {
        print(Data);
      }
    } catch (e) {
      print('Error fetching data: $e');
    }
  }
  
  
  
  /////////////////////////////
  Text(
                                  "Mail : ${Data[0].data.email}",
                                  style: const TextStyle(
                                      fontSize: 20,
                                      color: Colors.white,
                                      fontWeight: FontWeight.bold),
                                ),
 Expanded(
                  child: WebView(
                    initialUrl: Data[0].support.url,
                    // "https://reqres.in/#support-heading",
                    onWebViewCreated: (WebViewController webViewController) {
                      _controller.complete(webViewController);
                    },
                    javascriptMode: JavascriptMode.unrestricted,
                    onWebResourceError: (WebResourceError error) {
                      print('----------------------: $error-----------------');
                    },
                  ),
                ),  
  
  
keytool -genkey -v -keystore my-app-key.keystore -alias my-app-alias -keyalg RSA -keysize 2048 -validity 10000
.gform_wrapper.gravity-theme .gfield-choice-input {
    opacity: 0;
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%);

    &:checked+label {
      background: green;
      color: $white;
    }
  }

  .gchoice {
    input:checked+label {
      &:before {
        filter: brightness(5);
      }
    }
  }

  .gform_wrapper.gravity-theme .gchoice {
    max-width: 423px;
    margin-right: 0;
    margin-bottom: 1rem;

    @media (min-width: $xl) {
      margin-right: 10px;
    }

    &:last-child {
      margin-right: 0;
    }
  }

  .gform_wrapper.gravity-theme .gchoice {
    label {
      background: lightgray;
      border-radius: 80px;
      padding: 15px 30px;
      display: inline-block;
      width: auto;
      position: relative;
      color: $black;
      font-size: 20px;
      line-height: 28px;
      display: flex;
      align-items: center;
      max-width: 100%;

      @media (min-width: $xl) {
        padding: 15px 20px;
      }

      @media (min-width: $xxl) {
        padding: 15px 30px;
      }

      &:before {
        position: relative;
        content: '';
        z-index: 1;
        width: 24px;
        height: 20px;
        margin-right: 12px;
        display: block;
        background-repeat: no-repeat !important;
      }
    }
  }
Manage your whole inventory operation from a single channel on inventory management software. The centralized management system upholds your business efficiently and profitably. Also, staying updated on inventory information such as goods, raw materials, commodities, and products, is more important than any other business function. 

Ongoing, [[inventory management software development]], you can generate detailed reports on the tracking elements and thereby analyze the sales performance, identify trends, and make data-driven decisions for improved customer service and better profitability.
db.participantDietMealPlanDetails.updateMany({
    "mealPlan.dishVariation": "Milkshake",
	"_id":ObjectId("60d4258c4adb9a4b6fe4d99b")
},
    {
    $set: {
        "mealPlan.$[elem].dishVariation": "Milkshake",
        "mealPlan.$[elem].dishVariationId":  "660ea659e1645e032a289770",
        "mealPlan.$[elem].sizes": [{
                "calories": {
                    "value": "184",
                    "unit": "kcal"
                },
                "cookedWeight": "200",
                "name": "Medium Glass",
                "fat": {
                    "value": "5.0",
                    "unit": "gms"
                },
                "calcium": {
                    "value": "0.0",
                    "unit": "mg"
                },
                "iron": {
                    "value": "0.0",
                    "unit": "mg"
                },
                "fibre": {
                    "value": "0.0",
                    "unit": "mg"
                },
                "sodium": {
                    "value": "0.0",
                    "unit": "mg"
                },
                "sugars": {
                    "value": "0.0",
                    "unit": "mg"
                },
                "protein": {
                    "value": "4.7",
                    "unit": "gms"
                },
                "carbs": {
                    "value": "30.4",
                    "unit": "gms"
                }
            }
        ]

    }
}, {
    arrayFilters: [{
            "elem.dishVariation": "Milkshake"
        }
    ]
})
const express = require('express');
const stripe = require('stripe')('sk_test_51O1jDqSCGoxyY1pkuz8S9ZLdnBOHcFrheJvM7pjjdFImdbCrzE5kjdwFjr01RlpYTZoNCOaGwDR6FjwsKq8ULsxL00JmE0Xo7M');
const bodyParser = require('body-parser');

const app = express();
const port = 4000;

// Middleware to parse JSON bodies
app.use(bodyParser.json());

// API endpoint for creating a Stripe checkout session
app.post('/create-checkout-session', async (req, res) => {
    try {
        const session = await stripe.checkout.sessions.create({
            payment_method_types: ['card'],
            line_items: [{
                price_data: {
                    currency: 'inr',
                    product_data: {
                        name: 'Product Name',
                    },
                    unit_amount: req.body.amount * 100,
                },
                quantity: 1,
            }],
            mode: 'payment',
            success_url: req.body.success_url,
            cancel_url: req.body.cancel_url,
        });

        // Redirect the user to the Stripe checkout page
        res.json(session.url);
    } catch (error) {
        console.error(error);
        res.status(500).json({ error: 'An error occurred while creating the checkout session' });
    }
});

// app.post('/process-payment', async (req, res) => {
//     const  sessionId  = "cs_test_a1naEbq6kxn5s2zSRdhh20aMAj8OVtVojY7aJK18DYdq3dvdgT8DeeUYNc";
//
//     try {
//         const checkoutSession = await stripe.checkout.sessions.retrieve(sessionId);
//         console.log("check",checkoutSession)
//         const paymentIntent = checkoutSession.payment_intent;
//         console.log("payment",paymentIntent)
//
//         // Confirm the payment intent
//         const paymentResult = await stripe.paymentIntents.confirm(paymentIntent.id, {
//             payment_method_types: paymentIntent.payment_method_types,
//         });
//
//         if (paymentResult.status === 'succeeded') {
//             // Payment succeeded
//             res.status(200).json({ message: 'Payment succeeded' });
//         } else {
//             // Payment failed
//             res.status(400).json({ message: 'Payment failed' });
//         }
//     } catch (error) {
//         console.error(error);
//         res.status(500).json({ message: 'Server error' });
//     }
// });

app.get('/get-list', async (req, res) => {
    const invoices = await stripe.invoices.list({
        limit: 3,
    });
    res.json({invoices})
})

// Start the server
app.listen(port, () => {
    console.log(`Server running on port ${port}`);
});
public char findTheDifference(String s, String t) {
        char ch =0;
        for(int i=0; i<s.length(); i++) {
            ch ^= s.charAt(i);
        }
        for(int i=0; i<t.length(); i++) {
            ch ^= t.charAt(i);
        }
        return ch;
    }
# Download and install nvm if you don't have it.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
 
# Reload .bashrc so nvm command works
source ~/.bashrc
 
# Explicitly install and use supported node version
nvm install 18.15.0
 
nvm use 18.15.0
 
# Install stencil
npm install -g @bigcommerce/stencil-cli
 if (num == 0) {
            return 1;
        }

        int bitCount = (int) Math.floor((int)(Math.log(num) / Math.log(2))) + 1;
        int allBitsSet = (1 << bitCount) - 1;
        return num ^ allBitsSet;
 // find number of 1 bits
        int n = 10; //101
        int count =0;
        // will repeatedly do and of number with(n-1), as this flips the LSB 1 bit
        while(n !=0) {
            count++;
            n &= (n-1);

        }
        System.out.println("count is " + count);
// creating a monotonic stack
        int[] arr = new int[]{1,2,6,3,5,9, 11,7,};
        Deque<Integer> stack = new LinkedList<>();
        for(int i=0; i<arr.length; i++) {
            while(!stack.isEmpty() && stack.peek()< arr[i]) {
                stack.pop();
            }
            stack.push(arr[i]);
        }
        System.out.println("stack is " + stack);
class WebViewExample extends StatefulWidget {
  @override
  _WebViewExampleState createState() => _WebViewExampleState();
}

class _WebViewExampleState extends State<WebViewExample> {
  final Completer<WebViewController> _controller =
      Completer<WebViewController>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('WebView Example'),
        ),
        body: WebView(
          initialUrl: 'https://www.google.com',
          onWebViewCreated: (WebViewController webViewController) {
            _controller.complete(webViewController);
          },
          javascriptMode: JavascriptMode.unrestricted,
          onWebResourceError: (WebResourceError error) {
            print('Error loading web page ----------------------: $error');
          },
        ));
  }
}
// remove element at certain index without changing original
let arr = [0,1,2,3,4,5]
let newArr = [...arr]
newArr.splice(1,1)//remove 1 element from index 1
console.log(arr) // [0,1,2,3,4,5]
console.log(newArr)// [0,2,3,4,5]



eg //


const comments = [
      { text: 'Love this!', id: 523423 },
      { text: 'Super good', id: 823423 },
      { text: 'You are the best', id: 2039842 },
      { text: 'Ramen is my fav food ever', id: 123523 },
      { text: 'Nice Nice Nice!', id: 542328 }
    ];



// Array.prototype.findIndex()
// Find the comment with this ID
   const commentIndex = comments.findIndex((item) => item.id === 823423)
    // delete the comment with the ID of 823423
    const commentsCopy = [...comments];
    commentsCopy.splice(1, commentIndex) //remove 1 element from index 1
    console.log(commentsCopy)


// or we can use slice from the start to the value and from the value to the end
const newComments = [
  ...comments.slice(1, commentIndex)
  ...comments.slice(commentIndex++)
]
    
void ComponentGraphics::UpdateBackground(GLFWwindow* window, Shader shader, ComponentCamera* camera, glm::vec3 difference)
{
    if (camera->getlockParallax() == false)
    {
        if (difference[0] > 0.0001f) //right
        {
            posX -= backgroundSpeed;
        }
        if (difference[0] < -0.0001f) //left
        {
           posX += backgroundSpeed;
        }
    }
    //96.0f / 50.0f, 84.0f / 50.0f
    float CurrentCameraX = camera->getCameraPosition().x;
    UpdateGraphics(0.0001, window, shader, camera, ConvertTo4x4Affine(AffineScaleMatrix(96.0f / 50.0f, 84.0f / 50.0f) * AffineTranslationMatrix(posX, posY)), "NoCamX");
}

void ComponentGraphics::setBackgroundSpeedFromFile(Stream stream)
{
    backgroundSpeed = StreamReadFloat(stream);
}

void ComponentGraphics::setBackgroundSpeed(float speed)
{
   backgroundSpeed = speed;
}

void ComponentGraphics::setPosFromFile(Stream stream)
{
    posX = StreamReadFloat(stream);
    posY = StreamReadFloat(stream);
}
//------------------------------------------------------------------------------
/*!
\file	ComponentCamera.cpp
\main author: Mary (m.khuu) Camera movement : Riti 
\par	Copyright © 2021 DigiPen (USA) Corporation.
\brief
\reference http://www.opengl-tutorial.org/beginners-tutorials/tutorial-6-keyboard-and-mouse/
*/
//------------------------------------------------------------------------------
#pragma once

//------------------------------------------------------------------------------
// Includes:
//------------------------------------------------------------------------------
#include "ComponentCamera.h"

ComponentCamera::ComponentCamera(void)
{
	ModelMatrix = mat4(0.0f);
	ViewMatrix = mat4(1.0f);
	ProjectionMatrix = mat4(0.0f);
	MVPmatrix = mat4(0.0f);

	position = glm::vec3(0.0f, 0.0f, 1.0f);

	cameraBoundariesMax = glm::vec3(0.0f, 0.0f, 1.0f);
	cameraBoundariesMin = glm::vec3(0.0f, 0.0f, 1.0f);
	cameraSize = glm::vec3(0.0f, 0.0f, 1.0f);
	cameraSpeed = glm::vec3(0.45f, 0.35f, 0.0f);

	horizontalAngle = 3.14f;
	verticalAngle = 0.0f;

	lockParallax = 0;

	lastTime = 0;
}

glm::mat4 ComponentCamera::cameraInput(GLFWwindow* window)
{
	double currentTime = glfwGetTime();
	float deltaTime = float(currentTime - lastTime);

	// Direction : Spherical coordinates to Cartesian coordinates conversion
	glm::vec3 direction(
		cos(verticalAngle) * sin(horizontalAngle),
		sin(verticalAngle),
		cos(verticalAngle) * cos(horizontalAngle)
	);

	// Right vector
	glm::vec3 right = glm::vec3(
		sin(horizontalAngle - 3.14f / 2.0f),
		0,
		cos(horizontalAngle - 3.14f / 2.0f)
	);

	// Up vector
	glm::vec3 up = glm::cross(right, direction);


	//vertical movements currently move diagonally
	if (glfwGetKey(window, GLFW_KEY_UP) == GLFW_PRESS)
	{
		position += deltaTime * cameraSpeed[1];
		position -= right * deltaTime * cameraSpeed[1];
	}
	if (glfwGetKey(window, GLFW_KEY_DOWN) == GLFW_PRESS)
	{
		position -= deltaTime * cameraSpeed[1];
		position += right * deltaTime * cameraSpeed[1];
	}

	if (glfwGetKey(window, GLFW_KEY_RIGHT) == GLFW_PRESS)
	{
		position += right * deltaTime * cameraSpeed[0];
	}
	if (glfwGetKey(window, GLFW_KEY_LEFT) == GLFW_PRESS)
	{
		position -= right * deltaTime * cameraSpeed[0];
	}

	ProjectionMatrix = glm::ortho((-cameraSize.x / 2), (cameraSize.x / 2), -(cameraSize.y / 2), (cameraSize.y / 2), 0.0f, 100.0f);

	ViewMatrix = glm::lookAt(position, position + direction, up);
	ModelMatrix = glm::mat4(1.0f);

	lastTime = currentTime;
	MVPmatrix = (ProjectionMatrix * ViewMatrix * ModelMatrix);
	return MVPmatrix; //returns MVP matrix
}

glm::mat4 ComponentCamera::tieCameraToPlayer(GLFWwindow* window, glm::vec3 playerPos)
{
	setlockParallax(false);
	glm::vec3 direction(
		cos(verticalAngle) * sin(horizontalAngle),
		sin(verticalAngle),
		cos(verticalAngle) * cos(horizontalAngle)
	);

	glm::vec3 right = glm::vec3(
		sin(horizontalAngle - 3.14f / 2.0f),
		0,
		cos(horizontalAngle - 3.14f / 2.0f)
	);

	glm::vec3 up = glm::cross(right, direction);

	ProjectionMatrix = glm::ortho((-cameraSize.x / 2), (cameraSize.x / 2), -(cameraSize.y / 2), (cameraSize.y / 2), 0.0f, 100.0f);

	vec3 CamPos = getCameraPosition();
	CamPos.x = playerPos.x;
	CamPos.y = playerPos.y;

	if (CamPos.x  - (cameraSize.x / 2) < cameraBoundariesMin[0])
	{
		CamPos.x = cameraBoundariesMin[0] + (cameraSize.x / 2);
	}
	if (CamPos.x + (cameraSize.x / 2) > cameraBoundariesMax[0])
	{
		CamPos.x = cameraBoundariesMax[0] -(cameraSize.x / 2);
	}
	if (CamPos.y < cameraBoundariesMin[1])
	{
		CamPos.y = cameraBoundariesMin[1];
	}


	//uncommented to always lock the center of camera to player
	//when player goes up
	
	if (CamPos.y > cameraBoundariesMax[1])
	{
		CamPos.y = cameraBoundariesMax[1];
	}


	setCameraPosition(CamPos);
	ViewMatrix = glm::lookAt(position, position + direction, up);

	ModelMatrix = glm::mat4(1.0f);

	MVPmatrix = (ProjectionMatrix * ViewMatrix * ModelMatrix);
	return MVPmatrix; //returns MVP matrix
}

void ComponentCamera::UpdateCamera(GLFWwindow* window, Shader shader, glm::vec3 position)
{
	shader.use();
	if (position != glm::vec3(0))
	{
		GLuint MatrixID = glGetUniformLocation(shader.ID, "transformation");
		//glm::matddddd4 MVP = cameraInput(window);
		glm::mat4 MVP = tieCameraToPlayer(window, position);
		glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]);
	}
}

glm::mat4 ComponentCamera::getModelMatrix()
{
	return ModelMatrix;
}

glm::mat4 ComponentCamera::getViewMatrix()
{
	return ViewMatrix;
}

glm::mat4 ComponentCamera::getProjectionMatrix()
{
	return ProjectionMatrix;
}

glm::mat4 ComponentCamera::getMVPmatrix()
{
	return MVPmatrix;
}

glm::vec3 ComponentCamera::getCameraBoundariesMin()
{
	return cameraBoundariesMin;
}

glm::vec3 ComponentCamera::getCameraBoundariesMax()
{
	return cameraBoundariesMax;
}

glm::vec3 ComponentCamera::getCameraPosition()
{
	return position;
}

glm::vec3 ComponentCamera::getCameraSize()
{
	return cameraSize;
}

bool ComponentCamera::getlockParallax()
{
	return lockParallax;
}

void ComponentCamera::setCameraBoundariesMin(glm::vec3 boundaries)
{
	cameraBoundariesMin = boundaries;
}

void ComponentCamera::setCameraBoundariesMax(glm::vec3 boundaries)
{
	cameraBoundariesMax = boundaries;
}

void ComponentCamera::setCameraPosition(glm::vec3 P)
{
	position = P;
}

void ComponentCamera::setCameraSize(glm::vec3 S)
{
	cameraSize = S;
}

void ComponentCamera::setCameraSpeed(float speedX, float speedY)
{
	cameraSpeed[0] = speedX;
	cameraSpeed[1] = speedY;
}

void ComponentCamera::setCameraSpeedVec(glm::vec3 speed)
{
	cameraSpeed = speed;
}

void ComponentCamera::setMVPmatrix(glm::mat4 matrix)
{
	MVPmatrix = matrix;
}

void ComponentCamera::setlockParallax(bool value)
{
	lockParallax = value;
}
// ---------------------------------------------------------------------------
// Project Name		:	Nook
// File Name		:	LevelSelect.c
// Author			:	Mary Khuu
// Creation Date	:	19 Mar 2021
// Purpose			:	Level Select
//
// All content © 2021 DigiPen (USA) Corporation, all rights reserved.
// ---------------------------------------------------------------------------

#include "framework.h"
#include "AEEngine.h"
#include "Audio.h"
#include "GameStateManager.h"
#include "Sprite.h"
#include "object_data.h"

#include "LevelSelect.h"

//------------------------------------------------------------------------------
// Private Constants:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Private Structures:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Public Variables:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Private Variables:
//------------------------------------------------------------------------------

static vec2 backgroundSize = { 1670.0f, 564.0f };
static vec2 buttonSize = { 100.0f, 30.0f };
static vec2 textSize = { 150.0f, 50.0f };
static vec2 iconSize = { 30.0f, 30.0f };
static vec2 menuPos = { 0.0f, 200.0f };
static vec2 tutorialPos = { 0.0f, 100.0f };
static vec2 level1Pos = { 0.0f, 0.0f };
static vec2 level2Pos = { 0.0f, -100.0f };
static vec2 level3Pos = { 0.0f, -200.0f };

static signed long mouseX, mouseY;
static float mouseInWorldX, mouseInWorldY;

static AEGfxVertexList* bgMesh;
static AEGfxVertexList* buttonMesh;
static AEGfxVertexList* fontMesh;
static AEGfxVertexList* iconMesh;
static AEGfxVertexList* numMesh;

static AEGfxTexture* bgTexture;
static AEGfxTexture* buttonTexture;
static AEGfxTexture* fontTexture;
static AEGfxTexture* iconTexture;
static AEGfxTexture* numTexture;

static TextureOffset numOffsets[10];
static TextureOffset fontOffsets[30];
static int* currentfontOffset = 0;
static int currfontFrame = 0;
static float* fontTime;

//------------------------------------------------------------------------------
// Private Function Declarations:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Public Functions:
//------------------------------------------------------------------------------

void LevelSelectLoad()
{
    /*mesh for bg*/
    AEGfxMeshStart();

    AEGfxTriAdd(
        -backgroundSize.x, -backgroundSize.y, 0xFF00FF00, 0.0f, 1.0f,
        backgroundSize.x, -backgroundSize.y, 0xFF00FF00, 1.0f, 1.0f,
        -backgroundSize.x, backgroundSize.y, 0xFF00FF00, 0.0f, 0.0f);

    AEGfxTriAdd(
        backgroundSize.x, -backgroundSize.y, 0xFF00FF00, 1.0f, 1.0f,
        backgroundSize.x, backgroundSize.y, 0xFF00FF00, 1.0f, 0.0f,
        -backgroundSize.x, backgroundSize.y, 0xFF00FF00, 0.0f, 0.0f);

    bgMesh = AEGfxMeshEnd();
    AE_ASSERT_MESG(bgMesh, "Failed to create button!");

    bgTexture = AEGfxTextureLoad("Assets/CityscapeGrey.png");
    AE_ASSERT_MESG(bgTexture, "Failed to create pTex!!");

    /*mesh for buttons: green*/
    AEGfxMeshStart();

    AEGfxTriAdd(
        -buttonSize.x, -buttonSize.y, 0xFF00FF00, 0.0f, 1.0f,
        buttonSize.x, -buttonSize.y, 0xFF00FF00, 1.0f, 1.0f,
        -buttonSize.x, buttonSize.y, 0xFF00FF00, 0.0f, 0.0f);

    AEGfxTriAdd(
        buttonSize.x, -buttonSize.y, 0xFF00FF00, 1.0f, 1.0f,
        buttonSize.x, buttonSize.y, 0xFF00FF00, 1.0f, 0.0f,
        -buttonSize.x, buttonSize.y, 0xFF00FF00, 0.0f, 0.0f);

    buttonMesh = AEGfxMeshEnd();
    AE_ASSERT_MESG(buttonMesh, "Failed to create button!");

    buttonTexture = AEGfxTextureLoad("Assets/NookButtonBright.png");
    AE_ASSERT_MESG(buttonTexture, "Failed to create texture!");

    /*mesh for hover icon*/
    iconMesh = createQuadMesh(iconSize.x, iconSize.y, 1.0f, 1.0f, "yarn");

    iconTexture = AEGfxTextureLoad("Assets/TempHover.png");
    AE_ASSERT_MESG(iconTexture, "Failed to create texture!");

    /*mesh for text*/
    fontMesh = createQuadMesh(15.0f, 15.0f, 1.0 / 5, 1.0f / 6, "alphabets");

    fontTexture = AEGfxTextureLoad("Assets/NookFontSheet_alphabet.png");
    AE_ASSERT_MESG(fontTexture, "Failed to create texture!");    

    fontOffsets[0].mX = 0.0f;			    fontOffsets[0].mY = 0.0f / 6;  //A
    fontOffsets[1].mX = 1.0f / 5;		    fontOffsets[1].mY = 0.0f / 6;  //B
    fontOffsets[2].mX = 2.0f / 5;			fontOffsets[2].mY = 0.0f / 6;  //C
    fontOffsets[3].mX = 3.0f / 5;			fontOffsets[3].mY = 0.0f / 6;  //D
    fontOffsets[4].mX = 4.0f / 5;			fontOffsets[4].mY = 0.0f / 6;  //E

    fontOffsets[5].mX = 0.0f;			    fontOffsets[5].mY = 1.0f / 6;  //F
    fontOffsets[6].mX = 1.0f / 5;		    fontOffsets[6].mY = 1.0f / 6;  //G
    fontOffsets[7].mX = 2.0f / 5;			fontOffsets[7].mY = 1.0f / 6;  //H
    fontOffsets[8].mX = 3.0f / 5;			fontOffsets[8].mY = 1.0f / 6;  //I
    fontOffsets[9].mX = 4.0f / 5;			fontOffsets[9].mY = 1.0f / 6;  //J

    fontOffsets[10].mX = 0.0f;			    fontOffsets[10].mY = 2.0f / 6;  //K
    fontOffsets[11].mX = 1.0f / 5;		    fontOffsets[11].mY = 2.0f / 6;  //L
    fontOffsets[12].mX = 2.0f / 5;			fontOffsets[12].mY = 2.0f / 6;  //M
    fontOffsets[13].mX = 3.0f / 5;			fontOffsets[13].mY = 2.0f / 6;  //N
    fontOffsets[14].mX = 4.0f / 5;			fontOffsets[14].mY = 2.0f / 6;  //O

    fontOffsets[15].mX = 0.0f;			    fontOffsets[15].mY = 3.0f / 6;  //P
    fontOffsets[16].mX = 1.0f / 5;		    fontOffsets[16].mY = 3.0f / 6;  //Q
    fontOffsets[17].mX = 2.0f / 5;			fontOffsets[17].mY = 3.0f / 6;  //R
    fontOffsets[18].mX = 3.0f / 5;			fontOffsets[18].mY = 3.0f / 6;  //S
    fontOffsets[19].mX = 4.0f / 5;			fontOffsets[19].mY = 3.0f / 6;  //T

    fontOffsets[20].mX = 0.0f;			    fontOffsets[20].mY = 4.0f / 6;  //U
    fontOffsets[21].mX = 1.0f / 5;		    fontOffsets[21].mY = 4.0f / 6;  //V
    fontOffsets[22].mX = 2.0f / 5;			fontOffsets[22].mY = 4.0f / 6;  //W
    fontOffsets[23].mX = 3.0f / 5;			fontOffsets[23].mY = 4.0f / 6;  //X
    fontOffsets[24].mX = 4.0f / 5;			fontOffsets[24].mY = 4.0f / 6;  //Y


    fontOffsets[25].mX = 0.0f;			    fontOffsets[25].mY = 5.0f / 6;   //Z  
    fontOffsets[26].mX = 1.0f / 5;		    fontOffsets[26].mY = 5.0f / 6;  //blank (1)
    fontOffsets[27].mX = 2.0f / 5;			fontOffsets[27].mY = 5.0f / 6;  //blank (2)
    fontOffsets[28].mX = 3.0f / 5;			fontOffsets[28].mY = 5.0f / 6;  //blank (3)
    fontOffsets[29].mX = 4.0f / 5;			fontOffsets[29].mY = 5.0f / 6;  //blank (4)

    /*mesh for numbers*/
    numMesh = createQuadMesh(15.0f, 15.0f, 1.0 / 3, 1.0f / 4, "numbers");

    numTexture = AEGfxTextureLoad("Assets/NookFontSheet_numbers.png");
    AE_ASSERT_MESG(numTexture, "Failed to create texture!");

    numOffsets[0].mX = 0.0f;			    numOffsets[0].mY = 0.0f / 4;  //0
    numOffsets[1].mX = 1.0f / 3;		    numOffsets[1].mY = 0.0f / 4;  //1
    numOffsets[2].mX = 2.0f / 3;			numOffsets[2].mY = 0.0f / 4;  //2
    
    numOffsets[3].mX = 0.0f;			    numOffsets[3].mY = 1.0f / 4;  //3
    numOffsets[4].mX = 1.0f / 3;			numOffsets[4].mY = 1.0f / 4;  //4
    numOffsets[5].mX = 2.0f / 3;			numOffsets[5].mY = 1.0f / 4;  //5
    
    numOffsets[6].mX = 0.0f;		        numOffsets[6].mY = 2.0f / 4;  //6
    numOffsets[7].mX = 1.0f / 3;			numOffsets[7].mY = 2.0f / 4;  //7
    numOffsets[8].mX = 2.0f / 3;			numOffsets[8].mY = 2.0f / 4;  //8
    
    numOffsets[9].mX = 0.0f / 3;			numOffsets[9].mY = 3.0f / 4;  //9
}

void LevelSelectInit()
{
	AEGfxSetBackgroundColor(1.0f, 1.0f, 1.0f);
	AEGfxSetBlendMode(AE_GFX_BM_BLEND);
}

void LevelSelectUpdate(float dt)
{
    /* Tell the compiler that the 'dt' variable is unused. */
    UNREFERENCED_PARAMETER(dt);

    /*draw background*/
    AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
    AEGfxTextureSet(bgTexture, 0, 0);
    AEGfxSetTransparency(1.0f);
    AEGfxSetPosition(-250.0f, 0.0f);
    AEGfxMeshDraw(bgMesh, AE_GFX_MDM_TRIANGLES);

    //draw menu button
    AEGfxSetPosition(menuPos.x, menuPos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    //draw tutorial button
    AEGfxSetPosition(tutorialPos.x, tutorialPos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);
    

    //draw level1 button
    AEGfxSetPosition(level1Pos.x, level1Pos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    //draw level2 button
    AEGfxSetPosition(level2Pos.x, level2Pos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    //draw level3 button
    AEGfxSetPosition(level3Pos.x, level3Pos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    /*MENU*/
    AEGfxSetPosition(menuPos.x - 45.0f, menuPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[12].mX, fontOffsets[12].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(menuPos.x - 13.0f, menuPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(menuPos.x + 15.0f, menuPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[13].mX, fontOffsets[13].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(menuPos.x + 45.0f, menuPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[20].mX, fontOffsets[20].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    /*MENU - end*/

    /*TUTORIAL*/
    AEGfxSetPosition(tutorialPos.x - 86.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[19].mX, fontOffsets[19].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x - 58.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[20].mX, fontOffsets[20].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x - 30.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[19].mX, fontOffsets[19].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[14].mX, fontOffsets[14].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x + 30.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[17].mX, fontOffsets[17].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x + 46.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[8].mX, fontOffsets[8].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x + 65.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[0].mX, fontOffsets[0].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(tutorialPos.x + 90.0f, tutorialPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    /*TUTORIAL - end*/

    /*LEVEL 1*/
    AEGfxSetPosition(level1Pos.x - 85.0f, level1Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level1Pos.x - 60.0f, level1Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level1Pos.x - 34.0f, level1Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[21].mX, fontOffsets[21].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level1Pos.x - 5.0f, level1Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level1Pos.x + 17.5f, level1Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level1Pos.x + 85.0f, level1Pos.y);
    AEGfxTextureSet(numTexture, numOffsets[1].mX, numOffsets[1].mY, 0.0f); // 1
    AEGfxMeshDraw(numMesh, AE_GFX_MDM_TRIANGLES);

    /*LEVEL 1 - end*/

    /*LEVEL 2*/
    AEGfxSetPosition(level2Pos.x - 85.0f, level2Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level2Pos.x - 60.0f, level2Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level2Pos.x - 34.0f, level2Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[21].mX, fontOffsets[21].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level2Pos.x - 5.0f, level2Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level2Pos.x + 17.5f, level2Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level2Pos.x + 85.0f, level2Pos.y);
    AEGfxTextureSet(numTexture, numOffsets[2].mX, numOffsets[2].mY, 0.0f); // 2
    AEGfxMeshDraw(numMesh, AE_GFX_MDM_TRIANGLES);

    /*LEVEL 2 - end*/

    /*LEVEL 3*/
    AEGfxSetPosition(level3Pos.x - 85.0f, level3Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level3Pos.x - 60.0f, level3Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level3Pos.x - 34.0f, level3Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[21].mX, fontOffsets[21].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level3Pos.x - 5.0f, level3Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level3Pos.x + 17.5f, level3Pos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(level3Pos.x + 85.0f, level3Pos.y);
    AEGfxTextureSet(numTexture, numOffsets[3].mX, numOffsets[3].mY, 0.0f); // 3
    AEGfxMeshDraw(numMesh, AE_GFX_MDM_TRIANGLES);

    /*LEVEL 3 - end*/

    /*get the mouse position*/
    AEInputGetCursorPosition(&mouseX, &mouseY);
    AEGfxConvertScreenCoordinatesToWorld(mouseX, mouseY, &mouseInWorldX, &mouseInWorldY);

    /*if menu is hovered*/
    if ((mouseInWorldX > (menuPos.x - buttonSize.x) && mouseInWorldX < (menuPos.x + buttonSize.x)) &&
        (mouseInWorldY > (menuPos.y - buttonSize.y) && mouseInWorldY < (menuPos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(menuPos.x - 140.0f, menuPos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(Menu);
        }
    }

    /*if tutorial is hovered*/
    if ((mouseInWorldX > (tutorialPos.x - buttonSize.x) && mouseInWorldX < (tutorialPos.x + buttonSize.x)) &&
        (mouseInWorldY > (tutorialPos.y - buttonSize.y) && mouseInWorldY < (tutorialPos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(tutorialPos.x - 140.0f, tutorialPos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(Tutorial);
        }
    }

    /*if level1 is hovered*/
    if ((mouseInWorldX > (level1Pos.x - buttonSize.x) && mouseInWorldX < (level1Pos.x + buttonSize.x)) &&
        (mouseInWorldY > (level1Pos.y - buttonSize.y) && mouseInWorldY < (level1Pos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(level1Pos.x - 140.0f, level1Pos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(Demo);
        }
    }

    /*if level2 is hovered*/
    if ((mouseInWorldX > (level2Pos.x - buttonSize.x) && mouseInWorldX < (level2Pos.x + buttonSize.x)) &&
        (mouseInWorldY > (level2Pos.y - buttonSize.y) && mouseInWorldY < (level2Pos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(level2Pos.x - 140.0f, level2Pos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(Level2);
        }
    }

    /*if level3 is hovered*/
    if ((mouseInWorldX > (level3Pos.x - buttonSize.x) && mouseInWorldX < (level3Pos.x + buttonSize.x)) &&
        (mouseInWorldY > (level3Pos.y - buttonSize.y) && mouseInWorldY < (level3Pos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(level3Pos.x - 140.0f, level3Pos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(Level3);
        }
    }
}

void LevelSelectShutdown()
{
    AudioCleanup();
}

void LevelSelectUnload()
{
    // Unload all textures.
    AEGfxTextureUnload(buttonTexture);
    AEGfxTextureUnload(fontTexture);
    AEGfxTextureUnload(bgTexture);
    AEGfxTextureUnload(iconTexture);
    AEGfxTextureUnload(numTexture);

    // Free all meshes.
    AEGfxMeshFree(buttonMesh);
    AEGfxMeshFree(fontMesh);
    AEGfxMeshFree(bgMesh);
    AEGfxMeshFree(iconMesh);
    AEGfxMeshFree(numMesh);
}

//------------------------------------------------------------------------------
// Private Functions:
//------------------------------------------------------------------------------
star

Sun Apr 07 2024 16:50:14 GMT+0000 (Coordinated Universal Time)

@2late #excel

star

Sun Apr 07 2024 16:10:03 GMT+0000 (Coordinated Universal Time)

@Angel

star

Sun Apr 07 2024 12:29:01 GMT+0000 (Coordinated Universal Time)

@mubashir_aziz

star

Sun Apr 07 2024 05:59:48 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #swift

star

Sun Apr 07 2024 04:40:30 GMT+0000 (Coordinated Universal Time) https://github.com/OpenInterpreter/open-interpreter?tab

@docpainting

star

Sun Apr 07 2024 04:40:03 GMT+0000 (Coordinated Universal Time) https://github.com/OpenInterpreter/open-interpreter?tab

@docpainting #llamafile #local

star

Sun Apr 07 2024 04:19:30 GMT+0000 (Coordinated Universal Time) https://docs.openinterpreter.com/getting-started/setup

@docpainting #windows #powershell

star

Sun Apr 07 2024 00:02:51 GMT+0000 (Coordinated Universal Time)

@Nibs

star

Sat Apr 06 2024 15:47:03 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/sv-se/powershell/scripting/install/installing-powershell-on-windows?view

@dw

star

Sat Apr 06 2024 12:01:01 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #java

star

Sat Apr 06 2024 11:23:24 GMT+0000 (Coordinated Universal Time)

@Ashish_Jadhav

star

Sat Apr 06 2024 11:15:33 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi

star

Sat Apr 06 2024 11:07:24 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #extension

star

Sat Apr 06 2024 11:04:19 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #extension

star

Sat Apr 06 2024 11:02:51 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #extension

star

Sat Apr 06 2024 11:01:17 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #extension

star

Sat Apr 06 2024 10:59:09 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #extension

star

Sat Apr 06 2024 10:57:57 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #extension

star

Sat Apr 06 2024 10:53:53 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #component

star

Sat Apr 06 2024 10:43:34 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #animation

star

Sat Apr 06 2024 10:05:03 GMT+0000 (Coordinated Universal Time) https://www.tradingview.com/mobile/

@Chijunior

star

Sat Apr 06 2024 07:21:54 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #swift

star

Sat Apr 06 2024 06:09:44 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Fri Apr 05 2024 17:25:33 GMT+0000 (Coordinated Universal Time) https://www.chungta.com/nd/tu-lieu-tra-cuu/25-cau-noi-cua-ayn-rand.html

@abcabcabc

star

Fri Apr 05 2024 15:38:07 GMT+0000 (Coordinated Universal Time) https://www.webdesign-podcast.de/2010/09/03/domaincheck-mit-php/

@Angel

star

Fri Apr 05 2024 15:35:35 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Fri Apr 05 2024 15:03:44 GMT+0000 (Coordinated Universal Time) https://whmcs.community/topic/300327-link-domain-search-to-my-html-design/

@Angel #html

star

Fri Apr 05 2024 13:36:55 GMT+0000 (Coordinated Universal Time) https://reqres.in/api/users/23

@hey123 #dart #flutter

star

Fri Apr 05 2024 13:15:18 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/tryit/tryit.asp?filename

@anilserver86

star

Fri Apr 05 2024 12:46:26 GMT+0000 (Coordinated Universal Time) https://reqres.in/api/users/2

@hey123 #dart #flutter

star

Fri Apr 05 2024 11:40:54 GMT+0000 (Coordinated Universal Time) https://github.com/susobhandash/health-details-android-firebase

@susobhandash

star

Fri Apr 05 2024 11:30:17 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #css #sass

star

Fri Apr 05 2024 10:47:58 GMT+0000 (Coordinated Universal Time) https://maticz.com/inventory-management-software-development

@Floralucy #inventorymanagement #inventory #warehousemanagement #inventorysoftware

star

Fri Apr 05 2024 09:59:17 GMT+0000 (Coordinated Universal Time)

@Jevin2090

star

Fri Apr 05 2024 09:24:28 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Fri Apr 05 2024 08:55:29 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/16670931/hide-scroll-bar-but-while-still-being-able-to-scroll

@zaki

star

Fri Apr 05 2024 08:53:40 GMT+0000 (Coordinated Universal Time) https://github.com/chaoocharles/complete-ecommerce-react-node/blob/main/backend/routes/stripe.js

@Jevin2090

star

Fri Apr 05 2024 08:27:23 GMT+0000 (Coordinated Universal Time) https://developer.bigcommerce.com/docs/storefront/stencil/cli/install

@ioVista

star

Fri Apr 05 2024 08:26:04 GMT+0000 (Coordinated Universal Time) https://replit.com/@SURYA-PRAKASH48/mintimediff

@SURYA_PRAKASH

star

Fri Apr 05 2024 07:34:12 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Fri Apr 05 2024 07:22:23 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Fri Apr 05 2024 07:13:56 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Fri Apr 05 2024 06:45:14 GMT+0000 (Coordinated Universal Time)

@hey123 #dart

star

Fri Apr 05 2024 06:32:00 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-how-can-i-stop-the-process

@ioVista

star

Fri Apr 05 2024 06:31:57 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-how-can-i-stop-the-process

@ioVista

star

Fri Apr 05 2024 02:05:28 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript #splice #slice #findindex

star

Thu Apr 04 2024 20:18:47 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #forgottenwoods #camera #parallax

star

Thu Apr 04 2024 20:15:25 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #forgottenwoods #camera

star

Thu Apr 04 2024 19:03:21 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #nook #ui #levelselect #menu

Save snippets that work with our extensions

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