Where Do You See Yourself in Five Years?

Prasanna Kotamraju
Updated on 27-Jun-2020 08:54:12

171 Views

When you are attending an Interview, at some point in time, you can expect this question "Where do you see yourself in five years?”When a hiring manager asks you this, there will be quite a few things running through your head like "Moving up in the career", "That side of the table", "Working for myself", "Heading this Organization" etc., Why do they ask this question?The interviewer might want to understand more about your career goals and check whether you are motivated, proactive and like to stick around and check how this position would fit into your grand plan.How to answer ... Read More

Filter and Sanitize String Constant in PHP

Arjun Thakur
Updated on 27-Jun-2020 08:53:49

427 Views

The FILTER_SANITIZE_STRING constant deletes tags and encodes special characters from a string.FlagsFILTER_FLAG_NO_ENCODE_QUOTES − Do not encode quotesFILTER_FLAG_STRIP_LOW − Removes characters with ASCII value less than 32FILTER_FLAG_STRIP_HIGH − Removes characters with ASCII value greater than 127FILTER_FLAG_ENCODE_LOW − Encodes characters with ASCII value less than 32FILTER_FLAG_ENCODE_HIGH − Encodes characters with ASCII value greater than 127FILTER_FLAG_ENCODE_AMP − Encodes the "&" character to &ReturnThe FILTER_SANITIZE_STRING constant does not return anything.Example Live DemoOutputThe following is the output.Demo!

Display Month of Year Using Java Calendar

karthikeya Boyini
Updated on 27-Jun-2020 08:53:25

4K+ Views

For using Calendar class, import the following package.import java.util.Calendar;Using the Calendar class, create an object.Calendar calendar = Calendar.getInstance();Now, create a string array of the month names.String[] month = new String[] {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };Display the month name.month[calendar.get(Calendar.MONTH)]The following is an example.Example Live Demoimport java.util.Calendar; public class Demo {    public static void main(String[] args) {       Calendar calendar = Calendar.getInstance();       String[] month = new String[] {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };       System.out.println("Current Month = " + month[calendar.get(Calendar.MONTH)]); ... Read More

Filter, Sanitize and Stripped Constants in PHP

Chandu yadav
Updated on 27-Jun-2020 08:53:04

214 Views

The FILTER_SANITIZE_STRIPPED constant encodes or strips unwanted characters.Options and FlagsFILTER_FLAG_NO_ENCODE_QUOTES − This flag does not encode quotesFILTER_FLAG_STRIP_LOW − Strips characters with ASCII value below 32FILTER_FLAG_STRIP_HIGH − Strips characters with ASCII value above 32FILTER_FLAG_ENCODE_LOW − Encodes characters with ASCII value below 32FILTER_FLAG_ENCODE_HIGH − Encodes characters with ASCII value above 32FILTER_FLAG_ENCODE_AMP − Encodes the & character to &ReturnThe FILTER_SANITIZE_STRIPPED constant does not return anything.Example Live DemoOutputThe following is the output.string(10) "Demo!text!"

Filter Sanitize URL Constant in PHP

George John
Updated on 27-Jun-2020 08:52:04

499 Views

The FILTER_SANITIZE_URL constant removes all illegal URL characters from a string. It allows the following −$-_.+!*'(),{}|\^~[]`">

Filter Callback Constant in PHP

Ankith Reddy
Updated on 27-Jun-2020 08:51:17

168 Views

The FILTER_CALLBACK constant calls a user defined function to filter the value.ReturnThe FILTER_CALLBACK constant does not return anything.ExampleThe following is an example that converts the case of a string. Here, existing function in PHP is taken. Live DemoOutputThe following is the output.demo text!

Get Current Time Information in Java

karthikeya Boyini
Updated on 27-Jun-2020 08:50:59

301 Views

Import the following package for to work with Calendar class in Java, import java.util.Calendar;Create a calendar class now.Calendar cal = Calendar.getInstance();To display entire time information, use the following fields.cal.get(Calendar.HOUR_OF_DAY) cal.get(Calendar.HOUR) cal.get(Calendar.MINUTE) cal.get(Calendar.SECOND) cal.get(Calendar.MILLISECOND)The following is the final example.Example Live Demoimport java.util.Calendar; public class Demo {    public static void main(String[] args) {       Calendar cal = Calendar.getInstance();       // current date and time       System.out.println(cal.getTime().toString());       // time information       System.out.println("Hour (24 hour format) : " + cal.get(Calendar.HOUR_OF_DAY));       System.out.println("Hour (12 hour format) : " + cal.get(Calendar.HOUR));     ... Read More

Constant Function in PHP

Arjun Thakur
Updated on 27-Jun-2020 08:50:44

277 Views

The constant() function returns the value of a constant.Syntaxconstant(const)Parametersconst − The name of the constant to checkReturnThe constant() function returns the value of a constant and NULL if the constant is not defined.ExampleThe following is an example that defines a constant. Live DemoOutputThe following is the output.This is it!

Define Function in PHP

Chandu yadav
Updated on 27-Jun-2020 08:49:54

897 Views

The define() function defines a constant.Syntaxdefine(const_name,value,case_insensitive)Parametersconst_name − The name of the constant.value − The value of the constant.case_insensitive − The constant name should be case-insensitive.ReturnThe define() function returns true on success or false on failure.ExampleThe following is an example that defines a constant. Live DemoOuptutThe following is the output.This is it!

Convert Current Time to Java SQL Date Object

Samual Sam
Updated on 27-Jun-2020 08:49:02

685 Views

Firstly, create a Calendar class object.Calendar calendar = Calendar.getInstance();Now, import the following package.import java.sql.Date;Using a Date class now and creating an object would belong to the above package. Convert the current time to the java.sql.Date Object.Date sqlDate = new Date((calendar.getTime()).getTime());The following is an example.Example Live Demoimport java.util.Calendar; import java.sql.Date; import java.text.ParseException; public class Demo {    public static void main(String[] args) throws ParseException {       Calendar calendar = Calendar.getInstance();       // object       Date sqlDate = new Date((calendar.getTime()).getTime());       System.out.println(sqlDate);    } }Output2018-11-19Read More

Advertisements