To install nodemon globally on Linux, below command:$ npm install -g nodemon <enter> will not work as it requires root privileges. If it is installed with :$ sudo npm install -g nodemon <enter> it will install on the local machine in the root folders. If we do not want to install it globally on our … Continue reading How to fix global nodemon node package install error on Linux
Tag: code
How to fix issue if autocomplete or intellisense does not work in vscode for express.js
If the below line is used in the javascript code:const express = require(express); then autocomplete / intellisense will not work. It will not display the relevant methods as shown in the image below. This is the correct code to use:const express = require("express"); The quotation marks make the difference and the following image shows the … Continue reading How to fix issue if autocomplete or intellisense does not work in vscode for express.js
How to resolve Dependency ‘androidx.appcompat:appcompat:1.4.1’ requires ‘compileSdkVersion’ to be set to 31 or higher.Compilation target for module ‘:app’ is ‘android-30’
I had the below problem when building code for an older version of Android on Android Studio. Dependency 'androidx.appcompat:appcompat:1.4.1' requires 'compileSdkVersion' to be set to 31 or higher.Compilation target for module ':app' is 'android-30' I was able to solve it by changing the version of appcompat in the dependencies What I had: implementation 'androidx.appcompat:appcompat:1.4.0' I … Continue reading How to resolve Dependency ‘androidx.appcompat:appcompat:1.4.1’ requires ‘compileSdkVersion’ to be set to 31 or higher.Compilation target for module ‘:app’ is ‘android-30’
Great resources for coders or developers
All things developers and development articles can be found at https://dev.to. Best site for coders and developers https://www.freecodecamp.org. Here's a great article on one resume that was exceptional https://cloudirregular.substack.com/p/the-greatest-resume-ive-ever-seen?s=r. Learn to code for free with Google's Grasshopper app https://grasshopper.app. Get it from the Google Play Store.
How to close the program in Java completely in Swing
A Java Swing application can be closed using the following code segment to retrieve the parent of the container, check if it is a JFrame and then dispose the JFrame: public class btnCancelListener implements ActionListener { public void actionPerformed(ActionEvent ev) { Container bframe = btnCancel.getParent(); bframe = bframe.getParent(); while (! (bframe instanceof JFrame)) { System.out.println("Done"); … Continue reading How to close the program in Java completely in Swing
How to restrict size of JButton in GridLayout in Java
If you put the following code in Java with only the lines in blue in your Java Swing program, you will find that whenever the Java dialog is resized, the button grows and looks ugly as it occupies the full row of the GridLayout. Code Segment as below. parameterPanel.setLayout(new GridLayout(2,1)); JButton parameterButton = new JButton("Parameters"); … Continue reading How to restrict size of JButton in GridLayout in Java