Snippets Collections
from io import BytesIO
from PIL import Image
from ultralytics import YOLO


def load_model(model_path: str) -> YOLO:
    """Load the YOLO model."""
    return YOLO(model_path)


def process_image(image_bytes: bytes) -> Image:
    """Convert byte stream to PIL image."""
    image = Image.open(BytesIO(image_bytes))
    return image


def save_image(image: Image, output_image_name: str) -> BytesIO:
    """Save the output image to a byte stream and also save it locally."""
    img_byte_arr = BytesIO()
    image.save(img_byte_arr, format="PNG")
    image.save(output_image_name)  # Save the image locally with the given name
    img_byte_arr.seek(0)
    return img_byte_arr


def get_inference_results(model: YOLO, image: Image) -> Image:
    """Run the YOLO model on the image and return the result as a PIL image."""
    results = model(image)
    output_array = results[0].plot()  # This gives a NumPy array
    output_image = Image.fromarray(output_array)
    return output_image
import numpy as np
import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report

iris = datasets.load_iris()
X = iris.data
y = iris.target

Xtrain, Xtest, ytrain, ytest = train_test_split(X, y, test_size=0.3, random_state=42)

model = GaussianNB()

model.fit(Xtrain, ytrain)

predictions = model.predict(Xtest)

accuracy = accuracy_score(y_test, predictions)
confusion = confusion_matrix(y_test, predictions)
report = classification_report(y_test, predictions)

print("Naive Bayes Performance Metrics:")
print("Accuracy:", accuracy)
print("Confusion Matrix:\n", confusion)
print("Classification Report:\n", report)
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn.cluster import KMeans
from sklearn.metrics import silhouette_score, davies_bouldin_score
from sklearn.metrics import confusion_matrix, classification_report
from sklearn.preprocessing import LabelEncoder

# Create a synthetic dataset
X, y_true = datasets.make_blobs(n_samples=300, centers=3, cluster_std=0.60, random_state=0)

# Fit the K-Means algorithm
kmeans = KMeans(n_clusters=3, random_state=0)
y_kmeans = kmeans.fit_predict(X)

# Performance Metrics
silhouette_avg = silhouette_score(X, y_kmeans)
davies_bouldin = davies_bouldin_score(X, y_kmeans)
print("Silhouette Score: ", silhouette_avg)
print("Davies-Bouldin Score: ", davies_bouldin)

# Confusion Matrix and Classification Report (if true labels are available)
# Relabel the clusters to match the true labels
def relabel_clusters(y_true, y_pred):
    label_encoder = LabelEncoder()
    y_true_encoded = label_encoder.fit_transform(y_true)
    cm = confusion_matrix(y_true_encoded, y_pred)
    return np.argmax(cm, axis=1)

relabel_map = relabel_clusters(y_true, y_kmeans)
y_kmeans_mapped = np.array([relabel_map[label] for label in y_kmeans])

# Display confusion matrix and classification report
print("Confusion Matrix:\n", confusion_matrix(y_true, y_kmeans_mapped))
print("Classification Report:\n", classification_report(y_true, y_kmeans_mapped))

# Visualization of the clusters
plt.scatter(X[:, 0], X[:, 1], c=y_kmeans, s=50, cmap='viridis')
centers = kmeans.cluster_centers_
plt.scatter(centers[:, 0], centers[:, 1], c='red', s=200, alpha=0.75, marker='X')
plt.title('K-Means Clustering')
plt.xlabel('Feature 1')
plt.ylabel('Feature 2')
plt.show()
import numpy as np
import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report

iris = datasets.load_iris()
X = iris.data
y = iris.target

Xtrain, Xtest, ytrain, ytest = train_test_split(X, y, test_size=0.3, random_state=42)

model = DecisionTreeClassifier()
model.fit(Xtrain, ytrain)

predictions = model.predict(Xtest)

accuracy = accuracy_score(y_test, predictions)
confusion = confusion_matrix(y_test, predictions)
report = classification_report(y_test, predictions)

print("Decision Tree Performance Metrics:")
print("Accuracy:", accuracy)
print("Confusion Matrix:\n", confusion)
print("Classification Report:\n", report)
class Graph:
    def __init__(self):
        self.graph = {}

    def add_edge(self, u, v):
        if u not in self.graph:
            self.graph[u] = []
        self.graph[u].append(v)

    def get_neighbors(self, u):
        return self.graph.get(u, [])

def dfs(graph, start, visited=None):
    if visited is None:
        visited = set()
    visited.add(start)
    print(start, end=' ')

    for neighbor in graph.get_neighbors(start):
        if neighbor not in visited:
            dfs(graph, neighbor, visited)

from collections import deque

def bfs(graph, start):
    visited = set()
    queue = deque([start])
    visited.add(start)

    while queue:
        node = queue.popleft()
        print(node, end=' ')

        for neighbor in graph.get_neighbors(node):
            if neighbor not in visited:
                visited.add(neighbor)
                queue.append(neighbor)

# Example usage
g = Graph()
g.add_edge(1, 2)
g.add_edge(1, 3)
g.add_edge(2, 4)
g.add_edge(2, 5)
g.add_edge(3, 6)
g.add_edge(3, 7)

print("DFS Traversal:")
dfs(g, 1)  # Start from node 1
print("\nBFS Traversal:")
bfs(g, 1)  # Start from node 1
import numpy as np
import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report, mean_squared_error, r2_score

iris = datasets.load_iris()
X = iris.data
y = iris.target

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

model = KNeighborsClassifier()
model.fit(X_train, y_train)

predictions = model.predict(X_test)

accuracy = accuracy_score(y_test, predictions)
confusion = confusion_matrix(y_test, predictions)
report = classification_report(y_test, predictions)

print("KNN Classification Performance Metrics:")
print("Accuracy:", accuracy)
print("Confusion Matrix:\n", confusion)
print("Classification Report:\n", report)

housing = datasets.fetch_california_housing()
X = housing.data
y = housing.target

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

model = KNeighborsRegressor()
model.fit(X_train, y_train)

predictions = model.predict(X_test)

mse = mean_squared_error(y_test, predictions)
r2 = r2_score(y_test, predictions)

