Hello, Javaniceday!

Reading Time: < 1 minute
  • 5 reasons to host your images on Cloudinary

    Reading Time: 3 minutes Overview Image and video management are present in almost all of our projects. I would like to share my experience with this. As a newbie developer, you think you are resolving a problem for the very first time and nobody faced it in the past. Now, as an experienced Engineer, I… Read more

  • Clean up more than two spaces and new lines with regex

    Clean up more than two spaces and new lines with regex

    Reading Time: < 1 minute Regular expressions are those I don’t use so frequently so I need to wrap them all in a method with a short explanation about what they do. So I created a simple JavaScript method that removes all newlines and multiple spaces (including tab spaces) by a single space Read more

  • Migrate sforce.connection.query to Lightning equivalent

    Reading Time: 2 minutes As you probably know, JavaScript buttons are not supported in Lightning Experience (LEX). In particular, you can’t use REQUIRESCRIPT. In this post, the idea is to show how to migrate a particular JavaScript button that uses sforce.connection.query sentence. Suppose our JavaScript button is like this: {!REQUIRESCRIPT("/soap/ajax/37.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/37.0/apex.js")} var query ="SELECT Id,… Read more

  • How to add a pie chart in Campaign’s record page in Salesforce

    Reading Time: 2 minutes What about if we add a component with a pie chart on the Campaign object’s record page? It’s very useful to see how the campaign is going in terms of leads’ statuses. So we want to know the percentage of leads converted, not converted, contacted, etc. I will use Lightning in… Read more

  • Install Postgres locally in MacOS

    Reading Time: < 1 minute Install using Brew package manager brew update brew install postgres Config file /usr/local/var/postgres/postgresql.conf Useful commands brew services start postgresql brew services restart postgresql brew services stop postgresql psql command “psql is a terminal-based front-end to PostgreSQL. It enables you to type in queries interactively, issue them to PostgreSQL, and see… Read more

  • How to connect to a PostgreSQL database in Node.js

    How to connect to a PostgreSQL database in Node.js

    Reading Time: 2 minutes A simple example about how to connect to a PostgreSQL database using Node.js Let’s create a folder to host our example. Open a terminal and type: mkdir node-js-postgresql Enter to the folder cd node-js-postgresql Use package.json generator. Follow the steps npm init npm install Install pg module in our project npm… Read more