How to persist Pinia variables in vue js

In command prompt enter the command npm i pinia-plugin-persistedstate Add the plugin to pinia import { createPinia } from ‘pinia’ import piniaPluginPersistedstate from ‘pinia-plugin-persistedstate’ const pinia = createPinia() pinia.use(piniaPluginPersistedstate) Add the persist option to the store you want to be persisted: import { defineStore } from ‘pinia’ export const useStore = defineStore(‘store’, { state: ()… Continue reading How to persist Pinia variables in vue js

Handling String Comparison Issues Caused by HTML Encodings and Line Breaks

Overview During implementation, we encountered an issue where string values were not matching correctly due to inconsistencies in how they were stored and compared. Specifically: Some values contained HTML entities like &lt; and &gt; instead of < and >. Some values included HTML line breaks (<br>), carriage returns, or multiple spaces. As a result, direct… Continue reading Handling String Comparison Issues Caused by HTML Encodings and Line Breaks

Disable Note Tab and Email Tab In Edit Mode OF Parent Reocrd

Create a virtual field and inject this code  “DEFAULT_VALUE” : `            <style>             #newhist, #newmessage, #addmessage, #newmail, #newpdf, #newfax,             #refreshmessages, #messagehistory {              opacity: 0.5 !important;              cursor: default !important;             }            </style>            <script>             (function () {              function neutralizeElement(el) {               if (!el) return;                           el.disabled = true;               el.style.opacity = ‘0.5’;               el.style.cursor = ‘default’;               el.style.pointerEvents = ‘auto’;                           [‘click’, ‘mousedown’,… Continue reading Disable Note Tab and Email Tab In Edit Mode OF Parent Reocrd

MatCaps

MatCap (Material Capture, also known as LitSphere) are complete materials, including lighting and reflections, so you can add it to an object and not have any need for, well, lighting and reflections. MatCaps allows you to create a surface material and lighting environment simply by painting an object so that it looks like how you want your… Continue reading MatCaps

Fluid Engine

The general Architecture of the engine is as follows: it has a Fluid Simulator class, which you need to properly initialize before use, and deintialize before you switch out of the scene or close the game, and Fluid GPU Resrouce class, where you need to do the same. Once you have the initialization behind you, you can build a… Continue reading Fluid Engine

Styling Console Logs

Provided is a sample code used to style the console logs console.log(‘%cStyled Log’, ‘color: blue; font-size: 20px;’);

Trigger Last Modified Date when email is sent and received via Email Tab

 function checkForParameter(parameter) {             try {                 if (parameter !== “” && parameter !== null && parameter !== undefined && parameter !== false && parameter !== “null” && parameter !== “undefined” && parameter !== ” “ && parameter !== ‘false’ && parameter !==… Continue reading Trigger Last Modified Date when email is sent and received via Email Tab

Some JavaScript functions that can significantly optimize the primitive approaches programmers might use for certain tasks:

reduce const numbers = [10, 20, 30]; const sum = numbers.reduce((total, num) => total + num, 0); console.log(sum); // 60 fromEntries const obj = { a: 1, b: 2, c: 3 }; const transformed = Object.fromEntries(   Object.entries(obj).map(([key, value]) => [key, value * 2]) ); console.log(transformed); // { a: 2, b: 4, c: 6 }… Continue reading Some JavaScript functions that can significantly optimize the primitive approaches programmers might use for certain tasks:

How Async/Await Can Slow Down Your Node.js App

n the world of Node.js, async/await has become a staple for handling asynchronous operations. It’s clean, easy to read, and feels synchronous. But as wonderful as it sounds, misusing async/await can introduce performance bottlenecks that slow down your application. If your app feels sluggish despite using async/await, this post is for you. Why Async/Await Feels Slow Under the hood,… Continue reading How Async/Await Can Slow Down Your Node.js App