print("\nKNN Regression Performance Metrics:")
print("Mean Squared Error:", mse)
print("R^2 Score:", r2)
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":mirror_ball: Boost Days - What's On This Week :mirror_ball:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n Happy New Year Melbourne! We've missed you. \n\n Let's kick off the first week back with our awesome Boost Day activations!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Xero Café :coffee:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :new-thing: *This week we are offering:* \n\n Cafe Sweet Treats:cupcake: \n\n *Weekly Café Special:* _Iced Hazelnut Latte_"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " Wednesday, 8th January :calendar-date-8:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n :souvlaki: *Light Lunch*: From *12pm* - this weeks lunch will be Souvlaki's!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Thursday, 9th January :calendar-date-9:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am - 10:30am* in the Wominjeka Breakout Space."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned for more fun throughout the year. Happy 2025! :party-wx:"
			}
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " :mirror_ball::star: Boost Days - What's on this week! :star::mirror_ball:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Happy New Year Auckland! We have missed you. \n\n Let's make this a great week back with our Boost Days in full action! See below for what's in store:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-7: Tuesday, 7th January",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Xero Café*: Café-style beverages and sweet treats\n:white-chocolate-matcha: *Barista Special*: White Chocolate Matcha \n:pancakes: *Breakfast*: Provided by *Sticky Fingers* from *8:30am - 10:30am* \n "
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-9: Thursday, 9th January",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Xero Café*: Café-style beverages and sweet treats \n:white-chocolate-matcha: *Barista Special*: White Chocolate Matcha  \n :sandwich: *Light Lunch*: Provided by *Sticky Fingers* from *12pm - 1pm*"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=eGVyby5jb21fMXM4M3NiZzc1dnY0aThpY2FiZDZvZ2xncW9AZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ|*Auckland Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX :wx:"
			}
		}
	]
}
class Jeu:
    def __init__(self, N):
        self.damier = [[0 for _ in range(N)] for _ in range(N)]  
        self.N = N  
        
        self.damier[N // 2 - 1][N // 2 - 1] = 1
        self.damier[N // 2 - 1][N // 2] = 2
        self.damier[N // 2][N // 2 - 1] = 2
        self.damier[N // 2][N // 2] = 1

    def afficher(self):
        """Affiche le damier avec des bordures."""
        N = self.N
        t = self.damier
        
        print("*" * (N + 4))  
        print("*" * (N + 4))
        
        for i in range(N):
            print("**", end="")  
            for j in range(N):
                if t[i][j] == 0:
                    print(".", end="")  
                elif t[i][j] == 1:
                    print("X", end="")  
                elif t[i][j] == 2:
                    print("O", end="")  
            print("**")  
        
        print("*" * (N + 4))  
        print("*" * (N + 4))

    def jouer(self):
        """Permet aux joueurs de jouer à tour de rôle."""
        while True:
            
            while True:
                try:
                    joueur = int(input("Qui joue ? (1 ou 2) : "))
                    if joueur in [1, 2]:
                        break
                    else:
                        print("Veuillez choisir 1 ou 2 uniquement.")
                except ValueError:
                    print("Entrée invalide. Entrez un nombre (1 ou 2).")

           
            while True:
                try:
                    ligne = int(input(f"Donnez le numéro de ligne (1 à {self.N}) : "))
                    colonne = int(input(f"Donnez le numéro de colonne (1 à {self.N}) : "))
                    
                    if 1 <= ligne <= self.N and 1 <= colonne <= self.N:
                        if self.damier[ligne - 1][colonne - 1] == 0:  
                            break
                        else:
                            print("La case est déjà occupée. Choisissez une autre.")
                    else:
                        print(f"Les coordonnées doivent être entre 1 et {self.N}.")
                except ValueError:
                    print("Entrée invalide. Entrez un nombre.")

            
            self.damier[ligne - 1][colonne - 1] = joueur

            
            self.afficher()

            
            quitter = input("Voulez-vous continuer ? (o/n) : ").lower()
            if quitter == "n":
                print("Fin de la partie. Merci d'avoir joué !")
                break



j = Jeu(6)
j.afficher()  
j.jouer()  
class jeu:
    def __init__(self):
        self.plateau=[[0 for i in range(7)]for i in range(6)]

    def afficher(self):
        for i in range(6):
            for j in range(7):
                if self.plateau[i][j]==0:
                    print("| ",end="")
                if self.plateau[i][j]==1:
                    print("|X",end="")
                if self.plateau[i][j]==2:
                    print("|O",end="")
            print()
        print(" - - - - - - -")
        print(" 1 2 3 4 5 6")
    
    def combiendanscolonne(self,k):
        s=0
        for i in range (6):
           if self.plateau[5-i][k-1]!=0:
               s=s+1
        return (s)
    
    def empiler(self,k,c):
        n=self.combiendanscolonne(k)
        if n<6:
            self.plateau[5-n][k-1]=c
            
    def test_ligne(self):
        L=self.plateau
        for i in range (6):
            for j in range (4):
                if L[i][j]==L[i][j+1]==L[i][j+2]==L[i][j+3]!=0:
                    return L[i][j]
        
    def test_colone(self):
        L = self.plateau
        for i in range(3):
            for j in range(7):
                if L[i][j] == L[i + 1][j] == L[i + 2][j] == L[i + 3][j] != 0:
                    return L[i][j]   
    
    def test_diagonale(self):
        L = self.plateau
        
        for i in range(3):  
            for j in range(4):  
                if L[i][j] == L[i + 1][j + 1] == L[i + 2][j + 2] == L[i + 3][j + 3] != 0:
                    return L[i][j]  
        
        for i in range(3, 6):  
            for j in range(4):  
                if L[i][j] == L[i - 1][j + 1] == L[i - 2][j + 2] == L[i - 3][j + 3] != 0:
                    return L[i][j]  


def rejouer():
    while True:
        reponse = input("Voulez-vous rejouer ? (O/N) : ").strip().lower()
        if reponse == 'o':
            return True
        elif reponse == 'n':
            return False
        else:
            print("Réponse invalide. Veuillez répondre par O ou N.")

def game():
    Monjeu = jeu()
    current_player = 1  
    while True:
        while True:
            k1 = int(input("joueur 1 donner la colone :"))
            if (1 <= k1 <= 7) and Monjeu.combiendanscolonne(k1) < 6:  
                Monjeu.empiler(k1, c=1)
                break
            else:
                print("non")
        
        Monjeu.afficher()
        if Monjeu.test_ligne() == 1 or Monjeu.test_colone() == 1 or Monjeu.test_diagonale() == 1:
            print("joueur 1 a gagné")
            break
            
        while True:
            k2 = int(input("joueur 2 donner la colone :"))
            if (1 <= k2 <= 7) and Monjeu.combiendanscolonne(k2) < 6:  
                Monjeu.empiler(k2, c=2)
                break
            else:
                print("non")
        
        Monjeu.afficher()
        if Monjeu.test_ligne() == 2 or Monjeu.test_colone() == 2 or Monjeu.test_diagonale() == 2:
            print("joueur 2 a gagné")
            break

    
    if rejouer():
        game()  
    else:
        print("Merci d'avoir joué !")  


game()
Let me explain the permission hierarchy in Salesforce when it comes to field-level security (FLS):

When both Profile and Permission Set have different levels of field access:
1. The most permissive setting wins
2. Permissions are additive, not restrictive

So in your scenario:
- If you give READ access in the Profile
- But NO access in the Permission Set
- The user will still have READ access to the field

This is because:
- Permission Sets are designed to grant additional access, not restrict it
- They can't be used to revoke permissions that are already granted at the Profile level
- The user will retain the READ access from their base Profile, regardless of the Permission Set settings

To completely restrict access to the field:
- You would need to remove access at both Profile AND Permission Set levels
- Or remove access at the Profile level, since that's the base level of access

Best Practice:
- Keep minimal permissions in the base Profile
- Use Permission Sets to grant additional access when needed
- Don't rely on Permission Sets to restrict access that's already granted in the Profile
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command `"$url = (Invoke-WebRequest -Uri 'https://www.python.org/downloads/windows/').Content | Select-String -Pattern 'https://www.python.org/ftp/python/\d+\.\d+\.\d+/python-\d+\.\d+\.\d+-amd64\.exe' -AllMatches | % { `$_.Matches[0].Value }; $path = `$env:USERPROFILE\Downloads\ + (`$url -split '/')[-1]; Invoke-WebRequest -Uri `$url -OutFile $path; if ((Read-Host 'Install? (Y/N)') -ieq 'y') { Start-Process -FilePath $path -Wait }`"" -Verb RunAs } else { $url = (Invoke-WebRequest -Uri 'https://www.python.org/downloads/windows/').Content | Select-String -Pattern 'https://www.python.org/ftp/python/\d+\.\d+\.\d+/python-\d+\.\d+\.\d+-amd64\.exe' -AllMatches | % { $_.Matches[0].Value }; $path = "$env:USERPROFILE\Downloads\" + ($url -split '/')[-1]; Invoke-WebRequest -Uri $url -OutFile $path; if ((Read-Host "Install? (Y/N)") -ieq 'y') { Start-Process -FilePath $path -Wait }}
ERROR: Please disable the open_basedir setting to continue.
#include <iostream>
using namespace std;
int main() {
        int a;
        cout << "enter a number: ";
        cin >> a;
         cout << "Last digit: " << a%10;
        for (a; a >= 10; a /= 10) {
            
        }
        cout << "\nFirst digit: " << a;
        
    return 0;
}
\\html
<div class="filter price-filter">
  <h2 class="filter-title" class="filter-title">FILTER BY PRICE</h2>
  <div id="slider-range"></div>
  <div class="price-display">
    <span class="price-text">Price: <span id="amount1">$0</span> — <span id="amount2">$8,200</span></span>
  <button class="filter-button">FILTER</button>
  </div>
</div>

\\css
.price-filter {
    max-width: 400px;
    padding: 20px;
    font-family: Arial, sans-serif;
}

#slider-range {
    margin-bottom: 25px;
}

.ui-slider-horizontal {
    height: 4px;
    background: #e0e0e0;
    border: none;
}

.ui-slider .ui-slider-handle {
    width: 4px;
    height: 16px;
    background: #82b440;
    top: -7px;
    cursor: pointer;
    border-radius: 0;
}

.ui-slider .ui-slider-range {
    background: #82b440;
}

.ui-slider-horizontal .ui-slider-handle{
    margin-left: -1px;
}

.ui-widget.ui-widget-content{
    border: none;
}

.ui-slider-horizontal{
    height: 2px;
}

\\cdn jquery ui
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/base/jquery-ui.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js"></script>

\\ jquery
$(document).ready(function() {
  $("#slider-range").slider({
    range: true,
    min: 0,
    max: 8200,
    values: [0, 8200],
    slide: function(event, ui) {
      $("#amount1").text(ui.values[0].toLocaleString());
      $("#amount2").text(ui.values[1].toLocaleString());
    }
  });

  $(".filter-button").click(function() {
    var minValue = $("#slider-range").slider("values", 0);
    var maxValue = $("#slider-range").slider("values", 1);
  });
});
const PomView = () => {
  const [timer, setTimer] = useState(1500); // 25 minutes
  const [start, setStart] = useState(false);
  const firstStart = useRef(true);
  const tick = useRef(); // <-- React ref

  useEffect(() => {
    if (firstStart.current) {
      firstStart.current = !firstStart.current;
      return;
    }

    if (start) {
      tick.current = setInterval(() => {
        setTimer((timer) => timer - 1);
      }, 1000);
    } else {
      clearInterval(tick.current);
    }

    return () => clearInterval(tick.current);
  }, [start]);
};
<script>

 /* Esperar a cargar todos los scripts */ 
  if (document.readyState == 'complete') {
    startAuditsCarousel();
  } else {
      document.onreadystatechange = function () {
          if (document.readyState === "complete") {
            startAuditsCarousel();
          }
      }
  }

function startAuditsCarousel() {
    
    const audits_carosuel = document.querySelector ('#audits_carousel .swiper');
   
    setTimeout(function(){
        audits_carosuel.swiper.autoplay.start();
        audits_carosuel.swiper.touchEventsData.focusableElements = "input, select, option, textarea, button, video, label, p, .elementor-heading-title"
    },10);
    
    audits_carosuel.addEventListener("mouseover", function(){
        // console.log("over");
        audits_carosuel.swiper.autoplay.stop()
    });
    
    audits_carosuel.addEventListener("mouseleave", function(){
        // console.log("mouseleave");
        audits_carosuel.swiper.autoplay.start()
    });
    
  
    // ['mousedown', 'touchstart', 'pointerdown'].forEach(function (event) {
    //     audits_carosuel.addEventListener(event, function (e) {
    //         console.log(event);
    //         e.stopPropagation();
    //     }, { passive: true });
    // });

    
};
</script>
// Author : Khadiza Sultana
// Date : 1/4/2025
#include <iostream>
#include <vector>
using namespace std;

int search(vector<int>& nums, int target) {
    int st = 0, end = nums.size() - 1;
    while (st <= end) {
        int mid = st + (end - st) / 2;
        if (nums[mid] == target) {
            return mid;
        }
        if (nums[st] <= nums[mid]) { // Left half is sorted
            if (nums[st] <= target && target <= nums[mid]) {
                end = mid - 1;
            } else {
                st = mid + 1;
            }
        } else { // Right half is sorted
            if (nums[mid] <= target && target <= nums[end]) {
                st = mid + 1;
            } else {
                end = mid - 1;
            }
        }
    }
    return -1;
}

int main() {
    vector<int> nums = {4, 5, 6, 7, 0, 1, 2};
    int target = 0;

    int result = search(nums, target);

    if (result != -1) {
        cout << "Target " << target << " found at index: " << result << endl;
    } else {
        cout << "Target " << target << " not found in the array." << endl;
    }

    return 0;
}
// Author : Khadiza Sultana
// Date : 1/4/2025
#include<iostream>
#include<vector>
using namespace std;

int binarySearch(vector<int>&arr, int tar) { // practical implementation
    int n = arr.size();
    int st = 0, end = n-1;
    while(st <= end) {
        int mid = st + (end-st)/2; // not using (st+end)/2 to avoid integer overflow
        if (tar > arr[mid]) {
            st = mid+1;
        }
        else if (tar < arr[mid]) {
            end = mid-1;
        }
        else {
            return mid;
        }
    }
    return -1;
}

int binarySearch2(vector<int>&arr, int tar, int st, int end) { // recursive implementation
    if (st > end) { // base case
        return -1;
    }
    int mid = st + (end-st)/2;
    if (tar > arr[mid]) {
        binarySearch2(arr, tar, mid+1, end);
    }
    else if (tar < arr[mid]) {
        binarySearch2(arr, tar, st, mid-1);
    }
    else {
        return mid;
    }
}

int main() {
    vector<int>arr1 = {3, 5, 7, 12, 15, 18}; // even no of elements
    int tar1 = 3;
    vector<int>arr2 = {4, 6, 10, 11, 12, 18, 19}; // odd no of elements
    int tar2 = 19;

    cout << "Index at which tar1 is found(even no of elements) : " << binarySearch(arr1, tar1) << endl;
    cout << "Index at which tar2 is found(odd no of elements) : " << binarySearch(arr2, tar2) << endl;
    
    cout << "Using Recusive function index at which tar1 is found : " << binarySearch2(arr1, tar1, 0, 5) << endl;
    cout << "Using Recusive function index at which tar1 is found : " << binarySearch2(arr2, tar2, 0, 6) << endl;

    return 0;
}
// Author : Khadiza Sultana
#include<iostream>
#include<vector>
using namespace std;

int main() {
    int a = 10;
    int* ptr = &a;
    int** parPtr = &ptr;
    cout << ptr << endl;
    cout << parPtr << endl;
    cout << *(&a) << endl;
    cout << *(ptr) << endl;
    cout << *(parPtr) << endl;
    cout << **(parPtr) << endl;
    return 0;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js"></script>
purchTable    = PurchTable::find(this.parmPurchId());

ttsBegin;
// Create PurchParamUpdate table
purchFormLetterParmData = PurchFormletterParmData::newData(
                        DocumentStatus::PackingSlip,
                        VersioningUpdateType::Initial);

purchFormLetterParmData.parmOnlyCreateParmUpdate(true);
purchFormLetterParmData.createData(false);
purchParmUpdate = purchFormLetterParmData.parmParmUpdate();

// Set PurchParmTable table
purchParmTable.clear();
purchParmTable.TransDate                = SystemDateGet();
purchParmTable.Ordering                 = DocumentStatus::PackingSlip;
purchParmTable.ParmJobStatus            = ParmJobStatus::Waiting;
purchParmTable.Num                      = this.parmPackingSlipId();
purchParmTable.PurchId                  = purchTable.PurchId;
purchParmTable.PurchName                = purchTable.PurchName;
purchParmTable.DeliveryName             = purchTable.DeliveryName;
purchParmTable.DeliveryPostalAddress    = purchTable.DeliveryPostalAddress;
purchParmTable.OrderAccount             = purchTable.OrderAccount;
purchParmTable.CurrencyCode             = purchTable.CurrencyCode;
purchParmTable.InvoiceAccount           = purchTable.InvoiceAccount;
purchParmTable.ParmId                   = purchParmUpdate.ParmId;
purchParmTable.insert();

// Set PurchParmLine table
select purchLine
where purchLine.PurchId     == purchTable.purchId &&
      purchLine.LineNumber  == this.parmLineNumber();

purchParmLine.InitFromPurchLine(purchLine);

purchParmLine.ReceiveNow    = this.parmQty();
purchParmLine.ParmId        = purchParmTable.ParmId;
purchParmLine.TableRefId    = purchParmTable.TableRefId;
purchParmLine.setQty(DocumentStatus::PackingSlip, false, true);
purchParmLine.setLineAmount();
purchParmLine.insert();

purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.transDate(systemDateGet());
purchFormLetter.proforma(false);
purchFormLetter.specQty(PurchUpdate::All);
purchFormLetter.purchTable(purchTable);

// This is the ID we hard code as the product receipt ID, if we do the posting via UI
// user would have the option to manually enter this value
purchFormLetter.parmParmTableNum(purchParmTable.ParmId);
purchFormLetter.parmId(purchParmTable.ParmId);
purchFormLetter.purchParmUpdate(purchFormLetterParmData.parmParmUpdate());
purchFormLetter.run();

ttsCommit;
 purchTotals purchTotals = PurchTotals::newPurchTable(PurchTable::find('000869'));
 purchTotals.calc();

 purchTotals.tax().sourceSingleLine(true, true);
 taxAmountCur    = purchTotals.tax().totalTaxAmountSingleLine(purchLine.TableId, purchLine.RecId, true, false);
       
import { genkit } from 'genkit';
import { googleAI, gemini15Flash } from '@genkit-ai/googleai';

const ai = genkit({
  plugins: [googleAI()],
  model: gemini15Flash,  // Set default model
});

// Simple generation
const { text } = await ai.generate('Why is AI awesome?');
console.log(text);

// Streamed generation 
const { stream } = await ai.generateStream('Tell me a story');
for await (const chunk of stream) {
  console.log(chunk.text);
}
/usr/sbin/spctl --assess --type install -v the-package
package com.example.explicitintent;

import android.os.Bundle;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import android.widget.Button;
import android.content.Intent;
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);

            Button btn=findViewById(R.id.btnid);
            btn.setOnClickListener(V->{

                Intent intent=new Intent(MainActivity.this,SecondActivity.class);
                startActivity(intent);
            });

            return insets;
        });
    }
}
package com.example.implicitintent;

