Thursday, December 11, 2025

How Many Bricks Do You Need? Try This Simple Wall Area Calculator

How Many Bricks Do You Need?

Use this simple wall area calculator to estimate bricks with mortar, openings, and waste allowance.

Units:
Enter width in meters (m)
Enter height in meters (m)
Used for info only (volume) — area is width × height.
Add extra to cover breakage & cutting (typ. 5–10%).
Depth isn’t needed for area calculation.
Adds to brick length & height to estimate spacing.
Openings (doors/windows)
Subtract areas for cutouts.

Friday, February 16, 2024

what is meant by --max-request-journal-entries and --no-request-journal in wiremock configuration

max-request-journal-entries and no-request-journal in wiremock configuration


In WireMock, the request journal is a built-in feature that keeps a record of incoming requests and their corresponding responses. It can be helpful for debugging and analysis purposes.


--max-request-journal-entries is an option that allows you to set a limit on the number of requests that the request journal stores. When this limit is reached, older requests will be removed from the journal to make room for new ones. By setting this option, you can control the memory usage of the request journal.


For example, using --max-request-journal-entries=10000 will limit the request journal to store a maximum of 10,000 requests.


--no-request-journal is an option that disables the request journal entirely. When this option is used, WireMock will not store any requests or responses in the request journal. Disabling the request journal can help reduce memory consumption and improve performance, especially during load testing or in production environments where request logging is not necessary.


In summary:


--max-request-journal-entries: Sets a limit on the number of requests stored in the request journal.

--no-request-journal: Disables the request journal completely.

Thursday, January 18, 2024

Sort an array of 0s, 1s and 2s | Dutch National Flag problem

Sort an array of 0s, 1s and 2s |

Dutch National Flag problem


👀👀👀👀👀


/*

* This program defines a sortArray() method that sorts

* an array of 0s, 1s, and 2s using

* the Dutch National Flag algorithm.

*/


public class Sort012 {


public static void swap(int[] arr,int i,int j) {

int temp;

temp=arr[i];

arr[i]=arr[j];

arr[j]=temp;

}

public static void sortArray(int[] arr) {

int low =0;

int mid =0;

int high =arr.length-1;

while(mid<=high) {

switch (arr[mid]) {

case 0:

swap(arr,low,mid);

low++;

mid++;

break;

case 1:

mid++;

break;

case 2:

swap(arr,mid,high);

high--;

break;

default:

break;

}

}

}


public static void main(String... aa) {

int arr[]= {2,0,1,0,2,1,2,0,1,0,2,1};

sortArray(arr);

for(int i:arr) {

System.out.print(i+" ");

}

}

}


Output:

0 0 0 0 1 1 1 1 2 2 2 2



Wednesday, January 17, 2024

Merge two sorted linked lists


Merge two sorted linked lists


public class MergeLinkedLists {

static class ListNode {

int val;

ListNode next;

public ListNode() {}


public ListNode(int val) {

this.val = val;

}


public ListNode(int val, ListNode next) {

this.val = val;

this.next = next;

}

}

public static ListNode mergeTwoLists(ListNode list1, ListNode list2) {

ListNode mergedList = new ListNode();

ListNode current = mergedList;


while (list1 != null && list2 != null) {

if (list1.val <= list2.val) {

current.next = list1;

list1 = list1.next;

} else {

current.next = list2;

list2 = list2.next;

}

current = current.next;

}


if (list1 != null) {

current.next = list1;

} else {

current.next = list2;

}


return mergedList.next;

}


public static void main(String[] args) {

// Example usage:

ListNode list1 = new ListNode(1, new ListNode(2, new ListNode(4)));

ListNode list2 = new ListNode(1, new ListNode(3, new ListNode(4)));


ListNode mergedList = mergeTwoLists(list1, list2);

while (mergedList != null) {

System.out.print(mergedList.val + " ");

mergedList = mergedList.next;

}

}

}


Time Complexity: O(M + N), Where M and N are the size of the list1 and list2 respectively.
Auxiliary Space: O(M+N), Function call stack space


Output:


1 1 2 3 4 4


Geeks link:

    Merge To Linked List


Create a Digital Clock using HTML and JavaScript

Create a Digital Clock using HTML and JavaScript  <! DOCTYPE html> < html > < head > ...

Followers

Search This Blog

Popular Posts