Snippets Collections
url = "https://api-demo.sambasafety.io/oauth2/v1/token";
	headers = {
		"x-api-key": "WJDBWMdYFX3FbAlf3WY8DWBzaG3MaQI9SPbWE0j7",
		"Content-Type": "application/x-www-form-urlencoded",
		"Authorization": "Basic MG9hMTl5Yjlod2dyU3VnNVMzNTg6ZHBvNGFYLWZlWFBqQ2tHanF1YjgwdTc2OG5PY0pUQ3ZGSmtlOTVXUkc2RVFNbWdmMlQxWlUzOUthOEEtT0dnMA=="
	};
	params = map();
	params.put("grant_type", "client_credentials");
	params.put("scope", "API");
	x = invokeurl
	[
		url: url
		type: POST 
		parameters:params
		headers: headers
];
//info x;
access_token = x.get("access_token");
/////////////////////////////////////////////
/////////////////////////////////////////////////////////

url = "https://api-demo.sambasafety.io/organization/v1/groups/92790";
headers = {
    "x-api-key": "WJDBWMdYFX3FbAlf3WY8DWBzaG3MaQI9SPbWE0j7",
    "Content-Type": "application/x-www-form-urlencoded",
    "Authorization": "Bearer " + access_token 
};

x = invokeurl
[
    url: url
    type: get
    headers: headers
];

info x;
add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) {
	return array(
		'width'  => 400,
		'height' => 400,
		'crop'   => 1,
	);
} );
import numpy as np
import math
from typing import Tuple
import pandas as pd
import os
from PIL import Image
import shutil

CLASS_COLORS = {
    0: {'color_rgb': (0, 0, 0), 'label': 'background'},
    1: {'color_rgb': (255, 0, 0), 'label': 'chondroosseous border'},
    2: {'color_rgb': (0, 255, 0), 'label': 'femoral head'},
    3: {'color_rgb': (0, 0, 255), 'label': 'labrum'},
    4: {'color_rgb': (255, 255, 0), 'label': 'cartilagineous roof'},
    5: {'color_rgb': (0, 255, 255), 'label': 'bony roof'},
    6: {'color_rgb': (159, 2, 250), 'label': 'bony rim'},
    7: {'color_rgb': (255, 132, 0), 'label': 'lower limb'},
    8: {'color_rgb': (255, 0, 255), 'label': 'baseline'},
    9: {'color_rgb': (66, 135, 245), 'label': 'lower limb template'},
    10: {'color_rgb': (255, 69, 0), 'label': 'lower limb - alg. v3'}
}

def detect_bump(mask: np.ndarray, skip: int = 15, threshold: int = 5) -> int:
    """
    Wykrywa garb na bony roof. Zwraca 1, jeśli garb wykryto, w przeciwnym wypadku 0.
    """
    label_bony_roof = 5
    binary_mask = (mask == label_bony_roof).astype(np.uint8)

    height, width = binary_mask.shape
    upper_contour = []

    for x in range(width):
        column = binary_mask[:, x]
        if np.any(column):
            y = np.where(column)[0][0] 
            upper_contour.append((x, y))
        else:
            upper_contour.append((x, np.nan))

    print(f"Upper contour (pierwsze 10 punktów): {upper_contour[:10]}")

    # Odfiltrowanie wartości NaN (kolumn bez bony roof)
    valid_contour = np.array([y for x, y in upper_contour if not np.isnan(y)])

    if len(valid_contour) == 0:
        print("Brak pikseli bony roof")
        return 0
    
    min_y = np.min(valid_contour)

    print(f"Najwyższy punkt (min_y): {min_y}")

    distances = valid_contour - min_y
    
    print(f"Odległości od najwyższego punktu (pierwsze 10): {distances[:10]}")

    differences = pd.Series(distances).diff(periods=skip).diff().fillna(0).abs()

    print(f"Pierwsze 3 różnice z różnic: {differences[:3].values}")
    max_diff = differences.max()
    print(f"Max różnica: {max_diff}")

    return 1 if max_diff >= threshold else 0

def process_masks_and_save_with_visualization(mask_dir, bump_dir, no_bump_dir, skip=7, threshold=6):
    """
    Przetwarza maski, wykrywa obecność garbu, zapisuje je do odpowiednich folderów 
    i tworzy ich wizualizacje.
    """
    if not os.path.exists(bump_dir):
        os.makedirs(bump_dir)
    if not os.path.exists(no_bump_dir):
        os.makedirs(no_bump_dir)

    for filename in os.listdir(mask_dir):
        file_path = os.path.join(mask_dir, filename)
        
        if os.path.isfile(file_path) and filename.endswith('.png'):
            mask = Image.open(file_path).convert('L')  # Konwertuj do odcieni szarości
            mask_np = np.array(mask)
            
            # Wykrycie garbu
            bump_present = detect_bump(mask_np, skip, threshold)
            
            # Obliczanie max_diff
            label_bony_roof = 5
            binary_mask = (mask_np == label_bony_roof).astype(np.uint8)
            height, width = binary_mask.shape
            upper_contour = []

            for x in range(width):
                column = binary_mask[:, x]
                if np.any(column):
                    y = np.where(column)[0][0]  # Najwyższy piksel w danej kolumnie
                    upper_contour.append(y)
                else:
                    upper_contour.append(height)

            upper_contour = np.array(upper_contour)
            min_y = np.min(upper_contour)
            distances = min_y - upper_contour
            differences = pd.Series(distances).diff(periods=skip).fillna(0).abs()
            max_diff = differences.max()
            
            # Wizualizacja maski
            visualized_image = np.zeros((height, width, 3), dtype=np.uint8)
            
            for label, color_info in CLASS_COLORS.items():
                color = color_info['color_rgb']
                visualized_image[mask_np == label] = color

            # Zapisanie do odpowiedniego folderu
            if bump_present:
                save_path = os.path.join(bump_dir, filename)
            else:
                save_path = os.path.join(no_bump_dir, filename)

            Image.fromarray(visualized_image).save(save_path)
            print(f'Zapisano zwizualizowaną maskę do: {save_path} - max_diff: {max_diff}')


