The “s” format for seconds is like representing 1, 2, 3, 4 seconds, etc. We will use it like this.SimpleDateFormat("s");Let us see an example −// displaying seconds in s format simpleformat = new SimpleDateFormat("s"); String strSeconds = simpleformat.format(new Date()); System.out.println("Seconds in s format = "+strSeconds);Above, we have used the SimpleDateFormat class, therefore the following package is imported −import java.text.SimpleDateFormat;The following is an example −Example Live Demoimport java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Calendar; public class Demo { public static void main(String[] args) throws Exception { // displaying current date and time ... Read More
To find invalid email address, use the below syntax −SELECT yourColumnName FROM yourTableName WHERE yourColumnName NOT LIKE '%_@_%._%';The above syntax will give the list of all invalid email addresses. To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table FindInvalidEmailAddressDemo -> ( -> Id int NOT NULL AUTO_INCREMENT, -> Name varchar(20), -> EmailAddress varchar(40), -> PRIMARY KEY(Id) -> ); Query OK, 0 rows affected (0.75 sec)Now you can insert some records in the table using insert command. We have inserted some invalid ... Read More
Order a MySQL table by two columns with the help of below syntax −order by yourColumnName1 DESC, yourColumnName2 DESC;Let us first create a table for our example −mysql> create table OrderByDemo -> ( -> StudentId int, -> StudentName varchar(100), -> StudentAge int -> ); Query OK, 0 rows affected (0.57 sec)Inserting records into the table with the help of insert command. The query is as follows −mysql> insert into OrderByDemo values(1, 'John', 23); Query OK, 1 row affected (0.20 sec) mysql> insert into OrderByDemo values(3, ... Read More
The ss format for seconds is like representing seconds 01, 02, 03, 04, etc. We will use it like this.SimpleDateFormat("ss");Let us see an example −// displaying seconds in ss format simpleformat = new SimpleDateFormat("ss"); String strSeconds = simpleformat.format(new Date()); System.out.println("Seconds in ss format = "+strSeconds);Above, we have used the SimpleDateFormat class, therefore the following package is imported −import java.text.SimpleDateFormat;The following is an example −Example Live Demoimport java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Calendar; public class Demo { public static void main(String[] args) throws Exception { // displaying current date and time ... Read More
To query a list of values, you can use IN operator. The syntax is as follows −SELECT * FROM yourTableName WHERE yourColumnName IN(Value1, Value2, ...N) ORDER BY FIELD(yourColumnName, Value1, Value2, ...N);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table ListOfValues -> ( -> Id int NOT NULL AUTO_INCREMENT, -> Name varchar(30), -> Age int, -> PRIMARY KEY(Id) -> ); Query OK, 0 rows affected (0.72 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert ... Read More
A year ago, I had shifted to a new city (and even a new state) of the country. Having been born and brought up in North India, I was not very familiar with this city in South India. Climate, people, culture everything was way different than where I used to live, but it was still a place where I had to stay.Restaurant ReviewingEverything can be adjusted, but the food is actually an offering to the soul and it is difficult to manage cooking along with a job. So, I resorted exploring food in the new city. Trying restaurants and then ... Read More
Python provides various libraries to handle geographical and graph data. Python plotly is one of those libraries which are used to draw geographical graphs. Plotly is a free and open source library. Plotly helps to plot various kinds of graphs like Line charts, Horizontal bar charts, bar charts, dashboards, scatter plots, bubble charts, pie charts and many more.# Import important python geographical libraries. import plotly.plotly as py import plotly.graph_objs as go import pandas as pd # Must enable in order to use plotly off-line. from plotly.offline import download_plotlyjs, init_notebook_mode, iplot, plot # To establish connection init_notebook_mode() # type defined is ... Read More
You cannot get the type of variable in MySQL. Cast the type of variable into another using CAST operator. The syntax is as follows −SET @yourVariableName:=’anyValue’Use the CAST operator to cast to another type. The syntax is as follows −SELECT CAST( @yourVariableName AS SIGNED);To understand the above syntax, let us cast to another type.Case 1: String to unsigned −mysql> set @StringToInt:='12345'; Query OK, 0 rows affected (0.00 sec)The query is as follows to another type −mysql> select CAST(@StringToInt as UNSIGNED);The following is the output −+--------------------------------+ | CAST(@StringToInt as UNSIGNED) | +--------------------------------+ | 12345 ... Read More
Recruitment is the process of searching employees and encouraging them to apply for the vacancy in the organization. Recruitment is a very important component of HR Management because it is extremely important to find dedicated people who can work with commitment in an organization. It is a prerequisite to have an effective workforce and strong work culture in the organization.To quote Stahl, ‘Recruitment is the cornerstone of the whole personnel structure. Unless the recruitment policy is soundly conceived, there can be little hope of building a first-rate staff.’Following are the steps involved in the effective and sound recruitment cycle followed ... Read More
To avoid this type of error in MySQL stored procedure, you need to change the delimiter ; to //.Suppose if you are using stored procedure or triggers or even function then you need to change the delimiter. The syntax is as follows.DELIMITER // CREATE PROCEDURE yourProcedureName() BEGIN Statement1, . . N END; // DELIMITER ;To understand the above syntax, let us create a stored procedure. The query to create a stored procedure is ... Read More