
Get the First Day of the Current Month
Month-start boundaries show up everywhere in reporting queries, billing cycles, cohort aggregations, and partition pruning. Hard-coding a date string works for one run but quickly rots. Deriving the first day

Month-start boundaries show up everywhere in reporting queries, billing cycles, cohort aggregations, and partition pruning. Hard-coding a date string works for one run but quickly rots. Deriving the first day

Let us consider a table representing employee data with a few columns, and, of course, their salary details as well. It is not wise to expose this table to all
It is quite easy to find the error log location through a quick query such as : SELECT SERVERPROPERTY(‘ErrorLogFileName’) AS ‘Error log file location’  This shows where your Error log file is stored Related Posts Volvo EX30 Electric SUV Arrives in EuropeWalmart Releases OneOps Open Source Cloud Development and ALM PlatformIdentify All the Foreign Keys in Your DatabaseHow To Mirror
DBCC SHRINKDATABASE The command shrinks the size of the data and log files in a database. Here is a small example: DBCC SHRINKDATABASE (Database_Name, 10);  –This allows for 10 percent free space in the database. Related Posts Having a Global Configuration, Parameters, Constants ClassMost retirees unsure of Social Security benefitsUnderstanding the Collections.unmodifiableCollectionFind the Sign of a Number in C#Challenges and Excitement in
You can use the following command to monitor all your databases’ log file’s free space DBCC SQLPERF (‘LOGSPACE’) Related Posts Transforming side jobs into sustainable entrepreneurshipLimiting the rows returned – MySQLDetach from a Docker Container and Leave it RunningUsing the SQL LCASE FunctionUsing Symbolic Links in

Java’s modern HttpClient (introduced in Java 11, fully stable through Java 21 and 25) is the canonical way to issue HTTP requests from server-side Java. For a simple synchronous GET,
Use the math module???s isfinite method to determine if a value is finite or not.  If it is not a number, the function returns false. See below for an example:math.isfinite(10) returns True Related Posts OnePlus Watch 2R impresses with affordabilityCloudFoundry Announces PaaS Certification ProgramGitHub Adds Project Management FeaturesIBM Cloud Computing Revenue Climbs 30%Accessing and Managing Third-Party Libraries
At times, we want to run our code only if the version of Python engine is above a certain version. See below for sample code. Import sysversion = sys.version Related Posts Using FILEPROPERTY to Check for Free Space in a DatabaseDatabricks Adds Deep Learning and GPU Acceleration to SparkLiquid Web Buys Rackspace’s Cloud Sites UnitHP Debuts Distributed
Python can return multiple values at a time. See below for a simple example. def multipleValueFunc():     z = 11     b = 22    return z, b  j,k  = multipleValueFunc () print(j, k) Related Posts Is anyone faster than Devart? Support for MySQL v8.0 is already in dbForge StudioAvoid Repeated Execution of LINQ Queries in C#Getting the Last ID in MySQLComparing
Use the rstrip method to return the string with all occurrences of the trailing characters removed. For e.g. inputString = “devxyyy”inputString.rstrip(???y???) gives ???devx??? Related Posts IBM Launches Globalization Pipeline App Translation ServiceAsync Query ResultsFormat the Currency for a Culture in C#Apple announces iPhone 16 event for SeptemberEFCC raids night clubs in
Its pretty ease to reverse a string in Python. ???Devx Jan???[::-1]  gives ???naJ xveD??? Related Posts Docker 1.12 Offers Full Mac and Windows VersionsImprove Performance of Web Pages with CSS3 StylesRESEED Identity Columns of All TablesMicrosoft Releases Team Foundation Server 2015Tech Sector Turmoil:

A tiny refactor that has survived every Java version from 8 to 25: flip the null check. To guard against a NullPointerException when comparing a string to a literal, most

MySQL has several ways to locate a substring, and FIND_IN_SET is the right pick when your data is stored as a comma-separated list in a single column. It returns the

Get all the tables with a count of their records with the following query: CREATE TABLE #Temp ( TableName VARCHAR(MAX), Rows INT ); EXEC sp_MSForEachTable @command1 = ‘INSERT INTO #Temp(TableName,

Some .NET namespaces are unavoidably long, especially around COM interop and older libraries. C# lets you alias them at the top of a file so the rest of your code

The following code shows you how to compute the n Fibonacci number recursively: int fibonacci(int k) { if (k return k; } return fibonacci(k – 2) + fibonacci(k – 1);}

We use a lot of ng-templates in our HTML and have cases where we would need to swap one with another based on a condition. ngSwitch comes handy in this

We know that AUTO_INCREMENT is used to have a sequential value auto incremented by itself for the records that we insert. CREATE TABLE AUTO_TABLE (ID INT NOT NULL AUTO_INCREMENT,PRIMARY KEY

SQL injection is probably the most common and easiest hacking technique out there. Now, don’t think I condone it, I’m just trying to make you aware of some of the

SQL injection is probably the most common and easiest hacking technique out there. Now, don’t think I condone it, I’m just trying to make you aware of some of the

Automation of tasks is a good concept. Consider the example below in which you create a task and schedule it at your convenience to execute the needed actions. There are

Java arrays are not resizable. But we can work around this constraint with the following trick. int[] newArr = Arrays.copyOf(arr, arr.length + 1); Related Articles Automation of Tasks Terminating the

Just add a border-radius over the image element. See below for an example. . round {width: 100px;border-radius: 100%;} Related Articles Use ngSwitch Directive to Set the Contents of an Element

Amid tons of data, finding a particular string’s presence in the data is extremely tedious. MySQL has a command named LOCATE that can be used with certain conditions and the

SQL injection is probably the most common and easiest hacking technique out there. Now, don’t think I condone it, I’m just trying to make you aware of some of the

SQL injection is probably the most common and easiest hacking technique out there. Now, don’t think I condone it, I’m just trying to make you aware of some of the

You can terminate the Java runtime that you are in programmatically. The Java Runtime class provides a method halt(argument) to support this. Of course, caution is advised when using this

With the Java Reflection API, we can isolate the abstract methods from a class via the following snippet of code: List abstractMethods = new ArrayList();Class clazz = Foo.class;Method[] methods =

MySQL provides you a mechanism to find the current user. SELECT USER(), CURRENT_USER(); This command comes handy when you have associated a proxy privilege to a user. Sample: mysql SELECT
We understand how equals() method works. There is a more elaborate method deepEquals() which compares in depth details during comparison.Basic usage is described below. Let us explore more using these as examples. import java.util.Objects; public class DeepEquals{   public static void main(String args[])   {      DeepEquals deepEquals = new DeepEquals();      deepEquals.proceed();   }      private void proceed()   {      System.out.println(“Objects.deepEquals(1,1): ” + Objects.deepEquals(1,1));      System.out.println(“Objects.deepEquals(1,2): ” + Objects.deepEquals(1,2));      System.out.println(“Objects.deepEquals(“abc”,”abc”): ” + Objects.deepEquals(“abc”,”abc”));      System.out.println(“Objects.deepEquals(“aa”,”ab”): ” + Objects.deepEquals(“aa”,”ab”));   }} /* Expected output: [root@mypc]# java DeepEqualsGetting handle of runtime ConsoleGot handle of runtime ConsoleYou can now use runtimeConsole object to perform actions of your choice on java.io.Console */ Related Articles Get the Abstract Methods of a Class Automation of Tasks Terminating the Current Java Runtime Programmatically Related Posts Booking.com reports 900%