
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.
Eclipse Memory Analyzer (MAT) is a powerful tool for heap dump analysis. It has several great features to debug memory problems effectively. ‘Incoming references’ and ‘outgoing references’ is one such
See how to empower MySQL to send the batched statements in a single request???or as much as possible in a single request: via rewriteBatchedStatements = true:JDBC URL = …?rewriteBatchedStatements=true
SQL Server automatically loads the data it needs to work with into its cache. This is called pages. These data pages stay in SQL Server’s cache until there is no
You can use the SHA1Managed class and compute hash for an input string as shown below. It is done in two steps. First, is to get the byte array after

Using error: Class names, ‘YourClassName’, is only accepted if annotation processing is explicitly requested. There are likely instances that you have come across this error and found it very difficult
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
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: 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
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
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
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
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
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
There are two ways to prevent your SQL code from running on a testing or production server. You can use the @@SERVERNAME Variable or the DB_NAME function, as shown next
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

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 and display on screen: Files.lines(Paths.get(ClassLoader.getSystemResource(“filename.extension”) .toURI())).forEach(System.out::println);
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)
The BitConvertor class can convert a byte array to a string in C#, as shown below: string convertedValue = BitConverter.ToString(byteArray).Replace(“-“,””);
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
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
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

Use the code sample below to use Java to find the number of CPU cores. int cores = Runtime.getRuntime().availableProcessors();
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)
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
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

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
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

Take a look at the following ng-repeat code example: This is inefficient, as the DOM is rendered every time the list is written to the page. Add the track by
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











