/**
* @param {number} low
* @param {number} high
* @return {number}
*/
var countOdds = function(low, high) {
// Step 1: Think about what we want:
// We need to count how many odd numbers exist between low and high (inclusive).
// Step 2: Use math instead of looping:
// Formula: floor((high + 1) / 2) - floor(low / 2)
// Why? Because:
// - floor(x / 2) gives the count of even numbers up to x.
// - floor((x + 1) / 2) gives the count of odd numbers up to x.
// Suimport os
import sys
import subprocess
import random
import time
import getpass
import json
# Paketprüfung
required_packages = ["googlemaps", "tqdm"]
for package in required_packages:
try:
__import__(package)
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
import googlemaps
from tqdm import tqdm
# Funktion: Benutzername erkennen und Pfad anpassen
def get_key_path(file_name):
possible_users = ["Bernha# SYNOLOGY TIPS & TRICKS #
#### P4V:
Install P4V on synology NAS: [Link to Repo](https://github.com/FrozenStormInteractive/Perforce-Synology)
#### ENABLE SHR ( Synology Hybrid Raid )
-> Check the other snippet ( synology tag )
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5.QtGui import QIcon
class NameYourWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Window Title")
self.show()
if __name__ == '__main__':
app = QApplication([])
app.setApplicationName("Your App Name")
app.setOrganizationName("Your Organization Name")
app.setApplicationVersion("0.1.0")
controller = NameYourWindow()
app.exec()/**
* Count the number of ways to partition nums into contiguous segments
* such that in each segment, max - min <= k.
*
* @param {number[]} nums - Input array of integers
* @param {number} k - Maximum allowed difference between max and min in a segment
* @return {number} - Number of valid partitions modulo 1e9+7
*/
var countPartitions = function (nums, k) {
const MOD = 1e9 + 7;
const n = nums.length;
// dp[i] = number of ways to partition the first i elements (nums[0..i-1])/**
* Count the number of ways to partition nums into contiguous segments
* such that in each segment, max - min <= k.
*
* @param {number[]} nums - Input array of integers
* @param {number} k - Maximum allowed difference between max and min in a segment
* @return {number} - Number of valid partitions modulo 1e9+7
*/
var countPartitions = function (nums, k) {
const MOD = 1e9 + 7;
const n = nums.length;
// dp[i] = number of ways to partition the first i elements (nums[0..i-1])# ------------------------------------------------------------
# Automatischer Paketimport & -Installation
# ------------------------------------------------------------
import sys
import subprocess
import importlib
import importlib.util
def ensure_package(pkg_name, import_name=None):
"""
Stellt sicher, dass ein Paket installiert und importierbar ist.
Falls nicht installiert, wird es automatisch via pip installiert.
"""
name_to_check = import_name or pkg_name
Lazarus Group (North Korea)
Selling 100% Good Cvv CC Fullz Dumps ATM Track 1/2 + Pin SMTP /WU/Transfer CashApp Venmo Apple Pay PayPal Zelle Skrill Bank logins-----
U.P.D.A.T.E CVV 2025 Sell CVV Good info And High Balance
(Cvv CC Fullz Credit Cards Dumps ATM Track 1/2 + Pin SMTP /WU/Transfer)
Buy Valid Cvv CC Dumps Track 1/2 CC SSN DOB Track-1/2-FULLZ-Transfer/Western union
[Please contact me]
--------------------------------------------
- telegram : @JeansonTooL
- telegramhttps://www.sitepoint.com/javascript-design-patterns-observer-pattern//**
* @param {number[]} nums
* @return {number}
*/
var countPartitions = function(nums) {
// Step 1: Compute the total sum of the array.
// We'll use this to quickly calculate the right subarray sum at each partition.
let totalSum = 0;
for (let num of nums) {
totalSum += num;
}
// Step 2: Initialize variables
let leftSum = 0; // running sum of the left subarray
let count = 0; // number of valid partitions
// Step 3: Iterate through// public/b2bData.js
export const TAX_RATE = 0.10;
export const WEIGHT_FALLBACK = 0.35;
export const COUNTRIES = [
{ name: 'Österreich', code: 'AT' },
{ name: 'Belgien', code: 'BE' },
{ name: 'Deutschland', code: 'DE' },
{ name: 'Frankreich', code: 'FR' },
{ name: 'Italien', code: 'IT' },
{ name: 'Schweiz', code: 'CH' },
// ... nach Bedarf ergänzen
];
export const SHIPPING_RULES = {
AT: (n) => (n < 100 ? 3.90 : (n < 250 ? 3.00 : 0.00)),
DE: (n) => (n < 100 ? 6// backend/b2bOrders.web.js
import { orders, currentCart } from 'wix-ecom-backend';
import { Permissions, webMethod } from "wix-web-module";
import { elevate } from 'wix-auth';
import { cart } from 'wix-ecom-backend';
import wixData from 'wix-data';
export const deleteCartFunction = webMethod(Permissions.Anyone, async () => {
try {
const selectedCart = await currentCart.getCurrentCart();
await cart.deleteCart(selectedCart._id);
console.log('Success! Delete// backend/b2bDataBackend.web.js
import { webMethod, Permissions } from 'wix-web-module';
import { currentMember } from 'wix-members-backend';
/**
* EXAKT deine Members-Importlogik (Adresse IMMER Index [1])
*/
export const getMemberCheckoutProfile = webMethod(Permissions.Anyone, async () => {
try {
const m = await currentMember.getMember({ fieldsets: ['FULL'] });
if (!m?._id) return { ok: false, reason: 'not_logged_in' };
console.log("Current Member"// backend/b2bCheckout.web.js
import { webMethod, Permissions } from 'wix-web-module';
import { checkout, orders, currentCart } from 'wix-ecom-backend';
// Fixe App-ID von Wix Stores (Katalog-Referenzen)
const WIX_STORES_APP_ID = '215238eb-22a5-4a82-9f40-17bc5497c90d';
/**
* Checkout aus dem aktuellen Warenkorb erstellen.
* - Übergibt zwingend lineItems
* - Setzt channelType korrekt
* - Liefert URL /b2b-checkout?cartId=...&checkoutId=...
*/
export const createB2BCheckoutFromC// backend/b2bCart.web.js
import { Permissions, webMethod } from 'wix-web-module';
import { currentCart } from 'wix-ecom-backend';
import { currentMember } from 'wix-members-backend';
import wixData from 'wix-data';
/** Billing/Shipping-Adresse aus Members (Index [1]) */
export const pickAddress = webMethod(Permissions.SiteMember, async () => {
try {
const m = await currentMember.getMember({ fieldsets: ['FULL'] });
const a = m?.contactDetails?.addresses;
i// // pages/b2b-checkout.js
import wixLocation from 'wix-location';
//import getSymbolFromCurrency from 'currency-symbol-map';
import { authentication } from 'wix-members-frontend';
import { TAX_RATE, WEIGHT_FALLBACK, SHIPPING_RULES, COUNTRIES } from 'public/b2bData.js';
import { getMemberCheckoutProfile } from 'backend/b2bDataBackend.web.js';
import { getCart, getWeightsForCatalogItemIds, getCartTotals, setCartShippingCountry } from 'backend/b2bCart.web.js';
import { createOrderBacke