Install CodeChecker Linux

# Install CodeChecker
Source: https://github.com/Ericsson/codechecker?tab=readme-ov-file

## Install base application
Can be installed using python:

```
$ python -m pip install codechecker
```

You need to install some of the supported analyzers like _cppcheck_ and _clangsa_.

```
$ sudo apt install cppcheck clang
```

## Usage
Generate analysis data:

```
$ CodeChecker check -b "cd ~/your-project && make clean && make" -o ./results
```

You can visualize the results as static HTML by executing

cte -NADC dups

CREATE TEMP TABLE dup_ref_acc_no (lpnot VARCHAR);
\copy dup_ref_acc_no FROM 'webpas_topas_NADC_splits_lpnot';

WITH extracted_data AS (
    SELECT
        tmp.lpnot,
        np.lpno,
        ds.did,
        data #>> '{0,raw_gname,0}' AS gname,
        data #>> '{0,raw_sname,0}' AS sname,
        data #>> '{0,dob,0}' AS dob,
        ltrim(data #>> '{0,ref_acc_no,0}','0') AS ref_acc_no,
        data #>> '{0,ref_rec_date,0}' AS ref_rec_date,
        data #>> '{0,hospcode,0}' AS hospcod

Disconnect DB after Test Done

Disconnect DB after Test Done
# Disconnect DB after Test Done

环境:

- Jest
- Postgres
- Knex

如果不断数据库连接,测试完成后会报:

```txt
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
```

解决方法:

```js
// Knex setting file
const config = {
  client: 'pg',
  connection: {
    host: process.env.DB_HOST || 'localhost',
    user

installed for J

abseil is already installed.
aom is already installed.
apr is already installed.
apr-util is already installed.
argon2 is already installed.
aribb24 is already installed.
aspell is already installed.
assimp is already installed.
autoconf is already installed.
bat is already installed.
bison is already installed.
broot is already installed.
brotli is already installed.
btop is already installed.
c-ares is already installed.
ca-certificates is already installed.
cairo is already installed.
capston

macOS setup

#!/usr/bin/env bash

# ~/osx.sh — Originally from https://mths.be/osx

# Ask for the administrator password upfront
sudo -v

# Keep-alive: update existing `sudo` time stamp until `osx.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

###############################################################################
# General UI/UX                                                               #
##########################################################

coi0te

inicio{
"host":"qKKgK2Xk/gHk2GkeIQyhla3Rsikk",
"portacmd":"Lw/EBZ/y2rSUk3tx",
"portaimg":"ie+1570iX8Kl5w==",
"pronto":"RlUKy4l8k2P+NI0=",
"ipv":"T7fcOpUzbaUY",
"contador":"3xeTet35kORvYkdtgk6NStgS9gp/VlnjWSZovxJLyfKWjfLWKOZarJQ8fBJqkxp58u8y6gvPbQ9xnA==",
"chaveid":"6P2ZSN81aoCCVYoh",
"spammer":"eLTv+L9oIWy76tXC"
}fim

RegisterController.js

an example of how to register a new user , with email and password in express,js
const User = require('../model/User');
const bcrypt = require('bcrypt');

const handleNewUser = async (req, res) => {
    const { user, pwd } = req.body;
    if (!user || !pwd) return res.status(400).json({ 'message': 'Username and password are required.' });

    // check for duplicate usernames in the db
    const duplicate = await User.findOne({ username: user }).exec();
    if (duplicate) return res.sendStatus(409); //Conflict 

    try {
        //encrypt the password
        const hashedPw

swiper js library

<div class="slider swiper">
  <div class="swiper-wrapper">
    <div class="swiper-slide">Slide 1</div>
    <div class="swiper-slide">Slide 2</div>
    <div class="swiper-slide">Slide 3</div>
  </div>
  <div class="swiper-pagination"></div>
  <div class="swiper-button-prev"></div>
  <div class="swiper-button-next"></div>
  <div class="swiper-scrollbar"></div>
</div>

1208. Get Equal Substrings Within Budget

You are given two strings s and t of the same length and an integer maxCost. You want to change s to t. Changing the ith character of s to ith character of t costs |s[i] - t[i]| (i.e., the absolute difference between the ASCII values of the characters). Return the maximum length of a substring of s that can be changed to be the same as the corresponding substring of t with a cost less than or equal to maxCost. If there is no substring from s that can be changed to its corresponding substring from t, return 0.
/**
 * @param {string} s
 * @param {string} t
 * @param {number} maxCost
 * @return {number}
 */
var equalSubstring = function(s, t, maxCost) {
    // Initalize two pointers for the sliding window
    let start = 0, end = 0;

    // Iterate ove the string 's'
    for (end = 0; end < s.length; end++) {
        // Subtract the cost of changing s[end] to t[end] from maxCost
        maxCost -= Math.abs(s.charCodeAt(end) - t.charCodeAt(end));

        // If maxCost is negative, move the start pointer

address html

<address class="footer__contacts-body">
  <p>Email: <a href="mailto:info@positivus.com">info@positivus.com</a></p>
  <p>Phone: <a href="tel:5555678901">555-567-8901</a></p>
  <p>
    Address: 1234 Main St<br />
    Moonstone City, Stardust State 12345
  </p>
</address>

setCaretPositionToStartSafari17 | set Caret Position To Start Safari 17 | Установка каретки в input на опрделённую позицию в Safari 17

import setCaretPosition from '/src/utils/setCaretPosition'

export default function(e) {
  let pos = e.target.value.search(/.(?=[^\d]*$)/)
  if (pos < 4) {
    // !@note асинхронный обход бага vue-imask на safari 17.1 когда при первом фокусе на vue-imask он ставит курсор в конец инпута телефона    
    setTimeout(() => {
        setCaretPosition(e.target, 4)
    }, 1)
  }
}

tooltip with tippy.js

<button data-tippy-content="Tooltip">Text</button>

checkbox button css

<label class="checkbox">
  <input class="checkbox__input visually-hidden" name="checkbox-name" type="checkbox" value="" checked>
  <span class="checkbox__emulator">
    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.5858 13.4142L7.75735 10.5858L6.34314 12L10.5858 16.2427L17.6568 9.1716L16.2426 7.75739L10.5858 13.4142Z" fill="currentColor"/></svg>
  </span>
  <span class="checkbox__label">Label</span>
</label>
<label class="check

radio button css

<label class="radio">
  <input class="radio__input visually-hidden" name="radio-name" type="radio" value="" checked>
  <span class="radio__emulator"></span>
  <span class="radio__label">Label</span>
</label>
<label class="radio">
  <input class="radio__input visually-hidden" name="radio-name" type="radio" value="">
  <span class="radio__emulator"></span>
  <span class="radio__label">Label</span>
</label>

switch css

<label class="switch">
  <input
    class="switch__input visually-hidden"
    name="switch-name"
    type="checkbox"
    value=""
    checked
  />
  <span class="switch__emulator"></span>
  <span class="switch__label">Label</span>
</label>
<label class="switch">
  <input
    class="switch__input visually-hidden"
    name="switch-name"
    type="checkbox"
    value=""
  />
  <span class="switch__emulator"></span>
  <span class="switch__label">Label</span>
</label>

tabs javascript

<div class="tabs" data-tabs>
  <h3 class="tabs__title" id="tabs-title">Title</h3>
  <div class="tabs__buttons" role="tablist" aria-labelledby="tabs-title">
    <button
      class="tabs__button is-active"
      id="tab-1"
      type="button"
      role="tab"
      aria-controls="tabpanel-1"
      aria-selected="true"
    >
      Tab
    </button>
    <button
      class="tabs__button"
      id="tab-2"
      type="button"
      role="tab"
      aria-controls="tabpanel-2"
      aria-selected="fals