process_masks_and_save_with_visualization('./Angles/dane/masks', './Angles/dane/garb_obecny','./Angles/dane/garb_nieobecny')
add_filter( 'woocommerce_get_image_size_single', function( $size ) {
	return array(
		'width'  => 500,
		'height' => 500,
		'crop'   => 1,
	);
} );
add_filter( 'woocommerce_get_image_size_thumbnail', function( $size ) {
	return array(
		'width'  => 500,
		'height' => 500,
		'crop'   => 1,
	);
} );
        PM2 is a Production Process Manager for Node.js applications
                     with a built-in Load Balancer.

                Start and Daemonize any application:
                $ pm2 start app.js

                Load Balance 4 instances of api.js:
                $ pm2 start api.js -i 4

                Monitor in production:
                $ pm2 monitor

                Make pm2 auto-boot at server restart:
                $ pm2 startup

                To go further checkout:
                http://pm2.io/
function add_gtm_script() {
    ?>
    <!-- Google Tag Manager -->
    <script>
    (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
    var f=d.getElementsByTagName(s)[0], j=d.createElement(s), dl=l!='dataLayer'?'&l='+l:'';
    j.async=true; j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
    f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-WXR2BQ93');
    </script>
    <!-- End Google Tag Manager -->
    <?php
}
add_action('wp_head', 'add_gtm_script');
function add_gtm_noscript() {
    ?>
    <!-- Google Tag Manager (noscript) -->
    <noscript>
        <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WXR2BQ93"
        height="0" width="0" style="display:none;visibility:hidden"></iframe>
    </noscript>
    <!-- End Google Tag Manager (noscript) -->
    <?php
}
add_action('wp_body_open', 'add_gtm_noscript');
<div class="switch">
    <input id="checkbox1" class="look" type="checkbox">
    <label for="checkbox1"></label>
</div>

.switch {
position: relative;
}

.switch label {
width: 55px;
height: 23px;
background-color: #999;
position: absolute;
top: 0;
left: 0;
border-radius: 50px;
}

.switch input[type="checkbox"] {
visibility: hidden;
}

.switch label:after {
content: '';
width: 21px;
height: 21px;
border-radius: 50px;
position: absolute;
top: 1px;
left: 1px;
transition: 100ms;
background-color: white;
}

.switch .look:checked + label:after {
left: 32px;
}

.switch .look:checked + label {
background-color: lightsteelblue;
}
//Disabling Automatic Scrolling On All Gravity Forms
add_filter( 'gform_confirmation_anchor', '__return_false' );
//Aim is to divide the list recursively into smaller sublists
//until each sublist conatins only 1 element or no elements
function merge_sort(xs) {
    if (is_null(xs) || is_null(tail(xs))){
        return xs;
    } else {
        const mid = middle(length(xs)); // to find value of half
        return merge (merge_sort(take(xs,mid)), merge_sort(drop(xs, mid)));
    }
}

//Aim is to combine two sorted sublists into a single sorted sublist
function merge(xs,ys){
    if (is_null(xs)) {
        return ys;
    } else if (is_null(ys)) {
        return xs;
    } else {
        const x = head(xs);
        const y = head(ys);
        return x < y
               ? pair(x, merge(tail(xs), ys))
               : pair(y, merge(xs, tail(ys)));
    }
}

//Half rounded downwards
function middle(n){
    return math_floor(n/2);
}

//Take first n elements of list
function take(xs,n){
    return n===0
           ? null 
           : pair(head(xs), take(tail(xs), n-1));
}
//Drop first n elements of list, return the rest         
function drop(xs, n){
    return n === 0
           ? xs
           : drop(tail(xs), n-1);
}


// Test
merge_sort(list(7, 6, 3, 8, 4, 6, 5, 9, 8, 3, 1, 5, 2));
We've disabled your account
You no longer have access to curtisfrederickkennethbarry
Account disabled on 28 August 2024
elem {
    width: 100%;
    width: -moz-available;          /* WebKit-based browsers will ignore this. */
    width: -webkit-fill-available;  /* Mozilla-based browsers will ignore this. */
    width: fill-available;
}

elem {
    height: 100%;
    height: -moz-available;          /* WebKit-based browsers will ignore this. */
    height: -webkit-fill-available;  /* Mozilla-based browsers will ignore this. */
    height: fill-available;
}
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
#include <iostream>
#include <string>
#include <set>

using namespace std;

int minimumNumber(int n, const string& password) {
    // Define character sets
    const string numbers = "0123456789";
    const string lower_case = "abcdefghijklmnopqrstuvwxyz";
    const string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    const string special_characters = "!@#$%^&*()-+";

    // Flags to check the presence of required character types
    bool has_digit = false;
    bool has_lower = false;
    bool has_upper = false;
    bool has_special = false;

    // Check for each character in the password
    for (char ch : password) {
        if (numbers.find(ch) != string::npos) has_digit = true;
        else if (lower_case.find(ch) != string::npos) has_lower = true;
        else if (upper_case.find(ch) != string::npos) has_upper = true;
        else if (special_characters.find(ch) != string::npos) has_special = true;
    }

    // Count how many character types are missing
    int missing_types = 0;
    if (!has_digit) missing_types++;
    if (!has_lower) missing_types++;
    if (!has_upper) missing_types++;
    if (!has_special) missing_types++;

    // Calculate the total number of characters needed
    int total_needed = max(6 - n, 0); // Length requirement
    return max(missing_types, total_needed);
}

int main() {
    int n;
    cin >> n; // Length of the password
    string password;
    cin >> password; // The password string

    int result = minimumNumber(n, password);
    cout << result << endl; // Output the minimum number of characters to add

    return 0;
}
#include <iostream>
#include <string>

using namespace std;

int camelcase(const string& s) {
    int wordCount = 1; // Start with 1 to account for the first word
    
    for (char ch : s) {
        if (isupper(ch)) {
            wordCount++; // Increment the count for every uppercase letter
        }
    }

    return wordCount;
}

int main() {
    string s;
    cin >> s; // Input the CamelCase string
    cout << camelcase(s) << endl; // Output the number of words
    return 0;
}
#include <iostream>
#include <string>
#include <cctype>

using namespace std;

string checkPangram(const string& sentence) {
    bool letters[26] = {false}; 

    for (char ch : sentence) {
        if (isalpha(ch)) {
            int index = tolower(ch) - 'a';
            letters[index] = true; // Mark this letter as present
        }
    }

    for (bool present : letters) {
        if (!present) {
            return "not pangram";
        }
    }

    return "pangram";
}

int main() {
    string input;
    getline(cin, input);
    cout << checkPangram(input) << endl;
    return 0;
}
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits> // Include this header to use INT_MAX

using namespace std;

vector<int> closestNumbers(vector<int>& arr) {
    vector<int> result;
    sort(arr.begin(), arr.end()); // Step 1: Sort the array

    int minDiff = INT_MAX; // Initialize minDiff to a large value

    // Step 2: Find the smallest absolute difference
    for (size_t i = 0; i < arr.size() - 1; ++i) {
        int diff = arr[i + 1] - arr[i];
        if (diff < minDiff) {
            minDiff = diff;
        }
    }

    // Step 3: Collect pairs with the smallest difference
    for (size_t i = 0; i < arr.size() - 1; ++i) {
        int diff = arr[i + 1] - arr[i];
        if (diff == minDiff) {
            result.push_back(arr[i]);
            result.push_back(arr[i + 1]);
        }
    }

    return result;
}

int main() {
    int n;
    cin >> n;
    vector<int> arr(n);

    for (int i = 0; i < n; ++i) {
        cin >> arr[i];
    }

    vector<int> result = closestNumbers(arr);

    for (int num : result) {
        cout << num << " ";
    }
    cout << endl;

    return 0;
}
#include <iostream>
#include <vector>

using namespace std;

vector<int> quickSort(const vector<int>& arr) {
    int pivot = arr[0];
    vector<int> left, middle, right;

    // Partitioning the array
    for (int i = 1; i < arr.size(); i++) {
        if (arr[i] < pivot) {
            left.push_back(arr[i]);
        } else {
            right.push_back(arr[i]);
        }
    }

    middle.push_back(pivot); // Add the pivot to the middle
    // Combine left, middle, and right
    left.insert(left.end(), middle.begin(), middle.end());
    left.insert(left.end(), right.begin(), right.end());

    return left;
}

int main() {
    int n;
    cin >> n; // Size of the array
    vector<int> arr(n);
    
    // Input array
    for (int i = 0; i < n; i++) {
        cin >> arr[i];
    }
    
    // Get the partitioned array
    vector<int> result = quickSort(arr);

    // Output the result
    for (int num : result) {
        cout << num << " ";
    }
    cout << endl;

    return 0;
}
#include <iostream>
#include <vector>

using namespace std;

vector<int> quickSort(const vector<int>& arr) {
    int pivot = arr[0];
    vector<int> left, middle, right;

    // Partitioning the array
    for (int i = 1; i < arr.size(); i++) {
        if (arr[i] < pivot) {
            left.push_back(arr[i]);
        } else {
            right.push_back(arr[i]);
        }
    }

    middle.push_back(pivot); // Add the pivot to the middle
    // Combine left, middle, and right
    left.insert(left.end(), middle.begin(), middle.end());
    left.insert(left.end(), right.begin(), right.end());

    return left;
}

int main() {
    int n;
    cin >> n; // Size of the array
    vector<int> arr(n);
    
    // Input array
    for (int i = 0; i < n; i++) {
        cin >> arr[i];
    }
    
    // Get the partitioned array
    vector<int> result = quickSort(arr);

    // Output the result
    for (int num : result) {
        cout << num << " ";
    }
    cout << endl;

    return 0;
}
# Press Win+R to open the Run prompt and enter this value:

shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}

