Java – record is a preview feature and disabled by default. Use –enable-preview to enable [Solution]

To enable preview feature you must define –enable-preview in pom.xml. I’am using java 14

In pom.xml, specify your java compiler version

<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <maven.compiler.source>14</maven.compiler.source>
  <maven.compiler.target>14</maven.compiler.target>
</properties>

Next in pom.xml, Edit like below to add compiler arguments (–enable-preview)

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.0</version>
  <configuration>
    <release>14</release><!--Java Version-->
    <compilerArgs>
      <arg>--enable-preview</arg>
    </compilerArgs>
  </configuration>
</plugin>
<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.22.1</version>
  <configuration>
    <argLine>--enable-preview</argLine>
  </configuration> 
</plugin>

Now execute the below maven command

mvn clean verify 

Thats it. Hope this helps

Flutter | Codepoint 58848 not found in font, aborting | Execution failed for task ‘:app:compileFlutterBuildRelease’.

Codepoint 58848 not found in font, aborting.

FAILURE: Build failed with an exception.

What went wrong:

Execution failed for task ‘:app:compileFlutterBuildRelease’.

BUILD FAILED

Gradle task assembleRelease failed with exit code 1

  • Build with extra flag
flutter build apk --no-tree-shake-icons
  • Build debug apk

Check if build is successful in debug mode

flutter build apk --debug
  • Check pubspec.yaml

Check your pubspec.yaml for any error.

  • Use Flutter Stable Channel
flutter channel stable
flutter upgrade --force
  • Check custom fonts and icons

Try to build after removing custom icons/font or icons/font library. Re-build/re-generate custom icons and try again.

Ubuntu 20.04 – No sound – No Output Device Detected [Solution]

Check information about all PCI buses

sudo lspci
sudo lspci -v
sudo lspci |grep 'Audio'

Install pavucontrol and check all device and configuration is OK.

sudo apt install pavucontrol
pavucontrol
  • Under Configuration tab change Profile
  • Select correct output device.

Reinstalling alsa-base and pulseaudio

sudo apt-get install --reinstall alsa-base pulseaudio
sudo alsa force-reload

Uninstall timidity might help

sudo apt purge timidity-daemon
sudo shutdown now -r

If the Output Device drop-down lists in Sound Settings are empty

sudo apt-get remove --purge pulseaudio
sudo apt-get install pulseaudio
mv ~/.config/pulse ~/.config/pulse_conf_new

Now reboot the system for the changes to take effect.

Ubuntu 20.04 – Firefox – Your browser does not currently recognize any of the video formats available.[FIXED]

Your browser does not currently recognize any of the video formats > available.Click here to visit our frequently asked questions about > HTML5 video.

If this error comes after new installation of Ubuntu, then install

sudo apt install ubuntu-restricted-extras

Or you can uninstall Firefox and manually install the Firefox

Hope this helps!

How to Install Flutter Without Android Studio on Ubuntu

Download and Install the Packages we need

Download flutter from

https://flutter.dev/docs/get-started/install/linux

Download android command line tools from

https://developer.android.com/studio#command-tools

Install Java 8

sudo apt install openjdk-8-jre

Install Git

sudo apt install git

Setup command line tools

Go to the folder where you downloaded the command line tools zip file and open a terminal and type the following

unzip <command_line_tools_downloaded_file_name>
unzip commandlinetools-linux-6609375_latest.zip

Now move the folder you extract to a new folder Android

mkdir Android
sudo mv tools/ Android/

Move the Android folder to home folder.

sudo mv Android/ ~/

Go to your home directory and open the file .profile to add the environment variables.

cd ~/
sudo gedit .profile

At the end of the file, copy the lines below and then save your file.

# Android
export ANDROID=$HOME/Android
export PATH=$ANDROID/tools:$PATH
export PATH=$ANDROID/tools/bin:$PATH
export PATH=$ANDROID/platform-tools:$PATH
# Android SDK
export ANDROID_SDK=$HOME/ANDROID
export PATH=$ANDROID_SDK:$PATH