import android.os.Bundle;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import android.widget.Button;
import android.content.Intent;
import android.net.Uri;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);

            Button btn=findViewById(R.id.btnid);
            btn.setOnClickListener(V->{
                Intent intent=new Intent(Intent.ACTION_VIEW);
                intent.setData(Uri.parse("https://www.youtube.com/"));
                startActivity(intent);
            });
            return insets;
        });
    }
}
package com.example.p10;

import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {

    private boolean isImage1 = true; // Flag to track the current image

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);

        // Initialize views
        ImageView img = findViewById(R.id.imgid);
        Button btn = findViewById(R.id.btnid);

        // Set up window insets listener
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });

        // Set click listener for the button
        btn.setOnClickListener(v -> {
            if (isImage1) {
                img.setImageResource(R.drawable.image2);
            } else {
                img.setImageResource(R.drawable.image1);
            }
            isImage1 = !isImage1; // Toggle the flag
        });
    }
}
package com.example.loginform;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);

        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);

            Button btn;
            EditText ed1, ed2;

            btn = findViewById(R.id.btnid);
            ed1 = findViewById(R.id.ed1id);
            ed2 = findViewById(R.id.ed2id);

            btn.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    String username = ed1.getText().toString().trim();
                    String password = ed2.getText().toString().trim();

                    if (validateInputs(username, password)) {
                        Toast.makeText(MainActivity.this, "Login Successful!!!", Toast.LENGTH_SHORT).show();
                    }
                }
            });

            return insets;
        });
    }

    private Boolean validateInputs(String username, String password) {
        if (username.isEmpty() || password.isEmpty()) {
            Toast.makeText(MainActivity.this, "Please enter a username and password!", Toast.LENGTH_SHORT).show();
            return false;
        }
        if (username.equals("admin") && password.equals("1234")) {
            return true;
        } else {
            Toast.makeText(MainActivity.this, "Invalid username or password!", Toast.LENGTH_SHORT).show();
            return false;
        }
    }
}
jQuery(document).ready(function() {
  jQuery('a[href*="#"]').on('click', (event) => {
    const hash = event.currentTarget.hash;
    if (hash) {
      event.preventDefault();
        event.stopPropagation();
      jQuery('html, body').animate({scrollTop: jQuery(hash).offset().top - jQuery(".elementor-location-header").height()}, 750);
    }
  });
});
add_filter( 'wcgs_show_shop_video_for_specific_pages', function(){
	return array( '5465', '5513', '1856' ); // Set your page ids with comma.
});
public void  submit()
{
    PurchLine PurchLine;
    if(!purchTable.PurchAgreement())
    {
        if(!purchTable.PaymentTerms) throw Error("Payment Terms must be filled");
        if(!purchTable.DeliveryTerms) throw Error("Delivery Terms must be filled");
        if(!purchTable.DeliveryTime) throw Error("Delivery Time must be filled");
        if(!purchTable.QuotationRef) throw Error("Quotation Reference must be filled");
    }
    if(purchTable.DefaultDimension==0)
    {
        throw Error("Dimension for PO must be filled");
    }
    select PurchLine where PurchLine.PurchId==purchTable.purchid && PurchLine.DefaultDimension==0;
    if(PurchLine)
    {
        throw Error("Dimension for PO line must be filled");
    }
    DimensionAttributeValueSetStorage dimStorage;
    dimStorage = DimensionAttributeValueSetStorage::find(purchTable.DefaultDimension);
    // check the number of Dimensions have value the same number of Dimension
    if(dimStorage.elements() !=5)
        throw Error("Dimension for PO must be filled");
    // or check each dimension has value
    /*DimensionAttribute  DimensionAttribute;
    DimensionAttribute = DimensionAttribute::findByName('BudgetCode');
    if(!dimStorage.containsDimensionAttribute(DimensionAttribute.RecId))
        throw Error("Financial Dimension BudgetCode is required.");

    DimensionAttribute = DimensionAttribute::findByName('Department');
    if(!dimStorage.containsDimensionAttribute(DimensionAttribute.RecId))
        throw Error("Financial Dimension Department is required.");

    DimensionAttribute = DimensionAttribute::findByName('General');
    if(!dimStorage.containsDimensionAttribute(DimensionAttribute.RecId))
        throw Error("Financial Dimension General is required.");

    DimensionAttribute = DimensionAttribute::findByName('Vendor');
    if(!dimStorage.containsDimensionAttribute(DimensionAttribute.RecId))
        throw Error("Financial Dimension Vendor is required.");

    DimensionAttribute = DimensionAttribute::findByName('Worker');
    if(!dimStorage.containsDimensionAttribute(DimensionAttribute.RecId))
        throw Error("Financial Dimension Worker is required.");
    */
    //for(int i = 1; i< dimStorage.elements(); i++)
    //{
    //    info(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name);
    //    info(dimStorage.getDisplayValueByIndex(i));
    //}
    while select PurchLine 
        where PurchLine.PurchId==purchTable.purchid
    {
        dimStorage = DimensionAttributeValueSetStorage::find(PurchLine.DefaultDimension);
        // check the number of Dimensions have value the same number of Dimension
        if(dimStorage.elements() !=5)
            throw Error("Dimension for PO line must be filled");
    }
    next submit();
}
import React, { useEffect, useState } from "react";
import { useNavigate, useLocation } from "react-router-dom";
import { toast, ToastContainer } from "react-toastify";
import "../../App.css";
import Mantra from "./Mantra";
import Footer from "./Footer";
import Hero from "./Hero";
import { useAuth } from "../Auth/AuthContext";