# Tick the Always show all icons and notifications on the taskbar checkbox and click the OK button.
#include <iostream>

struct SinglyLinkedListNode {
    int data;
    SinglyLinkedListNode* next;
    SinglyLinkedListNode(int val) : data(val), next(nullptr) {}
};

int compare_lists(SinglyLinkedListNode* llist1, SinglyLinkedListNode* llist2) {
    while (llist1 != nullptr && llist2 != nullptr) {
        if (llist1->data != llist2->data) {
            return 0; // Lists are not equal
        }
        llist1 = llist1->next;
        llist2 = llist2->next;
    }
    
    // Check if both lists have reached the end
    if (llist1 == nullptr && llist2 == nullptr) {
        return 1; // Lists are equal
    } else {
        return 0; // One list is longer than the other
    }
}

int main() {
    int t;
    std::cin >> t; // Number of test cases
    while (t--) {
        int n1;
        std::cin >> n1; // Number of nodes in the first list
        SinglyLinkedListNode* llist1 = nullptr;
        SinglyLinkedListNode* tail1 = nullptr;
        
        for (int i = 0; i < n1; ++i) {
            int value;
            std::cin >> value;
            SinglyLinkedListNode* newNode = new SinglyLinkedListNode(value);
            if (llist1 == nullptr) {
                llist1 = newNode;
                tail1 = newNode;
            } else {
                tail1->next = newNode;
                tail1 = newNode;
            }
        }

        int n2;
        std::cin >> n2; // Number of nodes in the second list
        SinglyLinkedListNode* llist2 = nullptr;
        SinglyLinkedListNode* tail2 = nullptr;

        for (int i = 0; i < n2; ++i) {
            int value;
            std::cin >> value;
            SinglyLinkedListNode* newNode = new SinglyLinkedListNode(value);
            if (llist2 == nullptr) {
                llist2 = newNode;
                tail2 = newNode;
            } else {
                tail2->next = newNode;
                tail2 = newNode;
            }
        }

        std::cout << compare_lists(llist1, llist2) << std::endl;

        // Clean up memory (optional but good practice)
        // (You should implement a function to delete the linked list nodes)
    }

    return 0;
}
#include <iostream>
#include <stack>
using namespace std;

