Snippets Collections
Thank you for patiently waiting and for chatting Sendwave my name is Ivan, how are you doing today?
from tqdm import tqdm
from time import sleep

text = """
This is text 123
""" * 100

# repeate text 100 times

with open('out.txt', 'w') as f:
    bar = tqdm(total=len(text), unit='B', unit_scale=True)
    for c in text:
        f.write(c)
        bar.update(1)
        sleep(0.0005)

Quantifiers
In the previous lesson, we discussed sets and ranges. Now it's time to learn about quantifiers, which we can use to indicate how many times a character or expression must occur in order to be counted as a match. We'll also talk about some issues you might face when using quantifiers and how we can overcome those issues.

Basic Quantifiers
Let's say you want to find the word "millennium", but you forgot how many "L"s are in the word: 

const str = 'How many Ls in the word "millennium"?';
 Save
To do this sort of search, you'll need to write a regular expression that will search for a string that starts with 'mi', followed by one or two 'l's, and ends with 'ennium'. 

One Occurrence to Infinite Occurrences — The + Quantifier
If you place the + quantifier to the right of a specific character, the engine will look for all words in which this character occurs one or more times.

const str = 'The correct spelling of the word "millennium" is with two Ls';
const regex = /mil+ennium/;

// this regular expression will find both variants: with one "L" and with two "L"s

str.match(regex); // [ 'millennium' ]
 Save
Zero Occurrences to Infinite Ones — The * Quantifier
Another quantifier used for searching repeated characters is the asterisk quantifier — *, which works in a similar fashion to + . 

Let's take a moment to contrast these two similarly behaving quantifiers. A character followed by + must be placed in a string. This quantifier is telling the engine "Look for this specific character, and after it, there could be any number of similar characters." 

On the other hand, if we put the * quantifier after a certain character, our regular expression can find a match even if that character isn't present. 

Consider the following example:

const exc = 'artist';
const esc = 'artiste';
const regex = /artiste*/; // the letter "e" may or may not occur
exc.match(regex); // [ 'artist' ]
esc.match(regex); // [ 'artiste' ]
 Save
To reiterate, if you place + after a character, the engine will look for matches where the character occurs at least once. If you place * after a character, the engine instead looks for matches with zero or more occurrences. So, in cases like the example above, you can use the * quantifier to create regular expressions that match different spellings of a certain word. The * quantifier tells the engine that the preceding character may or may not be included in the word.

An Optional Character — the ? Quantifier
There's one more way we can make a character optional, which is by using the ? quantifier. The asterisk * can work with any amount of characters, but the question mark will only match either zero occurrences or one occurrence of your chosen character:

/* makes the letter u optional and matches 
both spelling variants: favourite and favorite. */

const regex = /favou?rite/g;
const    str = 'favourite or favorite';

str.match(regex); // ['favourite', 'favorite']
 Save
Either One Character or the Other — The | Quantifier
This quantifier allows us to create "forks" of our characters and search for alternatives in our regular expression. For example, if you write a|b, you're telling the engine that either a or b is fine:

const someSymbol = /cent(er|re)/g
const    str = 'center or centre';

console.log(str.match(someSymbol)); // ['center', 'centre']
 Save
A good situation for using the | quantifier is when you have to work with texts that are written in both American and British English as there are often a lot of subtle spelling differences between the two.

Managing The Number of Repetitions — The {} Quantifier
In order to search for a group of repeated characters, you can usually list them in a regular expression: 

const regionCode = /\d\d\d/;
const    phoneNumber = 'My phone number: +1(555)324-41-5';

phoneNumber.match(regionCode); // [ '555' ]
 Save
The quantifier {} enables us to avoid going through this process. All you have to do is specify the number of matches inside curly braces: 

const regionCode = /\d{3}/;
const    phoneNumber = 'My phone number: +1(555)324-41-5';

phoneNumber.match(regionCode); // [ '555' ]
 Save
In addition to indicating an exact number of repetitions, you can also create a range. For example, we can do this when we need to find matches ranging from 2 to 5 repetitions:

const str = 'this much, thiiis much, thiiiiiiis much';
const regex = /thi{2,5}s/;