const Home = () => {
    const { user } = useAuth();
  const [loading, setLoading] = useState(true);
  const navigate = useNavigate();
  const location = useLocation();
  useEffect(() => {
    const timer = setTimeout(() => setLoading(false), 100);

    return () => clearTimeout(timer);
  }, []);

  // const handleNavigation = (path) => {
  //   navigate(path);
  // };

  const handleNavigation = (path) => {
    if (user) {
      if (path === "/register" && user.version.includes("mrRight")) {
        if (user.accountTypeForMrRight) {
          navigate("/dashboard");
          return;
        }
        navigate("/register");
      } else if (path === "/rcyc-register" && user.version.includes("rcyc")) {
        if (user.accountTypeForRcyc) {
          navigate("/rcyc-dashboard");
          return;
        }
        navigate("/rcyc-register");
      } else if (path === "/See360-register" && user.version.includes("see360")) {
        if (user.accountTypeForSee360) {
          navigate("/See360-dashboard");
          return;
        }
        navigate("/See360-register");
      } else {
        navigate(path);
      }
    } else {
      navigate(path);
    }
  };

  if (loading) {
    return (
      <div className=" min-h-screen w-full flex items-center justify-center bg-primary-gradient fixed inset-0 z-50">
        <l-infinity
          size="200"
          stroke="4"
          stroke-length="0.15"
          bg-opacity="0.1"
          speed="1.3"
          color="white"
        ></l-infinity>
      </div>
    );
  }

  return (
    <div className="max-w-[96rem] mx-auto md:pt-26 sm:pt-20 lg:pt-28 px-6">
      <Hero />
      <div className="relative mt-20 border-b border-neutral-800 min-h-[800px]">
        <div className="text-center">
          <h2 className="text-3xl sm:text-5xl lg:text-6xl mt-10 lg:mt-20 tracking-wide">
            Success starts with a single step{" "}
            <span className="bg-gradient-to-r bg-red-700 text-transparent bg-clip-text">
              let us guide your journey
            </span>
          </h2>
        </div>
        <div className="w-full gap-4 flex-wrap flex justify-between mt-24">
          {/* Card 1 */}
          <div className="w-full md:w-[48%] lg:w-[30%] p-4 bg-[#feefad] rounded-xl transform transition-all hover:-translate-y-2 duration-300 shadow-lg hover:shadow-2xl">
            <img
              className="h-40 w-full object-cover rounded-xl"
              src="/Assets/Mr_Profile.png"
              alt=""
            />
            <div className="p-4">
              <h2 className="font-bold text-lg mb-2">Mr. Right</h2>
              <p className="text-sm text-gray-600">
                The purpose of this Mr. Right is to understand the fundamental
                role of management or leadership for any team, department,
                company, family or even a country...
              </p>
            </div>
            <div className="m-2 sm:w-full lg:w-56">
              <div
                role="button"
                onClick={() => handleNavigation("/register")}
                className="text-white bg-gradient-to-r from-blue-900 to-gray-900 px-4 py-2 rounded-md "
              >
                Click here to Know More
              </div>
            </div>
          </div>

          {/* Card 2 */}
          <div className="w-full md:w-[48%] lg:w-[30%] p-4 bg-[#feefad] rounded-xl transform transition-all hover:-translate-y-2 duration-300 shadow-lg hover:shadow-2xl">
            <img
              className="h-40 w-full object-cover rounded-xl"
              src="/Assets/Rcyc_Profile.png"
              alt=""
            />
            <div className="p-4">
              <h2 className="font-bold text-lg mb-2">RCYC</h2>
              <p className="text-sm text-gray-600">
                The purpose of this Right Choice Your Career is self-discovery.
                It is designed to help people identify their natural abilities,
                personality strengths and their career interests...
              </p>
            </div>
            <div className="m-2 sm:w-full lg:w-56">
              <div
                role="button"
                onClick={() => handleNavigation("/rcyc-register")}
                className=" text-white bg-gradient-to-b from-[#e05780] to-[#602437] px-4 py-2 rounded-md hover:bg-blue-700"
              >
                Click here to Know More
              </div>
            </div>
          </div>

          {/* Card 3 */}
          <div className="w-full md:w-[48%] lg:w-[30%] p-4 bg-[#feefad] rounded-xl transform transition-all hover:-translate-y-2 duration-300 shadow-lg hover:shadow-2xl">
            <img
              className="h-40 w-full object-cover rounded-xl"
              src="/Assets/360_profile.png"
              alt=""
            />
            <div className="p-4">
              <h2 className="font-bold text-lg mb-2">See 360°</h2>
              <p className="text-sm text-gray-600">
                The purpose of this See 360 is to thoroughly analyze the entire
                business, identify gaps or inefficiencies within the
                organization, and develop strategies to drive ....
              </p>
            </div>
            <div className="m-2 sm:w-full lg:w-56">
              <div
                role="button"
                onClick={() => handleNavigation("/See360-register")}
                className="text-white bg-gradient-to-b from-[#212f45] to-[#006466] px-4 py-2 rounded-md hover:bg-green-700"
              >
                Click here to Know More
              </div>
            </div>
          </div>
        </div>
      </div>
      <Mantra />
      <Footer />
    </div>
  );
};