class QueueUsingStacks {
private:
    stack<int> enqueueStack;
    stack<int> dequeueStack;

    void transferToDequeueStack() {
        // Move elements from enqueueStack to dequeueStack
        while (!enqueueStack.empty()) {
            dequeueStack.push(enqueueStack.top());
            enqueueStack.pop();
        }
    }

public:
    void put(int value) {
        enqueueStack.push(value);
    }

    void pop() {
        if (dequeueStack.empty()) {
            transferToDequeueStack();
        }
        if (!dequeueStack.empty()) {
            dequeueStack.pop();
        }
    }

    int peek() {
        if (dequeueStack.empty()) {
            transferToDequeueStack();
        }
        return dequeueStack.top();
    }
};

int main() {
    int q;
    cin >> q;
    QueueUsingStacks queue;

    for (int i = 0; i < q; ++i) {
        int queryType;
        cin >> queryType;

        if (queryType == 1) {
            int value;
            cin >> value;
            queue.put(value);
        } else if (queryType == 2) {
            queue.pop();
        } else if (queryType == 3) {
            cout << queue.peek() << endl;
        }
    }

    return 0;
}
#include <iostream>
#include <vector>
#include <queue>
#include <set>
using namespace std;

struct Position {
    int x, y, moves;
};

int minimumMoves(const vector<string>& grid, int startX, int startY, int goalX, int goalY) {
    int n = grid.size();
    vector<pair<int, int>> directions = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; // Right, Down, Left, Up
    queue<Position> q;
    set<pair<int, int>> visited;

    q.push({startX, startY, 0});
    visited.insert({startX, startY});

    while (!q.empty()) {
        Position current = q.front();
        q.pop();

        // Check if we reached the goal
        if (current.x == goalX && current.y == goalY) {
            return current.moves;
        }

        // Explore in all four directions
        for (auto& dir : directions) {
            int nx = current.x, ny = current.y;

            // Move until hitting a boundary or a blocked cell
            while (nx + dir.first >= 0 && nx + dir.first < n &&
                   ny + dir.second >= 0 && ny + dir.second < n &&
                   grid[nx + dir.first][ny + dir.second] == '.') {
                nx += dir.first;
                ny += dir.second;

                // If we reach the goal during the movement
                if (nx == goalX && ny == goalY) {
                    return current.moves + 1;
                }

                // If this position hasn't been visited
                if (visited.find({nx, ny}) == visited.end()) {
                    visited.insert({nx, ny});
                    q.push({nx, ny, current.moves + 1});
                }
            }
        }
    }

    // If we exit the loop without having found the goal
    return -1; // Return -1 if the goal is unreachable
}

int main() {
    int n;
    cin >> n;
    vector<string> grid(n);
    for (int i = 0; i < n; ++i) {
        cin >> grid[i];
    }
    int startX, startY, goalX, goalY;
    cin >> startX >> startY >> goalX >> goalY;

    cout << minimumMoves(grid, startX, startY, goalX, goalY) << endl;

    return 0;
}
#include <iostream>
#include <stack>
#include <string>
#include <unordered_map>

using namespace std;