Setup Flutter

Go to where you downloaded the Flutter at the start and extract it.

tar xvf <flutter_downloaded_file_name>
tar xvf flutter_linux_1.20.1-stable.tar.xz

Move the flutter folder to home directory.

sudo mv flutter/ ~/

Go to your home directory and open the file .profile to add the flutter environment variables.

cd ~/
sudo gedit .profile

At the end of the file, copy the lines below and then save your file.

# Flutter
export FLUTTER=$HOME/flutter
export PATH=$FLUTTER/bin:$PATH

Now all our environment variables are added to profile. To apply them immediately, run the command below:

source ~/.profile

Android Configuration

Now type the command below and press y to accept

sdkmanager --sdk_root=${ANDROID} tools

Now we need to download images, platform, platorm-tools, emulator, build-tools. (For Android 10 in emulator use android-29) (For Android 11 in emulator change to android-30)

sdkmanager "system-images;android-29;google_apis;x86_64"
sdkmanager "platforms;android-29"
sdkmanager "platform-tools"
sdkmanager "patcher;v4"
sdkmanager "emulator"
sdkmanager "build-tools;29.0.2"

Now accept the licenses.

sdkmanager --licenses

Flutter Configuration

Set the path to the Android SDK in flutter

flutter config --android-sdk ~/Android

Check if everything is ok untill now, run

flutter doctor

If you have green check at flutter and android, configurations are successfull. Ignore the Android Studio (not installed). Now we need to create a emulator.

Creating the Emulator

Type the command below and select the device you want and copy its ID.

avdmanager list

To create a emulator, run the command (give it a name and use the device id of the device you selected from last step)

avdmanager -s create avd -n <name> -k "system-images;android-29;google_apis;x86_64" -d <id_device>

To list all available emulators.

flutter emulators

To launch a emulator

flutter emulator --launch <name>

All done!! Now you can start your flutter development journey. GL

Viewing hidden files ( .htaccess, .env) in WinSCP

Options > Preferences > Panels > Show hidden files

OR

ShortCut > Ctrl + Alt+ H

Folders and files that start with a ‘.’ are hidden from view by default. To see these files follow the steps below

  1. Open the WinSCP
  2. From the menu bar select Options > Preferences
  3. Select Panels from the left sidebar
  4. Check the option “Show hidden files (Ctrl+Alt+H)”
  5. All Done

How to check SQL Server version

Connect to the instance of SQL Server, and then type the following query:

Select @@version

Click the Execute button to see the sql version.

Major SQL version numbers


SQL Server Product Name

SQL Server Product Version
SQL Server 20008.0
SQL Server 20059.0
SQL Server 200810.0
SQL Server 2008 R210.5
SQL Server 201211.0
SQL Server 201412.0
SQL Server 201613.0
SQL Server 201714.0
SQL Server 201915.0

To get some more details about SQL server, use this query:

Android: How to launch the Android emulator from the command line

I’m trying to run android emulator from the command line without opening Android studio.

Open command prompt and use the following command. If Android tools and platform-tools is not in the PATH.

cd C:\Android\Sdk\emulator

To get the list of available emulator

emulator -list-avds

To run a emulator from the list:

emulator -avd <name-of-your-emulator>

Eg: emulator -avd Pixel_2_API_29

Cannot uninstall. It is a distutils installed project – SOLUTION

I am unable to install scapy 2.4.0 on my kali linux. Getting this error “ERROR: Cannot uninstall ‘scapy’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.”

Solution

pip install --ignore-installed scapy==2.4.0

This is not directly related to scapy. If you have problem with other packages you can use this :

pip install --ignore-installed <PACKAGE_NAME>

Hope this helps!

Enjoy!

Design a site like this with WordPress.com
Get started