export default Home;
/// <summary>
/// The NW_FirstDayOrientationWFTypeSubmitManager menu item action event handler.
/// </summary>
public class NW_FirstDayOrientationWFTypeSubmitManager 
{
    public static void main(Args args)
	{
        // Variable declaration.
        recId recId;
        WorkflowCorrelationId       workflowCorrelationId;
        // Hardcoded workflow type name
        workflowTypeName workflowTypeName = workflowtypestr("WFType Name");
        // Initial note is the information that users enter when they
        // submit the document for workflow.
        WorkflowComment     initialNote = "";
        WorkflowSubmitDialog     workflowSubmitDialog;
        // The name of the table containing the records for workflow.
        NW_FirstDayOrientation      Request;
        FormDataSource              Request_ds;

        str menuItemName = args.menuItemName();
        if(menuItemName == menuitemactionstr(NW_FirstDayOrientationWFTypeSubmitMenuItem))
        {
            // Workflow is starting from the Windows client. This can be determined
            // because the menu item for submitting the workflow on the Windows
            // client was chosen by the user.
            // Opens the submit to workflow dialog.
            workflowSubmitDialog = WorkflowSubmitDialog::construct(args.caller().getActiveWorkflowConfiguration());
            workflowSubmitDialog.run();
    
            if (workflowSubmitDialog.parmIsClosedOK())
            {
                // Find what record from the Work Orders table is being submitted to workflow.
                recId = args.record().RecId;
                // Get comments from the submit to workflow dialog.
                initialNote = workflowSubmitDialog.parmWorkflowComment();
                try
                {
                    // Update the record in the AbsenceRequestHeader table that is being submitted to workflow.
                    // The record is moved to the 'submitted' state.
                    Request = args.record();
                    Request.WorkflowState = TradeWorkflowState::Submitted;
                    // Activate the workflow.
                    workflowCorrelationId = Workflow::activateFromWorkflowType(workflowTypeName, recId, initialNote, NoYes::No);
    
                    // Update the table using the form datasource.
                    Request_ds = Request.dataSource();
                    if (Request_ds)
                    {
                        Request_ds.write();
                        Request_ds.refresh();
                    }
                    // Updates the workflow button to diplay Actions instead of Submit.
                    args.caller().updateWorkflowControls();
                }
                catch(exception::Error)
                {
                    info("Error on workflow activation.");
                }
            }
        }
        else   //// if the user press save and submit button the below work
        {
            recId = args.record().RecId;
            try
            {
                // Update the record in the AbsenceRequestHeader table that is being submitted to workflow.
                // The record is moved to the 'submitted' state.
                Request = args.record();
                Request.WorkflowState = TradeWorkflowState::Submitted;
    
                // Activate the workflow.
                workflowCorrelationId = Workflow::activateFromWorkflowType(workflowTypeName, recId, initialNote, NoYes::No);
    
                // Update the table using the form datasource.
                Request_ds = Request.dataSource();
                if (Request_ds)
                {
                    Request_ds.write();
                    Request_ds.refresh();
                }
            }
            catch(exception::Error)
            {
                info("Error on workflow activation.");
            }
        }
	}

}
// let myobj={
//     fname:"barath",
//     lname:"chandra",
//     display(){
//         return 
//                   this.fname+" "+this.lname;
// }
// }
// console.log(myobj.display());
//1)
// console.log(a);
// var a=10;
// console.log(a);
// a=40;    
// console.log(a);


// let b=20;
// console.log(b);
// b=60;
// console.log(b);

// //console.log(c);
// var c=20;
// console.log(c);
// c=30;
// console.log(c);

// var a=10;
// var b="barath"
// var istrue=true;
// console.log(a+" "+b+" "+istrue);

//2)
// let calculator = function(a, b) {
//     a=Number (a);
//     b=Number (b);
//     console.log("Addition is : ",a+b);
//     console.log("Substraction is : ", a - b);
//     console.log("Multiplication is : ", a * b);
//     if(b !==0){
//         console.log("Division is : ", a / b);
//     }
//     else{
//         console.log("division is:divide by zero");
//     }
//     }
  
  
//   let a = prompt("Enter the first number: ");
//   let b = prompt("Enter the second number: ");
  
//   calculator(a, b);
//3)
// let person = {
//     name: "barath",
//     age: 16,

//     greet() {
//         return "Hello " + this.name + " " + this.age;
//     },

//     isAdult() {
//         return this.age >= 18;
//     }
// };

// console.log(person.greet()); 
// console.log(person.isAdult()); 

// 4)
// function Student(name, grade) {
//     this.name = name;
//     this.grade = grade;
//     this.study = function() {
    
//     console.log(this.name + " is studying");

//         this.grade += 1; 
//     };
//     this.getGrade = function() {
//         return this.grade;
//     };
// }
// const student1 = new Student("barath", 8);
// const student2 = new Student("shankar", 9);
// student1.study();
// student2.study();
// console.log(`${student1.name} grade:${student1.getGrade()}`);
// console.log(`${student2.name} grade:${student2.getGrade()}`);

//5)
// let temperatureCalculator={
   
//     tofahren(x){
//         let temp=((x/5)*9)+32;
//         return temp;
//     },
//     tocelsius(y){
//             let temp=(y-32)*5/9;
//             return temp;
//     }


// }
// let x=prompt("Enter temperature in celsius");

// let y=prompt("Enter temperature in Fahrenheit");

// let temp1=temperatureCalculator.tofahren(x);
// console.log(temp1);

// let temp2=temperatureCalculator.tocelsius(y);
// console.log(temp2);

// 6)

function Person(name,age){
    this.name=name;
    this.age=age;
    this.details=function det(){
        return `Name: ${this.name}, Age: ${this.age}` 
    }
}
function Student(name,age,grade){
    Person.call(this, name, age);
    this.grade=grade
    this.gradeDetails=function fgh(){
     return   ` ${this.name}is studying for grade ${this.grade}.` 
    }
    
}
Student.prototype = Object.create(Person.prototype);
Student.prototype.constructor = Student
let st=new Student("siddu",20,"C")

console.log(st.gradeDetails())
console.log(st)

console.log(st.age)

//8)

// function Person(name) {
//     this.name = name;
// }
// Person.prototype.greet = function() {
//     console.log(`Hello, my name is ${this.name}`);
// };
// const person1 = new Person('Alice');
// person1.greet();
// console.log(Person.prototype); 
// console.log(person1.__proto__); 
// console.log(person1.__proto__ === Person.prototype); 

//9)
// class Rectangle {
//     constructor(width, height) {
//       this.width = width;
//       this.height = height;
//     }
  
//     area() {
//       return this.width * this.height;
//     }
//   }
  

//   const rectangle = new Rectangle(5, 10);
  
 
//   console.log("The area of the rectangle is:", rectangle.area());
//10)
//called by     NW_PayrollRequestsHelper::spreadWorkflowActionButtons(element);


using Microsoft.Dynamics.@Client.ServerForm.Contexts;
/// <summary>
/// this class is used for requests that should be used in the workspace, listpages
/// and created from NCA portals
/// </summary>
class NW_PayrollRequestsHelper
{
    public static boolean isPayrollAdmin()
    {
        SecurityRole role;
        SecurityUserRole userRole;
         
        select userRole where userRole.User == curUserId()
             join role where  userRole.SecurityRole == role.RecID &&
            (role.Name == "Payroll administrator" || role.Name == "HR Manager");
         
        if(userRole)
            return true;

        return false;
    }

    public static boolean userHasSecurityRole(SecurityRoleName _securityRoleName, UserId _userId = curUserId())
    {
        SecurityRole role;
        SecurityUserRole userRole;
         
        select userRole where userRole.User == curUserId()
             join role where  userRole.SecurityRole == role.RecID &&
            (role.Name == _securityRoleName);
         
        if(userRole)
            return true;

        return false;
    }

    public static str pendingWorkItemUsers(RefRecId _refRecId, RefTableId _refTableId)
    {
        WorkflowWorkItemTable workflowWorkItemTable;
        WorkflowTrackingStatus trackingStatus;
        WorkflowCorrelationId correlationId;
        str currentStepName, nextStepName;
        container users;
        ;

        // Find the next pending work item for the current user
        while select workflowWorkItemTable
                where  workflowWorkItemTable.RefRecId == _refRecId
                && workflowWorkItemTable.RefTableId == _refTableId
                && workflowWorkItemTable.Status == WorkflowWorkItemStatus::Pending
        {
            users += workflowWorkItemTable.userName();
        }
        return con2Str(users, ", ");
    }

    private static boolean canSeeAllrequestRecords()
    {
        SecurityRole role;
        SecurityUserRole userRole;

        if(isSystemAdministrator())
            return true;

        while select userRole where userRole.User == curUserId()
        join role where userRole.SecurityRole == role.RecId

            && (role.Name == "Netways Payroll admin"
            || role.Name == "Human resources assistant")
        {
            return true;
        }
        return false;
    }

    public static void applyNCAPolicy(FormDataSource _Ds, FieldName _workerFieldName = '',
                boolean _filterCreatedBy = true, boolean _filterAssignedBy = true)
    {
        // stopped now till tested
        //  return;

        QueryBuildDataSource qbdsWorkItem;
        FormRun fr = _Ds.formRun();
        container rangeExpressions;
        MenuFunction callerMenuItem=  new MenuFunction(fr.args().menuItemName(), fr.args().menuItemType());
     
        if(NW_PayrollRequestsHelper::canSeeAllrequestRecords())
            return;
    
        /// if the request is opened from a url with an encrypted query
        if(NW_PayrollRequestsHelper::formHasRecordContext())
            return;
         
        QueryBuildRange qbr = _ds.queryBuildDataSource()
                        .addRange(fieldNum(AbsenceRequestHeader, RecId));

        Name qbdsName = _Ds.queryBuildDataSource().name();
        DictTable dictTable = new DictTable(_Ds.table());
        FieldId recIdField = dictTable.fieldName2Id("RecId");
        FieldId tableIdField = dictTable.fieldName2Id("TableId");
        FieldId createdByField = dictTable.fieldName2Id("CreatedBy");

        if(_workerFieldName)
        {
            rangeExpressions += strFmt('(%1.%2 == %3)',
                                qbdsName, _workerFieldName, HcmWorker::userId2Worker(curUserId()));
        }
        if(_filterCreatedBy)
        {
            if(createdByField)
                                rangeExpressions += strFmt('(%1.%2 == "%3")',qbdsName, "CreatedBy", curUserId());
        }
        if(_filterAssignedBy)
        {
            qbdsWorkItem = _Ds.queryBuildDataSource().
                                addDataSource(tableNum(WorkflowWorkItemTable));

            qbdsWorkItem.addRange(fieldnum(WorkflowWorkItemTable, Status)).value(queryValue(WorkflowWorkItemStatus::Pending));
            qbdsWorkItem.joinMode(JoinMode::OuterJoin);

            qbdsWorkItem.addLink(recIdField, fieldNum(WorkflowWorkItemTable, RefRecId));
            qbdsWorkItem.addLink(tableIdField, fieldNum(WorkflowWorkItemTable, RefTableId));

            rangeExpressions += strFmt('(%1.%2 == "%3")',
                                qbdsWorkItem.name(), fieldStr(WorkflowWorkItemTable, UserId), curUserId());
        }
        str rangeValue = strFmt('(%1)', con2Str(rangeExpressions, " || "));

        qbr.value(rangeValue);
        qbr.status(RangeStatus::Hidden);
    
        if(rangeExpressions == conNull())
                        qbr.AOTdelete();
        //info(qbr.value());
        //info(_Ds.query().toString());
    }