string isBalanced(string s) {
    // Mapping of closing brackets to their corresponding opening brackets
    unordered_map<char, char> bracketMap = {
        {')', '('},
        {']', '['},
        {'}', '{'}
    };
    
    stack<char> stk;
    
    for (char ch : s) {
        // If it's an opening bracket, push it onto the stack
        if (bracketMap.find(ch) == bracketMap.end()) {
            stk.push(ch);
        } 
        // If it's a closing bracket
        else {
            // Check if the stack is empty or the top of the stack doesn't match
            if (stk.empty() || stk.top() != bracketMap[ch]) {
                return "NO";
            }
            // Pop the matching opening bracket
            stk.pop();
        }
    }
    
    // If the stack is empty, all brackets matched correctly
    return stk.empty() ? "YES" : "NO";
}

int main() {
    int n;
    cin >> n; // Read the number of strings
    cin.ignore(); // Ignore the newline after the number input

    for (int i = 0; i < n; ++i) {
        string s;
        getline(cin, s); // Read each bracket string
        cout << isBalanced(s) << endl; // Output YES or NO
    }
    
    return 0;
}
#include <iostream>
#include <vector>
using namespace std;

int twoStacks(int maxSum, const vector<int>& a, const vector<int>& b) {
    int sum = 0, count = 0, i = 0, j = 0;


    while (i < a.size() && sum + a[i] <= maxSum) {
        sum += a[i];
        i++;
    }

    
    count = i;

    
    while (j < b.size() && i >= 0) {
        sum += b[j];
        j++;
        
        
        while (sum > maxSum && i > 0) {
            i--;
            sum -= a[i];
        }

        
        if (sum <= maxSum) {
            count = max(count, i + j);
        }
    }

    return count;
}

int main() {
    int g;
    cin >> g;

    while (g--) {
        int n, m, maxSum;
        cin >> n >> m >> maxSum;
        
        vector<int> a(n);
        vector<int> b(m);
        
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        
        for (int i = 0; i < m; i++) {
            cin >> b[i];
        }
        
        cout << twoStacks(maxSum, a, b) << endl;
    }

    return 0;
}
#include <iostream>
#include <list>

using namespace std;

int main()
{
    list<int> a,b,c;
    long A = 0, B = 0, C = 0, x = 0, num[3];
    int height = 0;

    cin >> num[0] >> num[1] >> num[2];

    while(num[0]--){
        cin >> height;
        a.push_back(height);
        A += height;
    }

  
    while(num[1]--){
        cin >> height;
        b.push_back(height);
        B += height;
    }

 
    while(num[2]--){
        cin >> height;
        c.push_back(height);
        C += height;
    }

    list<int> :: iterator itr1, itr2, itr3;

    itr1 = a.begin();
    itr2 = b.begin();
    itr3 = c.begin();

    while(A != B || B != C){
    
        x = max(A,B);
        x = max(x,C);

 
        if(A == x){
            A -=(*itr1);
            ++itr1;
        }
        if(B == x){
            B -= (*itr2);
            ++itr2;
        }
        if(C == x){
            C -= (*itr3);
            ++itr3;
        }
    }

 
    cout << A << endl;

    return 0;
}
 </li>
      <li class="nav-item dropdown">
        <a href="#movies" class="nav-link dropdown-toggle" data-toggle="dropdown">Movies</a>
        <div class="dropdown-menu"></div>
        <a href="#videos" class="nav-link" data-toggle="tab">meri</a>
        <a href="#videos" class="nav-link" data-toggle="tab">krriirr</a>
        <a href="#videos" class="nav-link" data-toggle="tab">Vttts</a>

      </li>
    </ul>
Key Differences
Architecture:

bull: Uses Redis as a backend, which makes it simpler to set up and use for job queuing and background processing.
Kafka: Requires a more complex setup with Kafka brokers and Zookeeper, designed for distributed, high-throughput messaging.
Use Cases:

bull: Ideal for background job processing, task scheduling, and handling asynchronous tasks in Node.js applications.
Kafka: Ideal for real-time data streaming, event sourcing, and building scalable, distributed systems.
Scalability:

bull: Suitable for small to medium-scale applications. Limited by the scalability of Redis.
Kafka: Designed for large-scale, high-availability applications. Can handle millions of messages per second.
Complexity:

bull: Easier to set up and use, especially for Node.js developers.
Kafka: More complex to set up and manage, but offers more powerful features for distributed messaging.
Example Use Cases
bull:

Background job processing (e.g., sending emails, processing images).
Task scheduling (e.g., cron jobs).
Rate limiting and job prioritization.
Kafka:

Real-time data pipelines (e.g., log aggregation, metrics collection).
Event sourcing and CQRS.
Stream processing (e.g., real-time analytics, monitoring).
Conclusion
Use bull if you need a simple, easy-to-use job queue for background processing in a Node.js application.
Use Kafka if you need a robust, distributed streaming platform for handling large volumes of data and building real-time data pipelines.
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
<!DOCTYPE html>
<html>
<head>
  <title>Tab Navigation</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"></script>