str.match(regex); // [ 'thiiis' ]

// in the word "this" the letter "i" occurs only once
// and in the word "thiiiiiiis" the letter "i" occurs more than 5 times
 Save
Additionally, you can omit the maximum number of repetitions. For instance, you can set the quantifier to search a range from one repetition of a character to an infinite number of repetitions. To do that, omit the second number inside curly brackets, while keeping the comma. 

const someSymbol = /a{1,}/g;
const    str = 'alohaa';

console.log(str.match(someSymbol)); // ['a', 'aa']
 Save
Lazy and Greedy Quantifiers
When deciding what to return, a regular expression sometimes faces a choice. 

For example, let's imagine we want to find a string that both starts and ends with "e", using the quantifier {2,11} between the opening and closing letters to limit our search:

const    str = 'Everyone else knows that book, you know';
const someSymbols = /e.{2,11}e/gi;

console.log(str.match(someSymbols)); // ['Everyone else']
 Save
The match() method returned the string 'Everyone else'. But the word 'Everyone' could have also qualified here. After all, it starts with "e", ends in "e", and has 6 letters between the first letter and the last one. What happened?

Apparently, the engine chose the longer match over the shorter one. That's why such behavior is called greedy matching. In fact, greediness is the default behavior of the {} quantifier:

const str = 'eeeeeeeee'; // 9 repetitions of the letter "e"
const regex = /e{1,11}/;

str.match(regex); // [ 'eeeeeeeee' ] — the greedy quantifier found all "e"s 
 Save
Sometimes, our matches are greedy. Hey, nobody's perfect! The flip side of this greediness is laziness. Simply stated, a lazy quantifier will find a short match instead of a long one. To make {} lazy, we just need to put a question mark after it: {}?:

const someSymbols = /e.{2,11}?e/gi;
const    str = 'Everyone else knows that book, you know';

console.log(str.match(someSymbols)); // ['Everyone', 'else']

/* the lazy quantifier has found the shortest matches this time */ 
 Save
You can also make the + quantifier lazy by adding ? in the same way:

const someSymbols = /e.+?n/gi;
const    str = 'Ed\'s son can swim like a fish';

console.log(str.match(someSymbols));// [ "Ed's son" ]
 Save
To emphasize the difference again, notice what happens to the code above when we remove the ?. Instead of 'Ed\'s son', the larger possible match, 'Ed\'s son can', is returned instead:

const someSymbols = /e.+n/gi;
const    str = 'Ed\'s son can swim like a fish';

console.log(str.match(someSymbols));// [ "Ed's son can" ]
 Save
Quantifier	Matches
+	matches a character 1 or more times in a row.
*	matches a character 0 or more times in a row.
׀	matches one of two characters (the one on the left of ׀ or the one on the right)
?	matches a character 0 or 1 times.
{}	matches an exact number of occurrences or a range of repeated characters.
Remember that quantifiers can be greedy and lazy. If a quantifier has to choose between a longer and a shorter string belonging to a regular expression, a lazy quantifier will go for the shorter match, while a greedy one ends up returning the longer string:

const str = 'free from worries'; 
const regexLazy = /fr.+?[es]/; // lazy quantifier 
const regexGreedy = /fr.+[es]/; // greedy quantifier 

console.log(str.match(regexLazy)); // [ 'free' ]
console.log(str.match(regexGreedy)); // [ 'free from worries' ]
 Save
Before moving on to the tasks, let's take a 2 question quiz to help review quantifiers themselves, and the difference between greedy and lazy quantifiers
from datetime import date
from pandas import date_range
from uuid import uuid4
from random import randint


s_date = date(2019, 1, 1)
e_date = date(2019, 1, 30)

stats = {}

for d in date_range(start=s_date, end=e_date):
    d = str(d.date())
    stats[d] = {
        'user_id': str(uuid4()),
        'clicks': randint(0, 1000)
    }


print(stats)
import pyaudio
import numpy as np
import pyqtgraph as pg

# Initialize PyAudio
pa = pyaudio.PyAudio()

# Set up audio stream
stream = pa.open(
    format=pyaudio.paInt16,
    channels=1,
    rate=44100,
    input=True,
    frames_per_buffer=1024
)

