How to use kotlin-bom?
In Kotlin, a bill of materials is a more centralized way to manage dependencies. This allows you to specify a set of dependencies and their versions in one place, making it easier to manage and update dependencies across your projects.
To use Kotlin BOM, you typically follow these steps:
Add the BOM Dependency to Your Build File:
You need to add the BOM dependency to your build file. If you’re using Gradle, you can add it like this:
implementation platform("org.jetbrains.kotlin:kotlin-bom:1 ...
Hexo Cannot GET /
Check config yaml
check your _config.yml
url: https://www.webmanajemen.com/
root: /
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: '/'
per_page: 10
order_by: -updated # updated | date | -date | -updated
pagination_dir: page
Check the URL and Paths:
Ensure that you are accessing the correct ...
Detect NodeJS if called using import or directly
CommonJS
CommonJS modules can use the require.main object to determine whether the module is executed directly or imported. The require.main object is the main module that started your Node.js application.
// CommonJS
// main.js
if (require.main === module) {
// This script is being run directly
console.log('This script is the main module.');
} else {
// This script is being imported as a module
console.log('This script is being imported as a module.' ...
How to exclude anoying tags in intellij idea or android studio
In IntelliJ IDEA and Android Studio, you can exclude specific log tags in the Logcat view. Here’s how you can do it:
Open Android Studio or Intellij IDEA.
Go to Tools > Android > Logcat.
In Logcat, seek for options related to “Ignore Tags” or “Ignored Log Tags”.
Add a list of tags that you want to ignore, by separating it using spaces or commas.
HardwareCodecCapability AudioCapabilities OpenGLRenderer ViewRoot ForceDarkHelper Looper PlayCore AudioTrack SurfaceUtils cr_ChildProcessConn F ...
Fix Undefined function str_starts_with and str_ends_with
Uncaught Error: Call to undefined function str_starts_with() Fix Solutions
if (!function_exists('str_starts_with')) {
function str_starts_with($haystack, $needle, $case = true)
{
if ($case) {
return strpos($haystack, $needle, 0) === 0;
}
return stripos($haystack, $needle, 0) === 0;
}
}
Example with the empty string
<?php
if (str_starts_with('abc', '')) {
echo "All strings start with the empty str ...
Fix Error NodeJS Windows Visual Studio
Install Microsoft Visual Studio Code 2019
Install Module C++
* Type below codes to your terminal (administrator)
npm i -g --production windows-build-tools
npm config set msvs_version 2019 --global
npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
Git Login Via Command Line
git config --global user.name myusername
git config --global user.email myemail
git config --global github.user myusername
git config --global github.token mytoken
NodeJS Common Fix Command On Linux Or Windows
Linux
# add new repository
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update -y
sudo apt install libgtk-3-0 -y
sudo apt install software-properties-common checkinstall -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev build-essential libncurses5-dev libgmp-dev libnss3-dev wget -y
# nodejs additional packages
npm install --global lerna node-pre-gyp typescript
# python 2.7
sudo apt i ...
[PHP] Detect User Client IP XAMPP or Localhost
Snippet get real visitor/user ip (support localhost XAMPP)
/**
* Detect is localhost
*
* @return boolean
*/
function isLocalHost()
{
$whitelist = [
'127.0.0.1',
'::1',
];
return in_array($_SERVER['REMOTE_ADDR'], $whitelist);
}
/**
* Get client ip, when getenv supported (maybe cli)
*
* @return string
*/
function get_client_ip()
{
$ipaddress = '';
if (isLocalHost()) {
$ipaddress = getLocalIp();
} el ...
Fix The inferred type of X cannot be named without a reference
If you’re experiencing a TypeScript mistake related to module determination or sort induction.
The blunder message recommends that the sort of ‘X’ cannot be named without a reference to ‘path/from/node_modules’, and it may not be convenient.
To resolve this issue, you’ll have to be give a type annotation for ‘X’ or adjust your module determination settings.
Here are a few of methods you’ll be able take:
Sample problem
For example I will resolve these error
The inferred type of 'loadSavedCre ...