</head>
<body>
  <div class="container">
    <ul class="nav nav-tabs">
      <li class="nav-item">
        <a href="#home" class="nav-link active" data-toggle="tab">Home</a>
      </li>
      <li class="nav-item">
        <a href="#image" class="nav-link" data-toggle="tab">Images</a>
      </li>
      <li class="nav-item">
        <a href="#contact" class="nav-link" data-toggle="tab">Contact</a>
      </li>
      <li class="nav-item">
        <a href="#videos" class="nav-link" data-toggle="tab">Videos</a>
      </li>
      <li class="nav-item">
        <a href="#movies" class="nav-link" data-toggle="tab">Movies</a>
      </li>
    </ul>
    <div class="tab-content">
      <div id="home" class="tab-pane active">
        <div class="jumbotron">
          <h1>Welcome to Home</h1>
        </div>
      </div>
      <div id="image" class="tab-pane">
        <div class="jumbotron">
          <h1>Welcome to Images</h1>
        </div>
      </div>
      <div id="contact" class="tab-pane">
        <div class="jumbotron">
          <h1>Contact Us</h1>
        </div>
      </div>
      <div id="videos" class="tab-pane">
        <div class="jumbotron">
          <h1>Videos</h1>
        </div>
      </div>
      <div id="movies" class="tab-pane">
        <div class="jumbotron">
          <h1>Movies</h1>
        </div>
      </div>
    </div>
  </div>