# Set up PyQTGraph
app = pg.mkQApp()
win = pg.GraphicsLayoutWidget()
win.show()
plot = win.addPlot(title='Real-time Audio Waveform')
curve = plot.plot()

# Function to update the plot
def update():
    wf_data = np.frombuffer(stream.read(1024), dtype=np.int16)
    curve.setData(wf_data)

# Start the audio stream
timer = pg.QtCore.QTimer()
timer.timeout.connect(update)
timer.start(50)

# Start Qt event loop
pg.mkQApp().exec()

import customtkinter as ctk
import threading


run = True

def task():
    while run:
        print('Task running...')
        if not run:
            print('Task closed')
            return
        
def start_task():
    global run
    run = True
    threading.Thread(target=task).start()


def close_task():
    global run
    run = False

root = ctk.CTk()
root.geometry('500x60')

ctk.CTkButton(root, text='start task', command=start_task).place(x = 20, y = 10)
ctk.CTkButton(root, text='close task', command=close_task).place(x = 220, y = 10)

root.mainloop()
import time
from functools import wraps

def rate_limiter(max_calls, period=60):
    def decorator(func):
        timestamps = []

        @wraps(func)
        def wrapper(*args, **kwargs):
            nonlocal timestamps
            current_time = time.time()
            # Remove timestamps outside of the current period
            timestamps = [t for t in timestamps if current_time - t < period]
            if len(timestamps) < max_calls:
                timestamps.append(current_time)
                return func(*args, **kwargs)
            else:
                print(f"Rate limit exceeded. Try again in {int(period - (current_time - timestamps[0]))} seconds.")
        return wrapper
    return decorator

# Example usage:
@rate_limiter(max_calls=5)
def my_function():
    # Your function implementation here
    print("Function is called")

# Test the rate limiter
for i in range(10):
    my_function()
    time.sleep(1)  # Sleep for demonstration purposes
    Enter any string: www.includehelp.com
    Entered string is: www.includehelp.com

Array.from(document.querySelectorAll('[itemtype="http://schema.org/Organization"]'))
.map(x => { 
    return `"${x.querySelector('[itemprop="url"]').href}", "${x.querySelector('[itemprop="name"]').innerText}", "${x.querySelector('[itemprop="addressLocality"]').innerText}", "${x.querySelector('[itemprop="addressRegion"]').innerText}", "${x.querySelector('[itemprop="telephone"]').innerText}"`;
}).reduce((a,b) => a + '\n' + b, '')
<!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}`);
});
star

Sun Apr 07 2024 23:14:30 GMT+0000 (Coordinated Universal Time)

@llight123010

star

Sun Apr 07 2024 22:57:21 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/d18cb983-879a-4bb5-a5bf-1c155032d8e3/task/029e5f21-b597-4818-b455-c755b137caa1/

@Marcelluki

star

Sun Apr 07 2024 20:22:01 GMT+0000 (Coordinated Universal Time)

@amramroo ##python #coding #limiter #decorators

star

Sun Apr 07 2024 20:21:41 GMT+0000 (Coordinated Universal Time) https://www.includehelp.com/c-programs/string-manipulation-programs.aspx

@2233081393

star

Sun Apr 07 2024 19:57:54 GMT+0000 (Coordinated Universal Time)

@harlanecastro

star

Sun Apr 07 2024 19:57:06 GMT+0000 (Coordinated Universal Time)

@harlanecastro

star

Sun Apr 07 2024 19:56:19 GMT+0000 (Coordinated Universal Time)

@harlanecastro

star

Sun Apr 07 2024 19:55:36 GMT+0000 (Coordinated Universal Time)

@harlanecastro

star

Sun Apr 07 2024 19:54:46 GMT+0000 (Coordinated Universal Time)

@harlanecastro

star

Sun Apr 07 2024 19:32:46 GMT+0000 (Coordinated Universal Time)

@harlanecastro

star

Sun Apr 07 2024 19:23:36 GMT+0000 (Coordinated Universal Time)

@harlanecastro

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

Save snippets that work with our extensions

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