SET default filter

oninit: function () {
    // set default filter on init
    var orderStatus = SSIurlModul.getKey('ORDST');
    if (!orderStatus) {
        SSIurlModul.set("ORDST", "15,17,20,21,30,31,35,40,41,42,43");
    };
},
oncomplete: function () {
  // re-init filter to set default values
    SSI.portal.init();
    //this.load();
    //this.loadStats();
},

vscode task "Delete pycache folders"

{
    "label": "Delete __pycache__ folders",
    "type": "shell",
    "command": "find . -type d -name '__pycache__' -exec rm -r {} +",
    "problemMatcher": []
}

2116. Check if a Parentheses String Can Be Valid

A parentheses string is a non-empty string consisting only of '(' and ')'. It is valid if any of the following conditions is true: It is (). It can be written as AB (A concatenated with B), where A and B are valid parentheses strings. It can be written as (A), where A is a valid parentheses string. You are given a parentheses string s and a string locked, both of length n. locked is a binary string consisting only of '0's and '1's. For each index i of locked, If locked[i] is '1', you cannot change s[i]. But if locked[i] is '0', you can change s[i] to either '(' or ')'. Return true if you can make s a valid parentheses string. Otherwise, return false.
/**
 * @param {string} s
 * @param {string} locked
 * @return {boolean}
 */
var canBeValid = function(s, locked) {
     const n = s.length;
    if (n % 2 !== 0) return false; // If the length of s is odd, it's impossible to balance

    let openCount = 0;
    let flexibleCount = 0;

    // Forward pass
    for (let i = 0; i < n; i++) {
        if (locked[i] === '0') {
            flexibleCount++; // Count positions that can be changed
        } else if (s[i] === '(') {
            openCount++; /

Toggle Between Archive Folders - Outlook

Sub ToggleBetweenMainMailboxAndArchive()
    Dim OutlookApp As Outlook.Application
    Dim ns As Outlook.NameSpace
    Dim CurrentFolder As Outlook.Folder
    Dim ArchiveRoot As Outlook.Folder
    Dim MainMailboxRoot As Outlook.Folder
    Dim TargetFolder As Outlook.Folder
    Dim ArchiveEntryID As String
    Dim MainMailboxEntryID As String
    
    ' Initialize Outlook application and namespace
    Set OutlookApp = Application
    Set ns = OutlookApp.GetNamespace("MAPI")
    Set C

PYODBC - Full process

Here's an example of full process to connect to a cloud-hosted database.

# 1. Install the required dependencies
Let me walk you through the installation process on an Ubuntu-based system in a comprehensive way.

On a Linux system, installing `pyodbc` requires both:
- **Python package management** and 
- **system-level dependencies**. 

Let's go through this step-by-step:

## 1.1. First, let's install the system-level ODBC dependencies. 

These are fundamental components that `pyodbc` needs to c

change style from useState in scss without using inline styles

const elementRef = useRef(null);

useEffect(() => {
  if (elementRef.current) {
    elementRef.current.style.setProperty("--dynamic-color", color);
  }
}, [color]);

return (
  <div ref={elementRef} className="card">
    ...
  </div>
);

Writing Task 1 #1

### **Introduction Phrases**
- The bar graph illustrates the proportion of residents in five Australian cities...
- The chart provides information about...
- The graph shows data on...
- The diagram highlights...
- The figure compares the percentages of...
- The given bar graph illustrates...

### **Overview Phrases**
- Overall, visiting cafés is the most popular activity...
- In general, it can be observed that...
- A clear trend is that...
- The most noticeable feature is that...
- It is evide

Write Task 2 #1

### **Introduction Phrases**  
1. In many parts of the world, people view...
2. This trend reflects...
3. While this preference has its benefits, it also brings challenges...
4. There are various reasons behind this phenomenon, which will be explored in this essay.  
5. This essay will discuss both the causes and implications of this trend.

---

### **Body Paragraph 1 - Presenting Reasons**  
1. One key reason for... is...
2. This is because...
3. In many cultures, [X] is perceived as...
4. Thi

1400. Construct K Palindrome Strings

Given a string s and an integer k, return true if you can use all the characters in s to construct k palindrome strings or false otherwise.
/**
 * @param {string} s
 * @param {number} k
 * @return {boolean}
 */
var canConstruct = function(s, k) {
    // If k is greater than the length of the string, it's impossible to create k palindromes
    if (k > s.length) {
        return false;
    }

    // Create a frequency map to count occurrences of each character
    const charCount = {};
    for (let char of s) {
        charCount[char] = (charCount[char] || 0) + 1;
    }

    // Count how many characters have an odd frequency
    let o

enc

openssl enc -aes-256-cbc -salt -in $(ls -t | head -n 1) -out mongo.enc -pass pass:"YourStrongPassword"
openssl enc -aes-256-cbc -d -in mongo.enc -out mongo.tar.gz -pass pass:"YourStrongPassword"

megatools put $(ls -t | head -n 1) --username hsunnysingh8@gmail.com --password 'Jo^mQ2hBqKwGl!rG'
megatools get /Root/mongo.enc --username hsunnysingh8@gmail.com --password 'Jo^mQ2hBqKwGl!rG'

Apache redirect loop behind a reverse proxy

https://www.reddit.com/r/selfhosted/comments/1gskh05/redirect_loop_apache_behind_reverse_proxy/?tl=fr

Some apache2 cmd

- List Apache vhosts

`$a2query -s`

- List Apache conf

apache2ctl -S

916. Word Subsets

A string b is a subset of string a if every letter in b occurs in a including multiplicity. For example, "wrr" is a subset of "warrior" but is not a subset of "world". A string a from words1 is universal if for every string b in words2, b is a subset of a. Return an array of all the universal strings in words1. You may return the answer in any order.
/**
 * @param {string[]} words1
 * @param {string[]} words2
 * @return {string[]}
 */
// Function to find the maximum required character frequencies for words2
function getMaxFrequencies(words) {
    const maxFreq = {};
    for (let word of words) {
        const count = {};
        for (let char of word) {
            count[char] = (count[char] || 0) + 1;
        }
        for (let char in count) {
            maxFreq[char] = Math.max(maxFreq[char] || 0, count[char]);
        }
    }
    return

Unpacking Operator (*)

'''
The asterisk * is the unpacking operator in Python.
- When used before an iterable (like a list, tuple, or generator), it "unpacks" the elements of that iterable.
- Unpacking can be used in multiple contexts:
    + Function arguments: function(*iterable) passes elements of the iterable as separate positional arguments to the function.
    + Creating new iterables: [ *iterable1 , *iterable2 ] creates a new list by combining elements from both.
'''
def my_function(a, b, c):
    print(f"a = {a}

Renew and removal old certificates

function Get-MachineCertificate {
    $Certs = Get-ChildItem -Recurse Cert:\LocalMachine\My
    $Certs | Add-Member -MemberType NoteProperty -Name SubjectAlternativeNames -Value $null -Force
    $Certs | Add-Member -MemberType NoteProperty -Name TemplateName -Value $null -Force
    $Certs | Add-Member -MemberType NoteProperty -Name TemplateFriendlyName -Value $null -Force
    $Certs | Add-Member -MemberType NoteProperty -Name StorePath -Value $null -Force
   
    foreach ($Cert In $Certs)