
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.
Symbolic links are a useful entity, with which you can introduce some kind of encapsulation. The Symbolic link can be created in a secure environment (ex: DMZ) where users can
Explore how to convert a string to a byte array. String stringToBeConverted = ” ? ” ;int stringLength = stringToBeConverted.Length;byte[] bytes = new byte[stringLength / 2];for (int counter = 0;
When we need access to a Hibernate Session, we have to unwrap it from the current EntityManager via the unwrap() method as follows: // Spring and Java EE EntityManager em

Avoid using NOT IN whilst comparing nullable columns. Use NOT EXISTS instead. When NOT IN is used in a query, SQL Server compares each result to null (even if no

Avoid using NOT IN whilst comparing nullable columns. Use NOT EXISTS instead. When NOT IN is used in a query, SQL Server compares each result to null (even if no
At times, when you want to compute the result of a mathematical formula, you can use MySQL to do the task. It is a great tool for this. Here are
See below for a short function that validates a given IP address: public static Boolean ValidateIP(string inputIP){var ipParts = inputIP.Split(‘.’);return Int32.Parse(ipParts [0]) < 256 &&Int32.Parse(ipParts [1]) < 256&Int32.Parse(ipParts [2]) <

Please understand that this USER named SRIDHAR is created without a password and is also dangerous. CREATE USER SRIDHAR Alternatively, you can use the code below to create with a
When a repository interface should not be instantiated at runtime, it should be marked with @NoRepositoryBean annotation as follows: @NoRepositoryBeaninterface BaseRepository extends Repository { // CRUD methods that will not

It is best to avoid using the * operator in your queries, use explicit column names instead. SQL Server scans through all column names and replaces the * operator with

It is best to avoid using the * operator in your queries, use explicit column names instead. SQL Server scans through all column names and replaces the * operator with
Here is how to split a concatenated string with a delimiter and remove empty entries. public static void Test() { string concatenatedString = “,ONE,,TWO,,,THREE,,”; char[] charSeparator = new char[] {‘,’};
NULL is a unique value. It represents a value that is not defined and that is not really equal to BLANK (”). While using it in queries, we need to
When you create a new HTML element, you may want to keep its reference and later add a few more properties to it in the script. Just store it in
First, add the following dependency to your project (Maven): com.fasterxml.jackson.datatype jackson-datatype-hibernate5 ${jackson.version} Further, add the following bean: @Beanpublic Module datatypeHibernateModule() { return new Hibernate5Module();}
In order to improve your queries’ performance, you should always include the owner or schema name of an object by including its prefix before an object. Otherwise, the SQL Server
In order to improve your queries’ performance, you should always include the owner or schema name of an object by including its prefix before an object. Otherwise, the SQL Server
Finding the MIME type of a file is useful when you want to perform certain actions. PS: I have placed a file named nature.jpg in the folder /home/sridhar before executing
The .NET System.Globalizaton’s NumberStyles has a parameter called AllowHexSpecifier that helps us to replace a hexString with RGB color. public static Color HexToColor(string hexString){ //replace # occurences if (hexString.IndexOf(‘#’) !=
Consider a table with data as below. + — — — + — — — — — — + — — — — — — +| ID | FIRSTNAME |
The first approach consists of annotating the class as below: @ToString@EqualsAndHashCode@Getter@Setter@RequiredArgsConstructorpublic class Foo { …} A shortcut for @ToString, @EqualsAndHashCode, @Getter on all fields, @Setter on all non-final fields, and
The SQL Server query optimizer processes a JOIN?in the same order as the tables appear in the FROM?clause, when FORCEPLAN?is ON. SET FORCEPLAN ON | OFF
CHECKSUM is a concept that is used to verify if the related files/contents are not tampered with or corrupted. On similar lines, MySQL provides CHECKSUM TABLE to verify the CHECKSUM
BitConverter’s ToString?method can be used to convert a byte array to a string. See below for an example: byte[] byteArray = ?string convertedString = BitConverter.ToString(byteArray).Replace(“-“,””);
Java uses the symbol tilde (~) to represent the operator. The following examples are clearly illustrative of the use and outcome of this operator. Code sample: public class JavaUnary{public static
See how to validate the length of a field in Java via javax.validation.constraints.Size. We can do it as follows: @NotNull@Size(min=3, message=”Name must be at least 3 characters long”)private String name;
Setting ARITHIGNORE?helps to control whether error messages will be returned from overflow or divide-by-zero errors occurring during a query. SET ARITHIGNORE ON | OFF
FileTime is a class in Java that helps you retrieve time-related information regarding files. One such method that we will see below is to get the modified time of a
To change the date format in C#, just use the ToUniverstalTime and the overload formatting as below: String isoFormat = inputDateTime.ToUniversalTime().ToString(“s”) + “Z”;
There are instances in which a user is created according to current requirements. However, as the design progress and requirements freezes or changes, there is a possible need to change











