Learned or Solved Something Today?

Dump it here! Let others learn from you

Showing 20 of 103 from page 1

metabox posted in #javascript #java #nodejs #snippets

Beautify Java Code With Prettier In Node.JS | Javascript Example

Prettier is an opinionated code formatter which support many languages. In this example we will see how to prettify java code. NPM Modules We need Prettier Prettier Java NPM Installation npm install s

metabox posted in #sh #snippets #logging

Send Only Docker Logs to Datadog Without Infrastructure Monitoring | Datadog Log Collection

You have a small project of your own. And you want to send your docker logs to datadog. So you ve followed the official page and the command. You are getting logs voila! After a month when you see you

metabox posted in #sql #postgresql #snippets

How To Extract Domain Name From Email Address | PostgreSQL SELECT Query

In this simple SQL query we will see how to select domain name from email address. Extract domain In postgres we can simply use split part function which splits a string on a specified delimiter and r

metabox posted in #sql #postgresql #snippets

SQL Query To Extract URL / Link From Text Content Of Postgres Database Table | Regex Extractor

In this post we will see how simple it is to extract a URL or a link from your text or character varying content. In this example I am using regex for postgres database. Query Simply we are going to u

anonymous posted in #python #snippets

Pagination on Mapillary API to Download Complete Data Using Python

How to paginate through Mapillary API to download complete data inside a bounding box. This will allow you to access the API, specify a layer, set a filter to get only one type of traffic sign or poin

anonymous posted in #rust #snippets

Guessing game from the Rust documentation

This is a copy of the guessing game from the Rust documentation found at https doc.rust lang.org book ch02 00 guessing game tutorial.html

anonymous posted in #postgresql #snippets #database #performance

How Benchmark PostgreSQL Database using pgbench - Performance Test

Benchmarking is the tool of choice for testing and tuning the performance of a relational database management system RDBMS . The open source RDBMS PostgreSQL already offers a number of tools to make l

anonymous posted in #latex #snippets

Demonstrating underbrace | Latex

Demonstrating underbrace as used to denote number of elements in a list or a term in a polynomial without using powers

anonymous posted in #java #exception #snippets

How to Fix MockitoException: Could not modify all classes For Java 13

In java version 13 I ve been facing this issue around Mockito in my spring project which failing test cases Exception Summary Underlying exception org mockito exceptions base MockitoException Could no

dipusultan posted in #c #cpp #snippets #beginners

Program to calculate Root Mean Square Value Using C++

This is a most commonly used program to find the RMS or  Root Mean Square Value Today we will implement it using C so let s start Formula The RMS value is the square root of the mean  average  value o

anonymous posted in #git #error #snippets

error: unknown option 'ahead-behind' [SOLVED]

This fine morning we were facing this error unknown option ahead behind while running this git command from an internal script git status sb ahead behind Problem Well it was a new machine and we found

anonymous posted in #json #snippets

json example for pdt

Since every user has a home tab this one is not present in the return The url s are not correct url s and the names are also not correct An application for which a user has no roles would not be in th

shihab posted in #javascript #error #expressjs #nodejs #mysql #snippets

Solution For: TypeError: require(...) is not a function while using sequelize with express js

Sequelize is a promise based Node js ORM for Postgres MySQL MariaDB SQLite and Microsoft SQL Server We often use this with node express etc while using sequelize with express and mysql we get an commo

shihab posted in #error #solution #snippets #linux #ubuntu

Solution For: Can't find the settings option in Ubuntu 20.04 LTS.

As with every Ubuntu release Ubuntu 20 04 LTS comes with a selection of the latest and greatest software developed by the free software community But after switching from 18 04 to 20 04 i faced a prob

shihab posted in #solution #error #docker #mysql #database #snippets

Solution For "docker-entrypoint.sh: line 83: mysqld: command not found" while running mysql in docker

While I was trying to run mysql database in my local linux machine through docker it was giving me some wired error This is how I solved this My Environment OS Linux Ubuntu 20 04 Docker version 19 03

ikrum posted in #javascript #regex #snippets

Simple Validation Function in Javascript to Check if a String is Valid ROMAN Numeral or Not | Input Validation Using Regex

If you need to validate your input agains roman number then here s a simple javascript validation method to check if the given input is a valid ROMAN numerals or not Trying out our ROMAN number valida

sanjidastar posted in #java #snippets

My First Java Swing Program to Create Simple Input Dialog And Showing a Message

I have created a program for confirm a input dialog box which takes a string and then create another swing dialog to show the input along with my name Reference JOptionPane showInputDialog Shows an in

daniel posted in #graphql #snippets

GraphQL Pagination + Grouping + Filtering + Sorting API Example

GraphQL Pagination Grouping Filtering Sorting API Example GraphQL Pagination Grouping Filtering Sorting API Example

metabox posted in #snippets #postgresql #macos

PostgreSQL server unable to start due to icu4c's | Reason: image not found

Due to new upgrade on Mac my psql server was failing to start due to some mismatch with icu4c version Here s what I did to fix it Impacting services PHP PostgreSQL Error While Running psql dyld Librar

metabox posted in #postgresql #snippets

Database files are incompatible with server | Upgrading PostgreSQL With Existing Data in MAC OSX

Error FATAL  database files are incompatible with server DETAIL  The data directory was initialized by PostgreSQL version 11 which is not compatible with this version 12 4 Solution brew postgresql upg