    public void workflowMenuBtnclicked(FormFunctionButtonControl _btn)
    {
        _btn.clicked();
        NW_PayrollRequestsHelper::requestDataSourceOnDeletion(_btn.formRun());

        //#Task
        //_btn.formRun().task(#TaskRefresh);
    }

    public static void hideNonSpecificGender(FormComboBoxControl _genderComboBoxCtrl)
    {
        _genderComboBoxCtrl.delete(enum2Str(HcmPersonGender::NonSpecific));
    }

    /// <summary>
    /// this method spreads the workflow approve and reject buttons beside the workflow menu button
    /// use this method on the datasource active method
    /// </summary>
    /// <param name = "_fr"> the form run object</param>
    public static void spreadWorkflowActionButtons(FormRun _fr)
    {
        #Workflow
        #JmgIcons
        #define.NCAWorkflowBtnGrp("NCAWorkflowBtnGrp")

        FormMenuButtonControl workflowMenu = _fr.control(_fr.controlId(#WorkflowActionBarButtonGroup));
        FormButtonGroupControl NCAWorkflowBtnGrp = _fr.control(_fr.controlId(#NCAWorkflowBtnGrp));

        if(NCAWorkflowBtnGrp)
            _fr.design().removeControl(_fr.controlId(#NCAWorkflowBtnGrp));
     
        FormFunctionButtonControl duplicateActionButton;
        
        
        if(workflowMenu)
        {
           
            FormButtonGroupControl workflowActionPaneButtonGroup = _fr.control(_fr.controlId("workflowActionPaneButtonGroup"));
            FormActionPaneControl actionPaneCtrl = workflowActionPaneButtonGroup.parentControl();
            NCAWorkflowBtnGrp = actionPaneCtrl.addControl(FormControlType::ButtonGroup, "NCAWorkflowBtnGrp", workflowActionPaneButtonGroup);
            NCAWorkflowBtnGrp.frameType(2);
            NCAWorkflowBtnGrp.visible(false);
            For(int i = 1; i <= workflowMenu.controlCount(); i++)
            {
                
                FormFunctionButtonControl   actionButton = workflowMenu.controlNum(i);
               // info(strFmt('%1',actionButton));

                if(actionButton &&
                    (strScan(actionButton.menuItemName(), "Approve", 1, 90)
                    || strScan(actionButton.menuItemName(), "Reject", 1, 90)
                    || strScan(actionButton.menuItemName(), "tChange", 1, 90)))
                {
                   
                    duplicateActionButton = NCAWorkflowBtnGrp.addControl(FormControlType::MenuFunctionButton, "Net_" + #WorkflowActionMenuFunctionPrefix+int2str(i));
                    duplicateActionButton.menuItemType(MenuItemType::Action);
                    duplicateActionButton.dataSource(_fr.workflowDataSource().name());
                    duplicateActionButton.menuItemName(actionButton.menuItemName());

                    NW_PayrollRequestsHelper helper = new NW_PayrollRequestsHelper();
                    duplicateActionButton.registerOverrideMethod(methodStr(FormFunctionButtonControl, clicked),
                                                methodStr(NW_PayrollRequestsHelper, workflowMenuBtnclicked), helper);
          
                    //helper = new NW_PayrollRequestsHelper();
                    //actionButton.registerOverrideMethod(methodStr(FormFunctionButtonControl, clicked),
                    //    methodStr(NW_PayrollRequestsHelper, workflowMenuBtnclicked), helper);

                    if(strScan(actionButton.menuItemName(), "Approve", 1, 90))
                        duplicateActionButton.normalImage("GreenCheck");

                    if(strScan(actionButton.menuItemName(), "Reject", 1, 90))
                        duplicateActionButton.normalImage("RedX");

                    if(strScan(actionButton.menuItemName(), "tChange", 1, 90))
                        duplicateActionButton.normalImage("Return");

                    //if(strScan(actionButton.menuItemName(), "Resubmit", 1, 90))
                    //    actionButton.visible(false);

                    //if(strScan(actionButton.menuItemName(), "Cancel", 1, 90))
                    //    actionButton.visible(false);


                    NCAWorkflowBtnGrp.visible(true);
                }
            }
        }
    }

    /// <summary>
    /// use this method on forms run() method
    ///
    /// </summary>
    /// <param name = "_fr"> FormRun object</param>
    public static void requestOnRun(FormRun _fr)
    {
        if(_fr.args().openMode() == OpenMode::New && !_fr.args().caller())
        {
            #Task
            _fr.task(#taskNew);
        }
        //  if(_fr.args().record() || !_fr.args().caller())
        if(_fr.args().openMode() == OpenMode::New || _fr.args().openMode() == OpenMode::Edit)
        {
            #SysSystemDefinedButtons
            formcontrol filterBtn = _fr.control(_fr.controlId(#SystemDefinedShowFiltersButton));
            if(filterBtn)
                filterBtn.visible(false);
      
            formcontrol listBtn = _fr.control(_fr.controlId(#SystemDefinedShowListButton));
            if(listBtn)
                listBtn.visible(false);
        }
    }

    public static void lockRanges(FormDataSource _ds)
    {
        //if(_ds.formRun().args().record())
        //{
        for(int i = 1; i <= _ds.queryRunQueryBuildDataSource().rangeCount(); i ++)
        {
            _ds.queryRunQueryBuildDataSource().range(i).status(RangeStatus::Locked);
            // _ds.queryBuildDataSource().range(i).status(RangeStatus::Hidden);
        }
        //}
    }

    /// <summary>
    /// use this method on forms close() method
    /// </summary>
    /// <param name = "_fr"> FormRun object</param>
    public static void requestOnClosed(FormRun _fr)
    {
        FormRun caller = _fr.args().caller();
        if(caller)
        {
            #Task
            caller.task(#TaskRefresh);
        }
    }

    /// <summary>
    /// use this method in form task method as a condition
    /// example: if(NW_PayrollRequestsHelper::cannotSwitchToGridView(element, _p1))
    ///             return ret;
    /// </summary>
    /// <param name = "_fr"></param>
    /// <param name = "_task"></param>
    /// <returns></returns>
    public static boolean cannotSwitchToGridView(FormRun _fr, int _task)
    {
        #Task
        return _task == #TaskSwitchToGridView &&
                        (_fr.args().openMode() == OpenMode::New || _fr.args().openMode() == OpenMode::Edit);  // is opened from ess
    }

    /// <summary>
    /// used to pop out of the form details to previous screen
    /// use this method on the form datasource delete() method
    /// you can use it also in save and submit button
    /// </summary>
    /// <param name = "_fr"> FormRun object</param>
    public static void requestDataSourceOnDeletion(FormRun _fr)
    {
        #Task
    
        if(_fr.args().openMode() == OpenMode::New)
        {
            _fr.closeCancel();
        }
        else if (_fr.args().openMode() == OpenMode::Edit)
        {
            _fr.task(#taskEsc);
        }
        else
        {
            _fr.task(#taskSwitchToGridView);
        }
    }

    /// <summary>
    /// don't use, not ready
    /// </summary>
    /// <param name = "_ds"></param>
    /// <param name = "_allowEdit"></param>
    public static void dataSourceFieldsAllowEdit(FormDataSource _ds, boolean _allowEdit)
    {
        DictTable dictTable = DictTable::construct(tableId2Name(_ds.table()));

        FieldId fieldId = dictTable.fieldNext(0);
    
        while(fieldId)
        {
            _ds.object(fieldId).allowEdit(_allowEdit);
            fieldId = dictTable.fieldNext(fieldId);
        }
    }

    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    [FormEventHandler(formStr(DocumentUpload), FormEventType::Closing)]
    public static void DocumentUpload_OnClosing(xFormRun sender, FormEventArgs e)
    {
        FormControl ctrl = sender.args().caller();
        if(ctrl)
        {
            FormRun callerFr = ctrl.formRun();
            if(callerFr)
            {
                #Task
                callerFr.task(#TaskRefresh);
            }
        }
    }

    public static void refreshCallerForm(FormRun _formRun)
    {
        FormRun callerFr = _formRun.args().caller();
        if(callerFr)
        {
            #Task
            callerFr.task(#TaskRefresh);
        }
    }

    public static boolean formHasRecordContext()
    {
        SessionContext sessionContext = SessionContext::Get_Current();
        if(!sessionContext)
            return false;
        /// if the request is opened from a url with an encrypted query
        URLUtility urlUtil = new URLUtility();
        str q = urlUtil.getQueryParamValue('q');
        if(q)
            return true;

        return false;
    }

    public static void SubmitToWorkflow(container _parms)
    {
        workflowTypeName  workflowTemplateName;
        recId             recId;
        WorkflowComment   initialNote;
        NoYes             activatingFromWeb;
        WorkflowUser      submittingUser;

        [workflowTemplateName, recId, initialNote, activatingFromWeb, submittingUser] = _parms;

        Workflow::activateFromWorkflowType(workflowTemplateName,
                                           RecId,
                                           initialNote,
                                           NoYes::No,
                                           submittingUser);
    }

    static SysEmailItemId SendMailByDistributerBatch(
        SysEmailId _emailTemplate,
        Email _recipientMail,
        Map _placeHolderMap = null,
        str _origin = '')
    {
        SysOutgoingEmailTable outgoingEmailTable;
        SysEmailItemId nextEmailItemId;

        SysEmailTable        sysEmailTable        = SysEmailTable::find(_emailTemplate);
        SysEmailMessageTable sysEmailMessageTable = SysEmailMessageTable::find(sysEmailTable.EmailId, sysEmailTable.DefaultLanguage);
        str messageBody = sysEmailMessageTable.Mail;
        str subject = sysEmailMessageTable.Subject;

        //Map placeholderMap = new Map(Types::String, Types::String);
        //placeholderMap.insert("Startdate", date2Str(_SDate,123, DateDay::Digits2,DateSeparator::Slash,DateMonth::Digits2,DateSeparator::Slash,DateYear::Digits4));
        //placeholderMap.insert("Enddate", date2Str(_EDate,123, DateDay::Digits2,DateSeparator::Slash,DateMonth::Digits2,DateSeparator::Slash,DateYear::Digits4));
        //placeholderMap.insert("Task", _Tasks);
        Map placeHolderMap = _placeHolderMap;

        messageBody = SysEmailMessage::stringExpand(messageBody, placeholderMap);
        subject     = SysEmailMessage::stringExpand(subject, placeholderMap);
         
         
        nextEmailItemId = EventInbox::nextEventId();
        outgoingEmailTable.EmailItemId = nextEmailItemId;
        outgoingEmailTable.IsSystemEmail = NoYes::No;
        outgoingEmailTable.Origin = _origin;
        outgoingEmailTable.Sender = sysEmailTable.SenderAddr;
        outgoingEmailTable.SenderName = sysEmailTable.SenderName;
        outgoingEmailTable.Recipient = _recipientMail;
        outgoingEmailTable.Subject = subject;
        outgoingEmailTable.Priority = eMailPriority::Normal ;
        outgoingEmailTable.WithRetries = true;
        outgoingEmailTable.RetryNum = 10;
        outgoingEmailTable.UserId = curUserId();
        outgoingEmailTable.Status = SysEmailStatus::Unsent;
        outgoingEmailTable.Message = messageBody;
        outgoingEmailTable.LatestStatusChangeDateTime = DateTimeUtil::getSystemDateTime();
        outgoingEmailTable.insert();

        return outgoingEmailTable.EmailItemId ;
    }

}
 TmpTaxWorkTrans tmpTax;
 purchTotals purchTotals = PurchTotals::newPurchTable(PurchTable);
 purchTotals.calc();
 tmpTax.setTmpData(purchTotals.tax().tmpTaxWorkTrans());
 select firstonly tmpTax;
 real TaxValue = TaxData::percent(tmpTax.TaxCode,today(),0);
 Info(strFmt("%1",TaxValue));
 TaxValue = TaxData::find(tmpTax.TaxCode, Systemdateget(), 0).TaxValue;
 Info(strFmt("%1",TaxValue));
 NW_CertificationOfCompletionHeader.TaxValue          = TaxValue;

https://mycsharpdeveloper.wordpress.com/2015/07/03/how-to-get-salespurchase-taxgstvat-info-for-report/
:start
@echo off
cls
:: optional console color tweaking
color 0a
echo some greeting here
set /p var=Some line of data here: 
if %var%==start goto start

echo some other info down here
set /p var=another prompt line:
if %var%==start goto start

echo final terminal message
:: launch video player of your choice with some video file with alerts/flashy messages
"C:\Program Files\VideoLAN\VLC\vlc.exe" --fullscreen someFile.mp4

pause>nul
def reverse_alternating_groups(s):
    result = []  # List to store the final result
    group = ""   # Temporary string to hold each group (either digits or letters)
    reverse = False  # Flag to indicate whether to reverse the group

    for i in range(len(s)):
        if s[i].isalpha():
            # Add character to the current group of letters
            group += s[i]
        else:
            # If we encounter a non-letter (digit), process the current group
            if group:
                # Reverse the group if needed and append it to the result
                if reverse:
                    result.append(group[::-1])  # Reverse the letters group
                else:
                    result.append(group)  # Leave the letters group as it is
                group = ""  # Reset the group for the next set of characters

            # Append the digit to the result (digits are unchanged)
            result.append(s[i])

            # Toggle the reverse flag for the next group of letters
            reverse = not reverse

    # Process any remaining group (in case the string ends with letters)
    if group:
        if reverse:
            result.append(group[::-1])  # Reverse the last letters group if needed
        else:
            result.append(group)

    # Return the result as a joined string
    return ''.join(result)

# Example usage:
input_str_1 = "abc123def456ghi789jkl"
output_str_1 = reverse_alternating_groups(input_str_1)
print(output_str_1)  # Output: "cba123def456ihg789jkl"

input_str_2 = "a1b2c3d"
output_str_2 = reverse_alternating_groups(input_str_2)
print(output_str_2)  # Output: "a1b2c3d"
def reverse_digits_in_series(s):
    # Initialize an empty list to store the result
    result = []
    
    # Temporary list to store digits while iterating
    digits = []

    # Loop through each character in the input string
    for char in s:
        if char.isdigit():
            # If the character is a digit, add it to the digits list
            digits.append(char)
        else:
            # If the character is not a digit, process the digits collected so far
            if digits:
                # Reverse the digits list and add to the result
                result.append(''.join(digits[::-1]))
                digits = []  # Reset the digits list for next series
            # Append the non-digit character to the result as is
            result.append(char)
    
    # In case there are digits left at the end of the string
    if digits:
        result.append(''.join(digits[::-1]))

    # Join the result list into a string and return it
    return ''.join(result)

# Example usage
input_str_1 = "abc123def456gh"
output_str_1 = reverse_digits_in_series(input_str_1)
print(output_str_1)  # Output: "abc321def654gh"

input_str_2 = "1a2b3c"
output_str_2 = reverse_digits_in_series(input_str_2)
print(output_str_2)  # Output: "1a2b3c"
def reverse_words(sentence):
    # Split the sentence into a list of words
    words = sentence.split()

    # Initialize an empty list to store the reversed words
    reversed_words = []

    # Loop through the words backwards and append each to the reversed_words list
    for i in range(len(words) - 1, -1, -1):
        reversed_words.append(words[i])

    # Join the reversed words into a single string with spaces
    reversed_sentence = ' '.join(reversed_words)

    return reversed_sentence

# Example usage
input_sentence_1 = "Hello world"
output_sentence_1 = reverse_words(input_sentence_1)
print(output_sentence_1)  # Output: "world Hello"

input_sentence_2 = "Keep calm and code on"
output_sentence_2 = reverse_words(input_sentence_2)
print(output_sentence_2)  # Output: "on code and calm Keep"
def reverse_alternate_groups(s):
    groups = []
    current_group = ""
    is_letter = s[0].isalpha()  # Determine if the first character is a letter or digit

    # Step 1: Split the input string into groups of continuous letters and digits
    for char in s:
        if char.isalpha() == is_letter:  # Same type (letter or digit)
            current_group += char
        else:  # Type changes (letter to digit or digit to letter)
            groups.append(current_group)  # Store the completed group
            current_group = char  # Start a new group
            is_letter = char.isalpha()  # Update the type
    groups.append(current_group)  # Append the last group

    # Step 2: Reverse every alternate group of letters
    for i in range(len(groups)):
        if i % 2 == 0 and groups[i][0].isalpha():  # Reverse if the group is letters and at even index
            groups[i] = groups[i][::-1]

    # Step 3: Join the groups back into a single string
    return ''.join(groups)

# Example usage
input_str = "abc123def456ghi789jkl"
output_str = reverse_alternate_groups(input_str)
print(output_str)  # Output: "cba123def456ihg789jkl"
def find_cheapest_flight_no_heapq(flights, origin, destination):
    # Initialize the queue with the starting airport and a cost of 0
    queue = [(0, origin)]
    
    # Dictionary to store the minimum cost to reach each airport
    min_cost = {origin: 0}
    
    # Process each airport in the queue
    while queue:
        # Find the element with the smallest cost in the queue
        current_index = 0
        for i in range(1, len(queue)):
            if queue[i][0] < queue[current_index][0]:  # Compare costs to find minimum
                current_index = i
        
        # Remove the element with the smallest cost from the queue
        current_cost, current_airport = queue.pop(current_index)
        
        # If the current airport is the destination, return the cost
        if current_airport == destination:
            return current_cost
        
        # Iterate through all neighbors (connected airports)
        for neighbor, price in flights.get(current_airport, {}).items():
            # Calculate the new cost to reach the neighbor
            new_cost = current_cost + price
            
            # Update the minimum cost to reach the neighbor if it's cheaper
            if new_cost < min_cost.get(neighbor, float('inf')):
                min_cost[neighbor] = new_cost  # Store the new minimum cost
                queue.append((new_cost, neighbor))  # Add the neighbor to the queue
    
    # If the destination is not reachable, return -1
    return -1

# Example Input
flights = {
    "JFK": {"LAX": 500, "ORD": 200},  # Flights from JFK to LAX and ORD with costs
    "ORD": {"LAX": 300, "MIA": 150},  # Flights from ORD to LAX and MIA with costs
    "LAX": {"MIA": 200},              # Flights from LAX to MIA with cost
    "MIA": {"ATL": 100},              # Flights from MIA to ATL with cost
    "ATL": {}                         # No outgoing flights from ATL
}

# Example Usage
origin = "JFK"  # Starting airport
destination = "MIA"  # Target airport
cheapest_price = find_cheapest_flight_no_heapq(flights, origin, destination)

# Print the result based on the output of the function
if cheapest_price != -1:
    print(f"The cheapest flight from {origin} to {destination} costs ${cheapest_price}")
else:
    print(f"No route found from {origin} to {destination}")
<script>
    
    jQuery(function(){
	jQuery( window ).on( 'elementor/frontend/init', function() { //wait for elementor to load
		elementorFrontend.on( 'components:init', function() { //wait for elementor pro to load
			
			jQuery.fn.smartmenus.defaults.noMouseOver = true;
		
// 			jQuery.fn.smartmenus.defaults.showOnClick = true;
		});
	});
});
    
</script>

fn.smartmenus.defaults = {
    isPopup: false,
    mainMenuSubOffsetX: 0,
    mainMenuSubOffsetY: 0,
    subMenusSubOffsetX: 0,
    subMenusSubOffsetY: 0,
    subMenusMinWidth: '10em',
    subMenusMaxWidth: '20em',
    subIndicators: true,
    subIndicatorsPos: 'prepend',
    subIndicatorsText: '+',
    scrollStep: 30,
    scrollAccelerate: true,
    showTimeout: 250,
    hideTimeout: 500,
    showDuration: 0,
    showFunction: null,
    hideDuration: 0,
    hideFunction: function($ul, complete) { $ul.fadeOut(200, complete); },
    collapsibleShowDuration: 0,
    collapsibleShowFunction: function($ul, complete) { $ul.slideDown(200, complete); },
    collapsibleHideDuration: 0,
    collapsibleHideFunction: function($ul, complete) { $ul.slideUp(200, complete); },
    showOnClick: false,
    hideOnClick: true,
    noMouseOver: false,
    keepInViewport: true,
    keepHighlighted: true,
    markCurrentItem: false,
    markCurrentTree: true,
    rightToLeftSubMenus: false,
    bottomToTopSubMenus: false,
    overlapControlsInIE: true
};
If you can implement fair gameplay, it is crucial for every individual app developer, but instead, you can partner up with a superior app development company that can have a proper team and expertise so that you can make your platform more effective and make it usable for all users in terms of authenticity and transparency. Here, we listed out the way to improve your platform gameplay with the Bustabit clone

1. Provably Fair System
Implementing fair gameplay is crucial, for they do some implementation for each game round.
◦ Server Seed: A secret seed generated by the server for each game round.
◦ Client Seed: A seed chosen by the player for each game round.
◦ Hashing: These two seeds are mixed together, and the hash is getting displayed for the player before the game starts.
◦ Result Determination: After the game, the server reveals the server seed. Players can then use the revealed server seed and their own client seed to recreate the hash and verify that the game outcome was truly random and not manipulated.

2. Transparent Game History

◦ Publicly Displayed Results: Display a history of recent game rounds, including the crash point, server seed, and client seeds (if applicable).
◦ Allow Players to Verify: Enable players to easily verify the results of past games using the provided information.

3. Secure Random Number Generation (RNG)
◦ High-Quality RNG: Utilize a cryptographically secure random number generator (CSPRNG) to determine the crash point.

4. Secure Server Infrastructure
◦ Robust Security Measures: Implement strong security measures to protect the platform from attacks and ensure the integrity of game data.
◦ Regular Security Audits: Conduct regular security audits to identify and address any bugs and glitches.

5. 5. Responsible Gambling Features
◦ Self-exclusion: Allow players to self-exclude from the platform for a specified period.
◦ Deposit Limits: Enable players to set deposit limits to control their spending.
◦ Loss Limits: Allow players to set limits on their potential losses.
◦ Cooling-Off Periods: Offer cooling-off periods to encourage responsible gaming behavior.

By implementing these measures, you'll get a legitimate and transparent Bustabit clone app for your business that fosters trust and encourages responsible gaming behavior among players.
star

Sun Jan 05 2025 20:03:24 GMT+0000 (Coordinated Universal Time)

@Gautam

star

Sun Jan 05 2025 12:44:45 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Sun Jan 05 2025 12:43:58 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Sun Jan 05 2025 12:34:26 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Sun Jan 05 2025 12:22:17 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Sun Jan 05 2025 12:16:37 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Sun Jan 05 2025 11:38:44 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Sun Jan 05 2025 11:25:40 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Sat Jan 04 2025 23:27:41 GMT+0000 (Coordinated Universal Time)

@Radhwen_hajri

star

Sat Jan 04 2025 23:27:18 GMT+0000 (Coordinated Universal Time)

@Radhwen_hajri

star

Sat Jan 04 2025 19:39:49 GMT+0000 (Coordinated Universal Time) https://store.lunarclient.com/

@MasteriX1337

star

Sat Jan 04 2025 14:25:04 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/52578270/install-python-with-cmd-or-powershell

@baamn #powershell #python

star

Sat Jan 04 2025 14:19:45 GMT+0000 (Coordinated Universal Time) https://ai.google.dev/gemini-api/docs/quickstart?lang=python

@baamn #python #google #api

star

Sat Jan 04 2025 07:22:02 GMT+0000 (Coordinated Universal Time) https://globehire.hypertechglobaltechnologies.com/

@Nikhil4081

star

Sat Jan 04 2025 05:32:57 GMT+0000 (Coordinated Universal Time)

@KKOMAL

star

Sat Jan 04 2025 03:39:32 GMT+0000 (Coordinated Universal Time)

@mamba

star

Fri Jan 03 2025 22:31:41 GMT+0000 (Coordinated Universal Time)

@kanatov

star

Fri Jan 03 2025 20:49:05 GMT+0000 (Coordinated Universal Time)

@rstringa

star

Fri Jan 03 2025 18:59:47 GMT+0000 (Coordinated Universal Time)

@khadizasultana #loop #c++ #vector #pointers #binarysearch

star

Fri Jan 03 2025 10:56:21 GMT+0000 (Coordinated Universal Time)

@khadizasultana #loop #c++ #vector #pointers

star

Fri Jan 03 2025 10:05:07 GMT+0000 (Coordinated Universal Time) https://nicolaipalmkvist.com/gsap-blueprint-code/

@arnab #javascript

star

Thu Jan 02 2025 16:09:15 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Thu Jan 02 2025 12:37:29 GMT+0000 (Coordinated Universal Time) https://appticz.com/social-media-app-development

@davidscott

star

Thu Jan 02 2025 12:25:21 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Thu Jan 02 2025 11:20:45 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com

@Flynnrider ##pancakeswap ##decentralized ##exchange ##justswapclonescript

star

Thu Jan 02 2025 09:29:06 GMT+0000 (Coordinated Universal Time) https://firebase.google.com/docs/genkit

@Liselot3

star

Thu Jan 02 2025 08:36:47 GMT+0000 (Coordinated Universal Time) https://www.mothersruin.com/software/SuspiciousPackage/use.html#check-signature

@Liselot3

star

Thu Jan 02 2025 01:49:22 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Thu Jan 02 2025 01:42:16 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Thu Jan 02 2025 01:20:35 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Thu Jan 02 2025 01:18:49 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Wed Jan 01 2025 09:27:33 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/c-programming/online-compiler/

@Narendra

star

Wed Jan 01 2025 06:05:32 GMT+0000 (Coordinated Universal Time) https://carfume.cz/wp-admin/admin.php?page

@Pulak

star

Tue Dec 31 2024 12:17:27 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Dec 31 2024 11:31:40 GMT+0000 (Coordinated Universal Time)

@Rishi1808

star

Tue Dec 31 2024 10:29:44 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Dec 31 2024 10:06:34 GMT+0000 (Coordinated Universal Time)

@login

star

Tue Dec 31 2024 10:00:45 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Dec 31 2024 08:34:12 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Dec 31 2024 07:21:07 GMT+0000 (Coordinated Universal Time) https://www.reddit.com/r/learnprogramming/comments/b4mc2l/trying_to_make_a_fake_computer_terminal_for_short/

@isaac

star

Tue Dec 31 2024 05:05:03 GMT+0000 (Coordinated Universal Time)

@sooraz3871 #python

star

Tue Dec 31 2024 05:03:23 GMT+0000 (Coordinated Universal Time)

@sooraz3871 #python

star

Tue Dec 31 2024 04:45:14 GMT+0000 (Coordinated Universal Time)

@sooraz3871 #python

star

Tue Dec 31 2024 04:36:59 GMT+0000 (Coordinated Universal Time)

@sooraz3871 #python

star

Tue Dec 31 2024 04:18:35 GMT+0000 (Coordinated Universal Time)

@sooraz3871 #python

star

Mon Dec 30 2024 11:48:10 GMT+0000 (Coordinated Universal Time)

@rstringa

star

Mon Dec 30 2024 11:44:15 GMT+0000 (Coordinated Universal Time) https://appticz.com/bustabit-clone-script

@aditi_sharma_

Save snippets that work with our extensions

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