devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Creating a Specific Date in Java

To create a new date, you will need a Calendar instance and then you can set the Calendar instance to the date you need. Calendar calendar = Calendar.getInstance(); The line

Try to avoid -XX:+UseGCLogFileRotation

Developers take advantage of the JVM argument -XX:+UseGCLogFileRotation to rotate GC log files. Example: “-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/home/GCEASY/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M” As per above example, JVM will rotate GC log file whenever its size reaches 20MB. It will generate files up to 5 files, with extensions gc.log.0, gc.log.1, gc.log.2, gc.log.3, gc.log.4.

Compress and Decompress SQL Functions

Compress: Compresses input data and returns the binary data of type VARBINARY(MAX) Decompress: Decompresses compressed input binary data and returns the binary data of type VARBINARY(MAX) Here is small example

Using the Hover Effect on an HTML Element

We use the hover attribute to set the hover effect in Web pages within CSS. For example: div {color:#000;}div :hover{color:#f00;} You can apply the transaction property on top of this with

Formatting Output in Java

Proper formatting of output is essential. There are times when the details presented are not formatted. The code snippet below displays details in a formatted manner that is a better

Cast an Int Value to an Enum Value in C#

Oftentimes, the input is an integer that has to be converted to the appropriate enum value. All we have to do is cast the integer value as below: EnumName e

Using a Java File with an Empty Main Method

This is sort of like cheating the Java runtime. Ideally, I believe, starting Java 1.6, you cannot execute Java programs without a standard main method. Prior to that, only the

Logging HikariCP Activity in Spring Boot

See how to log HikariCP activity in Spring Boot. In the application.properties employ the following: logging.level.com.zaxxer.hikari.HikariConfig=DEBUGlogging.level.com.zaxxer.hikari=TRACE

Create a GUID in Visual Studio

There are many cases in which we need to create GUIDs. You can now create them using Visual Studio tools. Go to Tools – Create Guid. This will bring up

Knowing the Privileges of the Current User in MySQL

MySQL has user management and user privileges can be created and modified by the database administrators???or users with administration rights. In my environment, this is the result of the command:

Reading All Lines of a File from Classpath in Java 8

Reading all lines of a file from classpath in Java 8 and display on screen: Files.lines(Paths.get(ClassLoader.getSystemResource(“filename.extension”) .toURI())).forEach(System.out::println);

Transfer Data with JSON in SQL Server

You can transfer data with JSON in SQL Server. Based on an SQL query, you can output the results into JSON format. Here is a small example: DECLARE @JSONOutput NVARCHAR(MAX)

Convert a Byte Array to a Hexadecimal String

The BitConvertor class can convert a byte array to a string in C#, as shown below: string convertedValue = BitConverter.ToString(byteArray).Replace(“-“,””);

Understanding the Unique Keyword in MySQL

At times, we need a certain combination of column values to be unique in a table. With MySQL, this can be achieved using the UNIQUE keyword. There can be a

Select All Elements Quickly in CSS

Use the asterisk (*) symbol as a prefix to select all elements of a selector object and then write your CSS styles on top of it. For example: *div would

Using the Serialver Tool

Java provides a mechanism to know the serialization properties of a given class. Command: serialver -show The above command will bring up a window titled Serial Version Inspector with fields

Creating an HTML Table with SQL

You can create an HTML Table with SQL. You make use of the ‘FOR XML RAW’ and ‘FOR XML PATH’ statements to organize the Table Body (TBODY), Table Header (THEAD)

Using Shorthand Properties in CSS

CSS supports shorthand properties for margin, border properties, etc. For example: margin-top: 1.5em; margin-right: 1em; margin-bottom: 1.5em; margin-left: 1em; could be written in shorthand format as margin: 1.5em 1em 1.5em

Finding All Digits in a Given String

This regex will help you retrieve all the digits that are present in the string. Regex is powerful and makes this a simple procedure. public class FindAllDigitsInString{ public static void

The XML Encoding Trap

String xml = fileUtils.readTextFile(“XMLfile.xml”); It’s not a good idea to read an XML file and store it in a String because it wastes memory. The XML specifies its encoding in

Introducing the APPROX_COUNT_DISTINCT SQL Function

The APPROX_COUNT_DISTINCT?SQL Function became available with SQL Server 2019 Community Technical Preview (CTP) 2.0. APPROX_COUNT_DISTINCT?returns the approximate number of unique non-null values in a group. This example returns the approximate

Auto Start the SQL Server Agent Service

You can ensure that your SQl Server Agent always restarts when the SQL Server restarts by using sp_Configure and xp_cmdshell, as shown underneath: 1. Enabe ‘xp_cmdshell’ — Allow advanced options

Converting a String into a Date

The parse() method from SimpleDateFormat class helps to convert a String pattern into a Date object. DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US);String dateStr = “08/30/2018”; // input StringDate date = dateFormat.parse(dateStr);System.out.println(date.getYear()); There are

Figure Out the Length of Text in a Column in MySQL

Considering the following table STOCKPRICE and its details. CREATE TABLE `STOCKPRICE` (`ID` INT(11) NOT NULL,`NAME` TEXT NOT NULL COLLATE ‘utf8_bin’,`PRICE` INT(11) NOT NULL)COLLATE=’utf8_bin’ENGINE=InnoDB; Also, use the following to create sample

Stimulsoft Dashboards: Powerful Tools for Data Visualization and Analysis

Stimulsoft Dashboards: Powerful Tools for Data Visualization and Analysis Stimulsoft company announces the release of a new tool for business intelligence – Stimulsoft Dashboards for Web and Win. It allows to create rich dashboards for visualization and analysis of key indicators in virtually any field: sales, marketing, finances, manufacturing, services, and more. Stimulsoft company, the manufacturer of software solutions for data analysis and report creation, announces the release of a new product – Stimulsoft Dashboards for Web and Win. It is a powerful tool for creation of dashboards that visualize, transform, group and analyze report data. Stimulsoft Dashboards.WEB Stimulsoft Dashboards.WEB helps developers visualize data in ASP.NET, ASP.NET MVC and .NET Core projects. This powerful solution supports various infographic elements (tables, diagrams, maps and progress indicators), which ensure visual clarity of a dashboard and facilitate data perception. If a developer needs to change the design of a report, Stimulsoft Dashboards.WEB offers a built-in editor that allows to work with both report components and dashboard elements. A full-fledged report viewer supports interactive elements and data filtering, as well as export of dashboards to PDF, PNG and Excel formats. The solution is compatible with .NET 4.0 and higher, MVC 3.0 and higher, .NET Core 2.0 and higher. Stimulsoft Dashboards.WIN With the help of Stimulsoft Dashboards.WIN developers can create ready-to-use dashboards and add them to WinForms apps for the purpose of data analysis. The toolkit of this solution includes a wide variety of widgets: tables, diagrams, pointer indicators, and maps. It is extremely easy to embed such a dashboard into an app – only a few lines of code will do it. By the way, no royalty payments are required for distribution of Stimulsoft Dashboards as part of an app. Stimulsoft Dashboards.WIN also includes an interactive viewer and a handy dashboard designer, which supports MS SQL, Oracle, MySQL, and Firebird sources. The solution is compatible with the platform .NET Framework 4.0 or higher. In the nearest future Dashboards.JS, a similar tool for creating dashboards on the JavaScript platform, will be released. The price of a single developer license starts from 699.95 USD. More detailed information on licenses is available on the purchase page. The online demo-version of the product is available for testing. About Stimulsoft Stimulsoft company provides components for report generation on main development platforms. Among the customers of the company there are SMBs, large corporations, sole traders, educational institutions, sports organizations and government bodies in 130+ countries all over the world. Company website http://www.stimulsoft.com

Using ENUM in MySQL Columns

ENUMs are very powerful definitions and they help attain data validation when the values are pre-defined. With this you can avoid application-level validation or the same can be extracted from