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

finding right tech

How to Find the End of a File in Java

Easily find the end of file that you are processing. Scanner again has a easier way of doing it. import java.util.*;import java.io.*;public class EndOfFile { public static void main(String args[])

How to Escape Curly Braces in C#

To escape curly braces in c#, use double curly braces. See the example below. var stringWithCurlyBraces = string.Format(“Good {{ ???{0}??? }}”,”example”);Console.Write(stringWithCurlyBraces);//will output Good { ‘example’ }

Create a Snapshot of Your Database

In order to create a Snapshot of your database, you can use the following code: DECLARE @DBName VARCHAR(100) = ‘DBName’DECLARE @CurrentDate VARCHAR(20)SET @CurrentDate = ‘_’ + CONVERT(VARCHAR(20), GETDATE(), 120)SET @CurrentDate

HTML Input Placeholder Attribute

The HTML5 attribute allows you to display a hint value describing what is expected as the field value in a form. This attribute works on the following types of entries:

Interesting Java.lang.Math Class

public class UsingLangDotMath {    final int TWENTY_SEVEN = 27;        public static void main(String args[])    {       UsingLangDotMath usingLangDotMath = new UsingLangDotMath();       usingLangDotMath.proceed();    }        private void proceed()    {       System.out.println(“Cube root of 27: ” + Math.cbrt(TWENTY_SEVEN));       System.out.println(“Trigonometric sine: ” + Math.sin(TWENTY_SEVEN));       System.out.println(“Trigonometric cosine: ” + Math.cos(TWENTY_SEVEN));       System.out.println(“Trigonometric tangent: ” + Math.tan(TWENTY_SEVEN));           } } /* Expected output: [root@mypc]# java UsingLangDotMath Cube root of 27: 3.0 Trigonometric sine: 0.956375928404503 Trigonometric cosine: -0.2921388087338362 Trigonometric tangent: -3.273703800428119 */

Daemon Threads in Java

Did you know that execution of a Java program will continue only when there is at least one user thread running? In cases in which there are no user threads,

Identify Tables Without an Identity Column

The following query will enable you to list all the tables in your database that doesn’t have an IDENTITY Column: SELECT SysSchemas.name + N’.’ + SysTables.name FROM sys.tables AS SysTables

Custom software examples

What makes companies order custom software development despite it may cost them a fortune? Properly designed and developed, custom software becomes an optimal solution to the customer???s business challenge, providing them with useful features only. What is more, custom software allows flexibility to introduce any changes required. This way it is possible to rebuild the existing solution to make it correspond to updated requirements. As a result, a business opting for custom software gains a competitive advantage over their rivals sticking to off-the-shelf solutions with their rigid and limited functionality. Let???s look at several custom software examples to understand the benefits brought by custom software. To keep pace with the Automation age, businesses strive to apply automation technologies to increase the efficiency of their processes and conduct them without human assistance. Consider the following projects based on the automation technologies.   

Using Calendar.getInstance()

Calendar c = Calendar.getInstance(); c.set(2017, Calendar.OCTOBER, 29);  This code behave as a Gregorian calendar, but if the returned Calendar subclass is a Islamic, Julian, Buddistic or Hebrew calendar, then the month called October or the year 2017, doesn’t exist. Calendar.getInstance() uses the current default locale to select an appropiate implementation. The utility of Calendar.getInstance() is very limited  and it should be avoided because it’s results is not properly defined. Calendar c = new GregorianCalendar (timeZone); c.set(2017, Calendar.OCTOBER, 29); 

Clip an Image Using CSS with the CLIP Property

Images with absolute positioning can be clipped very easily with the CSS Clip property. The syntax is as below. .clippedImageStyle { position: absolute; clip: rect(100px, 150px, 175px, 30px);}

Avoiding the HashMap Size Trap

Map map = new HashMap(collection.size());for (Object obj : collection) { map.put(obj.key, obj.value);} The code above wants to make sure that the HashMap doesn’t need to be resized, so its sets

How to Turn on TLS Versions Without Affecting Earlier Versions

We can use “|=” and configure the ServicePointManager’s SecurityProtocol to turn on the TLS versions and thereby not remove support for other protocols. System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

Random Number Generation Using Java

We can use the Random class available in the java.util package to generate random numbers. The code sample below demonstrates generation of a random number with an upper limit. Listing

Knowing the Version and Supported Engines in MySQL

The following commands are handy to know the current version and the supported engines in the MySQL. Command: SELECT VERSION()Output: 5.6.31-enterprise-commercial-advanced-logCommand: SHOW ENGINESOutput: InnoDBCSVMyISAMBLACKHOLEMEMORYFEDERATEDARCHIVEMRG_MYISAMPERFORMANCE_SCHEMA

Do Not Assume SimpleDateFormat Is Thread-safe

The code below is improper because it shares a static instance of a SimpledateFormat with any possible number of threads. Public class Constants { Public static final SimpleDateFprmat date =

Decompile Code from a .NET Executable

We often lose the source code of the executables we build. If we have the executable with us, we can still retrieve the code using tools such as ILSpy. You

Finding a Boolean that Is Part of an Input String

Ever wanted to find a boolean that is available as part of the input string? The following code snippet helps you do it quickly. import java.util.*;public class ScannerUtils { public

Research Cosmos | Market Research Reports, Business Research, Industry Research, Market Intelligence, Syndicated research, custom research and consulting

Research Cosmos offers wide range of Research Services but our main strength lies in the off-the-shelf reports category wherein leveraging the humongous industry network that we possess, we can deliver syndicated research reports at our promised standards. We deliver ultimate quality products, which are procured using, advanced information management tools, sophisticated analytical systems, and methodologies, which in turn provide you with crucial industry information for decision-making. Browse-https://www.researchcosmos.com/

Extract All Numbers from a String in SQL

In SQL you can use PATINDEX (which makes use of Regular Expressions) to extract all the numbers from within a string as shown: DECLARE @strNumbers VARCHAR(100) = ‘I was born

Catching to Log in Java

The code below catches the exception to write out a log statement and then re-throws the same exception. It is recommended to let the caller decide if the message should

Learn Some Efficient Programming Practices

Avoiding null pointer exceptions is a good programming practice. However, simple things such as string comparison can also lead to null pointer exceptions. Considering the following: You have a constant

Cycle Taskbar Icons in Windows

The default taskbar notification area icons appear over-crowded at times. You can reposition the icons to suit your choice and usage. To do this, select an icon with your left

Taskade ??? collaborative task list and outliner

Happy holidays, We built a a simple and collaborative task list for teams, a friendly space for smart lists and outlines called Taskade (https://taskade.com) Any feedback would be amazing!! Our Mac & Windows App: https://taskade.com/downloadsOur Chrome Extension: http://goo.gl/E4zh25  Thanks and have a great week ???

Creating a Link to a File in Java

There are times when we need to reflect the changes made to a file in a different file as well. Mostly, they are made available in a common place so