Order By Descending with Null Values First

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

86 Views

To order by a field and list the NULL values first, you need to use the following syntax. This will order in descending order −select yourColumnName from yourTableName group by yourColumnName is null desc, yourColumnName desc;To understand the above syntax, let us first create a table −mysql> create table OrderByNullFirstDemo    −> (    −> StudentId int    −> ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table with the help of insert command. The query is as follows −mysql> insert into OrderByNullFirstDemo values(100); Query OK, 1 row affected (0.13 sec) mysql> insert into OrderByNullFirstDemo ... Read More

Daily Routine of an Average Person

Madhuparna
Updated on 30-Jul-2019 22:30:24

152 Views

Are you tired of popular social networking sites like Facebook or Instagram? Here are a few upcoming websites just like Instagram or Facebook you would love to try:PathIt is one other app for social networking purposes that lets you connect with the closest people. The only difference between Facebook and Path is the scope of connectivity. The Path app does not connect you with strangers; it connects you with family and closest friends.TumblrOne platform that is mainly driven by images and numerous amusing GIFs, videos, audio, chats, text files, quotes, and so much more. Recently, Tumblr has provided its users ... Read More

Animate Text from One TextView to Another in Android

George John
Updated on 30-Jul-2019 22:30:24

820 Views

This example demonstrate about How to make Animate text from one TextView to another.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                                 In the above code, we have taken text view and button, when user click on button, textview going to updateStep 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Bundle; ... Read More

FTP Login Function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

122 Views

The ftp_login() function allows you to log in to the FTP connection.Syntaxftp_login(con,user_name,password);Parameterscon − The FTP connectionuser_name − The user name to log inpassword − The password to loginReturnThe ftp_login() function returns TRUE on success or FALSE and warning on failure.ExampleThe following is an example −

Get System Start Time from RuntimeMXBean in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

348 Views

RuntimeMXBean in the management interface for the runtime system of the Java virtual machine.RuntimeMXBean runtimeMX = ManagementFactory.getRuntimeMXBean();To get the system start time, use the getStartTime() method −new Date(runtimeMX.getStartTime()The following is an example −Example Live Demoimport java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.Date; public class Demo { public static void main(String args[]) throws Exception { RuntimeMXBean runtimeMX = ManagementFactory.getRuntimeMXBean(); System.out.println("System Start Time = "+new Date(runtimeMX.getStartTime())); } }OutputSystem Start Time = Mon Nov 26 07:03:19 UTC 2018

Intel 8257 Programmable DMA Controller

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

738 Views

As per DIP package Intel 8257 DMA controller chip is a 40-pin programmable Integrated Circuit. The pin diagrams of physical and functional are indicated below. The DMA controller chip 8257 works in two modes namely −Slave Mode andMaster Mode.Likely the processor also works in two modes namely active mode and HOLD mode. The processor normally works in active mode where the processor works as the master of the computer system. The processor goes to the HOLD state only when DMA transfer is required and it gives control to the system bus.When the processor is programming 8257 it is in slave ... Read More

Use Android Sequence Layout

George John
Updated on 30-Jul-2019 22:30:24

535 Views

Before getting into android sequence layout, we should know what is sequence layout in android. Sequence layout contains a sequence of steps with the progress bar. According to sequence, it follows an animated progress bar.This example demonstrates How to use Android sequence layout.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Open build.gradle(app) and add design support library dependency.apply plugin: 'com.android.application' android {    compileSdkVersion 28    defaultConfig {       applicationId "com.example.andy.myapplication"       minSdkVersion 19     ... Read More

FTP MDTM Function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

175 Views

The ftp_mdtm() function returns the last modified time of a specified file in PHP.Syntaxftp_mdtm(con,file);Parameterscon − The FTP connectionmyfile − The file to checkReturnThe ftp_mdtm() function returns the last modified time as a Unix timestamp.ExampleThe following is an example −

Compare Two File Paths in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

997 Views

Two file paths can be compared lexicographically in Java using the method java.io.File.compareTo(). This method requires a single parameter i.e.the abstract path name that is to be compared. It returns 0 if the two file path names are equal.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo {    public static void main(String[] args) {       File file1 = new File("C:/File/demo1.txt");       File file2 = new File("C:/File/demo1.txt");       if (file1.compareTo(file2) == 0) {          System.out.println("Both the paths are lexicographically equal");       } else ... Read More

Display Month by Name and Number in Java

Samual Sam
Updated on 30-Jul-2019 22:30:24

453 Views

Use the ‘b’ conversion character for month name in Java.Use the ‘m’ conversion character for month number in Java.Here, we are using Formatter and Calendar class, therefore import the following packages.import java.util.Calendar; import java.util.Formatter;The following is an example to display month name and number −Example Live Demoimport java.util.Calendar; import java.util.Formatter; public class Demo { public static void main(String args[]) { Formatter f = new Formatter(); Calendar cal = Calendar.getInstance(); System.out.println("Current date and time: "+cal.getTime()); ... Read More

Advertisements