</body>
</html>
<!DOCTYPE html>
<html>
    <head>
        <style type="text/css">
            * {
                cursor: url(https://ani.cursors-4u.net/cursors/cur-12/cur1103.ani), url(https://ani.cursors-4u.net/cursors/cur-12/cur1103.png), auto !important;
            }
        </style>
        <a href="https://www.cursors-4u.com/cursor/2014/03/14/rainbow-pinwheel-pointer.html" target="_blank" title="Rainbow Pinwheel Pointer">
            <img src="https://cur.cursors-4u.net/cursor.png" border="0" alt="Rainbow Pinwheel Pointer" style="position:absolute; top: 0px; right: 0px;" />
        </a>
        <style>
            body {
                background-color: green background-image: url('link');
                background-repeat: no-repeat;
                background-attachment: fixed;
                background-size: cover;
            }
        </style>
        <style>
            .container {
                width: 1000px;
                height: auto;
                max-height: 100%;
                border: 5px solid transparent;
                border-radius: 8px;
                padding: 5px;
                float: left;
                background: url("https://cdn.pixabay.com/photo/2020/02/07/19/05/spaceship-4828098_1280.jpg") no-repeat fixed;
                background-size: cover;
                background-clip: padding-box;
                margin: 5px;
            }
        </style>
        <style>
            .smallcontainer {
                width: 200px;
                height: auto;
                max-height: 100%;
                float: left;
                background-color: transparent;
                background-clip: padding-box;
            }
        </style>
        <style>
            .bigcontainer {
                width: 800px;
                height: auto;
                max-height: 100%;
                float: left;
                background-color: transparent;
                background-clip: padding-box;
            }
        </style>
        <style>
            .sidebar {
                width: 150px;
                height: auto;
                max-height: 100%;
                border: 3px solid white;
                border-radius: 8px;
                padding: 5px;
                float: left;
                overflow: auto;
                line-height: 100%;
                background-color: white;
                background-clip: padding-box;
                text-align: center;
                color: black;
                margin: 5px 2.5px 5px 5px;
                font-family: 'OD';
                background-color: rgba(31, 31, 31, 0.5);
                background-image: url('link');
                background-repeat: no-repeat;
                background-attachment: fixed;
                background-size: cover;
            }
        </style>
        <style>
            .sidebarr {
                width: 150px;
                height: auto;
                max-height: 100%;
                border: 5px solid black;
                border-radius: 8px;
                padding: 5px;
                float: right;
                overflow: auto;
                line-height: 100%;
                background-color: white;
                background-clip: padding-box;
                text-align: center;
                color: black;
                margin: 5px 2.5px 5px 5px;
                font-family: 'OD';
                background-image: url('link');
                background-repeat: no-repeat;
                background-attachment: fixed;
                background-size: cover;
            }
        </style>
        <style>
            .hi {
                float: right;
                overflow: auto;
            }
        </style>
        <style>
            .main {
                width: 700px;
                height: auto;
                max-height: 100%;
                border: 5px solid black;
                border-radius: 8px;
                padding: 5px;
                line-height: 100%;
                float: left;
                background-color: white;
                text-align: center;
                color: black;
                overflow: auto;
                margin: 5px 5px 5px 2.5px;
                font-family: 'OD';
                background-image: url('link');
                background-repeat: no-repeat;
                background-attachment: fixed;
                background-size: cover;
            }

            @font-face {
                font-family: Name;
                src: url(link);
            }

            @font-face {
                font-family: Name;
                src: url(link);
                font-weight: bold;
            }

            a:link {
                color: blue;
                background-color: transparent;
                text-decoration: none;
            }

            a:visited {
                color: purple;
                background-color: transparent;
                text-decoration: none;
            }

            a:hover {
                color: purple;
                background-color: transparent;
                text-decoration: underline;
            }

            a:active {
                color: purple;
                background-color: transparent;
                text-decoration: underline;
            }
        </style>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Site Title</title>
        <div class="container">
            <div class="hi">
                <img src="http://www.gigaglitters.com/created/jUWfkFIrUB.gif" />
                <div class="smallcontainer">
                    <div class="sidebar">
                        <h3>HEADER</h3>
                        <p>
                            <a href="link">Link</a>
                        </p>
                        <p>Text</p>
                    </div>
                    <div class="sidebar">
                        <p>Text</p>
                    </div>
                    <div class="sidebar">
                        <testarea rows="5" cols="15">You can use a box like this to make code visible and copyable! The rows and cols let you change its size. Mess around and find a size you like.</testarea>
                    </div>
                    <div class="sidebar">
                        <img src="https://blinkies.cafe/b/display/0150-alligator.gif">
                        <img>
                        <p>I left a blinkie here so you can see how they are embedded.</p>
                    </div>
                </div>
                <div class="bigcontainer">
                    <div class="main">
                        <img src="image" alt="Placeholder image, describe images with alt text like this. If the link is broken as it is here, the alt text displays instead of the image." width="250" height="300" style="float:left">
                        <h2>Header</h2>
                        <p>Text goes here. The box will scale with your text and image. Wow!</p>
                    </div>
                    <div class="main">
                        <p>You can have as many of these boxes as you want. They'll be nested inside your "Big Container" div if you keep the code like this, but if you take them out of that div, they'll arrange themselves instead of being constrained by the box. "Container," "Small Container" and "Big Container" divs can all have background colors and borders assigned to them if you want, but in this version of the code, they are transparent. </p>
                        <p>To change the colors of various elements, you can replace the "white" and "black" color tags with other color names or with hex codes. To add a background image, replace "link" in the background image code with an actual link. To change your font, upload a font file to Neocities and set it as the src link for the font. You can name the font family whatever you want then. Alternately, you can remove the src link and use the name of a web font (you can look up the names of these).</p>
                        <p>I left my custom cursor code in here at the top. In order to get rid of the custom cursor, just delete that section of code. In order to replace it with a different custom cursor, go to Cursors-4U and copy the code for your desired custom cursor, then replace it. Cursor animation doesn't work outside Internet Explorer as far as I can tell, so pick one that looks fine not animated.
                        <p>
                        <p>You can make more styles of div if you like - as many as you want! This is good if you want lots of different elements on your page, but it can gum up your code somewhat.</p>
                        <p align="left">To make text align left, put in an alignment tag like this. This can also be changed in the div styles, if you want your whole div's text aligned left.</p>
                        <div class="sidebar" style="height:200px">
                            <p>You can also put smaller divs inside bigger divs like this. This is how I do the character boxes on my characters page - they are all sidebar divs with links and images in them. </p>
                        </div>
                        <div class="sidebar" style="height:200px">
                            <p>If you put in more than one, they'll sit next to each other until they run out of room, at which point they'll start going vertically.</p>
                        </div>
                        <div class="sidebar" style="height:200px">
                            <p>To make them stay the same height, you can add a height code in as seen here. See how some of these have a scroll bar? That's because it reached its max height. If max height is a number, this can happen. If max height is set to "auto," the divs will just stretch with content.</p>
                        </div>
                    </div>
                </div>
            </div>
            </body>
</html>
{/* another layout  */}
      <div className="mx-auto mt-12 max-w-6xl space-y-12 sm:mt-16 sm:space-y-20 lg:mt-20 lg:space-y-24 xl:space-y-32">
        <div className="grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2 lg:items-center xl:gap-x-16">
          <div>
            <CustomImage
              src="/oneHour/customdomain1.jpg"
              sizes="(max-width: 479px) 100vw, (max-width: 767px) 74vw, (max-width: 991px) 55vw, (max-width: 1279px) 96vw, (max-width: 1439px) 82vw, (max-width: 1919px) 1186px, 1346px"
            />
          </div>
          <div className="flex flex-col items-start justify-start lg:self-center">
            <div className="inline-flex h-14 w-14 items-center justify-center rounded-xl border border-paleAqua bg-paleAqua/20">
              <Globe width={24} height={24} className="text-[#00838d]" />
            </div>
            <Title title="Your Name. Your Domain. Your Personal Brand." />
            <Subtitle
              text=" Set up your custom domain in a few simple steps and make your
                portfolio truly yours."
            />
          </div>
        </div>

        {/* second feature  */}
        <div className="grid grid-cols-1 gap-x-12 gap-y-8 lg:grid-cols-2 lg:items-center xl:gap-x-16">
          <div className="lg:order-2">
            <CustomImage
              src="/oneHour/blog.jpg"
              sizes="(max-width: 479px) 100vw, (max-width: 767px) 74vw, (max-width: 991px) 55vw, (max-width: 1279px) 96vw, (max-width: 1439px) 82vw, (max-width: 1919px) 1186px, 1346px"
            />
          </div>
          <div className="flex flex-col items-start justify-start lg:order-1 lg:self-center">
            <div className="inline-flex h-14 w-14 items-center justify-center rounded-xl border border-paleAqua bg-paleAqua/20">
              <Globe width={24} height={24} className="text-[#00838d]" />
            </div>
            <Title title="Launch Your Blog with Ease" />
            <Subtitle text="  Create, and publish posts effortlessly—all within Notion." />
          </div>
        </div>
      </div>















const CustomImage = ({
  src,
  className,
  sizes,
}: {
  src: string;
  className?: string;
  sizes?: string;
}) => {
  return (
    <img
      src={src}
      className={twMerge(
        "h-full w-full rounded-2xl border border-paleAqua object-cover shadow-xl shadow-paleAqua/20",
        className,
      )}
      alt=""
    />
  );
};

const Title = ({ title, className }: { title: string; className?: string }) => {
  return (
    <h3
      className={twMerge(
        "mt-4 text-start text-2xl font-bold text-midnightBlue sm:text-3xl",
        className,
      )}
    >
      {title}
    </h3>
  );
};

const Subtitle = ({
  text,
  className,
}: {
  text: string;
  className?: string;
}) => {
  return (
    <h4
      className={twMerge(
        "mt-2 text-start text-base font-normal text-slateGray lg:text-lg",
        className,
      )}
    >
      {text}
    </h4>
  );
};
public class WhileLoopExample {
    public static void main(String[] args) {
        double n = 20;
        
        double guess = n / 2;
        while (guess * guess < n - 0.0001 || guess * guess > n + 0.0001) {
            guess = (n / guess + guess) / 2;
            System.out.println(guess + " squared is " + guess * guess
                    + " and n / guess is "
                    + n / guess);
        }
    }
}
star

Mon Sep 23 2024 14:11:30 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/5b145a

@GeraldStar

star

Mon Sep 23 2024 14:08:52 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 13:01:18 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 13:01:11 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 13:01:05 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 13:00:47 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 13:00:25 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 12:02:06 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 12:01:58 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/145a5b

@GeraldStar

star

Mon Sep 23 2024 12:01:27 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/0f3746

@GeraldStar

star

Mon Sep 23 2024 12:01:04 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/2e460f

@GeraldStar

star

Mon Sep 23 2024 12:00:52 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/29460f

@GeraldStar

star

Mon Sep 23 2024 12:00:31 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/460f37

@GeraldStar

star

Mon Sep 23 2024 12:00:14 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/0f3746

@GeraldStar

star

Mon Sep 23 2024 12:00:00 GMT+0000 (Coordinated Universal Time) https://www.colorhexa.com/0f3746

@GeraldStar

star

Mon Sep 23 2024 11:53:12 GMT+0000 (Coordinated Universal Time)

@usman13

star

Mon Sep 23 2024 08:27:20 GMT+0000 (Coordinated Universal Time) https://mikeyarce.com/2018/04/how-to-override-woocommerce-image-sizes/

@bounty31 #woocommerce #wordpress

star

Mon Sep 23 2024 08:27:05 GMT+0000 (Coordinated Universal Time)

@mateusz021202

star

Mon Sep 23 2024 08:26:58 GMT+0000 (Coordinated Universal Time) https://mikeyarce.com/2018/04/how-to-override-woocommerce-image-sizes/

@bounty31 #woocommerce #wordpress

star

Mon Sep 23 2024 08:26:38 GMT+0000 (Coordinated Universal Time) https://mikeyarce.com/2018/04/how-to-override-woocommerce-image-sizes/

@bounty31 #woocommerce #wordpress

star

Mon Sep 23 2024 08:21:40 GMT+0000 (Coordinated Universal Time)

@StephenThevar #nodejs

star

Mon Sep 23 2024 07:33:06 GMT+0000 (Coordinated Universal Time)

@shees

star

Mon Sep 23 2024 07:23:26 GMT+0000 (Coordinated Universal Time) https://codepen.io/MrAaronCasanova/pen/XEaMmN

@froiden ##css #html

star

Mon Sep 23 2024 04:22:31 GMT+0000 (Coordinated Universal Time)

@omnixima #php

star

Mon Sep 23 2024 04:05:05 GMT+0000 (Coordinated Universal Time)

@hkrishn4a

star

Mon Sep 23 2024 01:03:54 GMT+0000 (Coordinated Universal Time) https://www.instagram.com/accounts/disabled/?next

@curtisbarry

star

Sun Sep 22 2024 21:36:34 GMT+0000 (Coordinated Universal Time)

@marcopinero #css

star

Sun Sep 22 2024 11:50:13 GMT+0000 (Coordinated Universal Time) https://github.com/valleyofdoom/PC-Tuning

@Curable1600 #windows

star

Sun Sep 22 2024 09:55:52 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:50:21 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:48:19 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:45:43 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:35:01 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:35:01 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:32:45 GMT+0000 (Coordinated Universal Time) https://techcommunity.microsoft.com/t5/windows-11/quot-show-all-icons-in-system-tray-quot-option-in-windows11/m-p/3359877

@Curable1600 #windows

star

Sun Sep 22 2024 09:24:10 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:19:30 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:10:40 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 09:05:50 GMT+0000 (Coordinated Universal Time)

@CodeXboss

star

Sun Sep 22 2024 07:18:54 GMT+0000 (Coordinated Universal Time)

@krishantpandey1

star

Sun Sep 22 2024 06:58:39 GMT+0000 (Coordinated Universal Time)

@StephenThevar #nodejs

star

Sun Sep 22 2024 06:53:43 GMT+0000 (Coordinated Universal Time) https://www.thiscodeworks.com/extension/initializing?newuser

@romator

star

Sun Sep 22 2024 06:46:22 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip

@iwok #bash #python #pip #update

star

Sun Sep 22 2024 06:21:26 GMT+0000 (Coordinated Universal Time)

@krishantpandey1

star

Sat Sep 21 2024 19:41:22 GMT+0000 (Coordinated Universal Time) https://vuejs.org/guide/quick-start.html

@emilycoordoba #vue.js

star

Sat Sep 21 2024 18:00:03 GMT+0000 (Coordinated Universal Time)

@sunnywhateverr

star

Sat Sep 21 2024 16:04:46 GMT+0000 (Coordinated Universal Time)

@asha #react

star

Sat Sep 21 2024 15:03:10 GMT+0000 (Coordinated Universal Time)

@arutonee

Save snippets that work with our extensions

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