Articles on Trending Technologies

Technical articles with clear explanations and examples

Android Popup Menu Example

George John
George John
Updated on 30-Jul-2019 2K+ Views

Popup menu just like a menu, it going to be display either above of the view or below of the view according to space on activity. Here is the simple solution to create android popup menu.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 given button. when you click on the above button, it going to show popup menu.Step 3 − Add the following code to ...

Read More

ftp_rawlist() function in PHP

Samual Sam
Samual Sam
Updated on 30-Jul-2019 142 Views

The ftp_rawlist() function displays the list of files with file information from a specified directorySyntaxftp_rawlist(conn,dir,recursive);Parametersconn − The FTP connectiondir − The directory pathrecursive − Sends a "LIST" command to the server by default.ReturnThe ftp_rawlist() function returns an array where each element corresponds to one line of text.ExampleThe following is an example to get a list of files with file information −

Read More

Math Operations on BigInteger in Java

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 2K+ Views

Let us apply the following operations on BigInteger using the in-built methods in Java.Addition: add() method Subtraction: subtract() method Multiplication: multiply() method Division: divide() methodLet us create three BigInteger objects.BigInteger one = new BigInteger("98765432123456789"); BigInteger two = new BigInteger("94353687526754387"); BigInteger three = new BigInteger("96489687526737667");Apply mathematical operations on them.one = one.add(two); System.out.println("Addition Operation = " + one); one = one.multiply(two); System.out.println("Multiplication Operation = " + one);The following is an example −Example Live Demoimport java.math.BigInteger; public class Main { public static void main(String[] args) { BigInteger one = new BigInteger("98765432123456789"); ...

Read More

Why is it important to discover your career passion, and how?

Rashmi Iyer
Rashmi Iyer
Updated on 30-Jul-2019 191 Views

Education today has become all about getting a job and good packages that can help you keep up to the rising standard of living. However, as many people are now joining this rat race, specialization and commitment to work reduce over a period of time. People also start taking a fixed path which has been set by the majority of the people. Hence it is now important for the younger generation to find the calling of their heart and discover what is their real career passion.Plan for a long term CareerPeople today function with a fixed mindset. These individuals want ...

Read More

Can a poet be a hero?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 521 Views

The reason why some people may find this question abrupt would be their shallow understanding of the term “Hero “ and even of the term “Poet”.Who is a Hero?We often regard hero as somebody out of the world, probably with superhuman abilities like wings or extremely high speed and so on. But in actual terms, Hero, as described by Thomas Carlyle in his essay Hero as a Poet, is not someone who is extraordinary, rather he is someone who is less questionable and less ambitious. A hero is indeed someone, whom we can relate to and someone whose life becomes ...

Read More

What is CTET?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 695 Views

It is a famous competitive exam in India. It is the acronym of Central Teacher Eligibility Test. As the name suggests, it is a qualifying exam for recruiting teachers for central schools like Kendriya Vidyalaya School, Army Public School, Navodya School and the like.The exam is taken to allow candidates who want to make their career in the teaching field to fulfil their dream of teaching. The Ministry of Human Resource Development, Govt. of India has entrusted the responsibility of conducting the Central Teacher Eligibility Test to the Central Board of Secondary Education Delhi.Is CTET only for central schools?While the ...

Read More

Get byte array from BigInteger in Java

Samual Sam
Samual Sam
Updated on 30-Jul-2019 291 Views

First, set the BigInteger object with binary.BigInteger val = new BigInteger("100000000110001100000", 2);Now, use the toByteArray() method.byte[] byteArr = val.toByteArray();The following is an example −Example Live Demoimport java.math.BigInteger; public class Demo { public static void main(String[] argv) throws Exception { BigInteger val = new BigInteger("100000000110001100000", 2); byte[] byteArr = val.toByteArray(); for (int i = 0; i < byteArr.length; i++) { System.out.format("0x%02X", byteArr[i]); } } }Output0x10 0x0C 0x60

Read More

Delete file or directory on termination in Java

Samual Sam
Samual Sam
Updated on 30-Jul-2019 325 Views

A file or directory can be deleted on termination of the program i.e. after the virtual machine terminates using the method java.io.File.deleteOnExit(). This method requires no parameters and it does not return a value.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo {    public static void main(String[] args) {       try {          File file = new File("demo1.txt");          file.createNewFile();          System.out.println("File: " + file);          file.deleteOnExit();       } catch(Exception e) {          e.printStackTrace(); ...

Read More

BigInteger.isProbablePrime() method in Java

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 349 Views

TheBigInteger.isProbablePrime(int certainty) returns true if this BigInteger is probably prime, false if it's definitely composite. If certainty is ≤ 0, true is returned.Here, the “certainty” parameter is a measure of the uncertainty that the caller is willing to tolerate: if the call returns true the probability that this BigInteger is prime exceeds (1 - 1/2certainty). The execution time of this method is proportional to the value of this parameter.The following is an example −Example Live Demoimport java.math.BigInteger; public class Demo { public static void main(String[] argv) throws Exception { // create 3 ...

Read More

How does Constraint Layout works in android?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 1K+ Views

In simple words, constraint layout is an advanced version of a Relative layout. It is used to reduce the child view hierarchies and improve the performance.Properties of constraint layout as shown below -Wrap Content –It wrap the view size according to data. Any Size – This is very similar to match parent. Fixed Size – This allows standard height and width(fixed sizes). In the above example we have shown the button with all properties, now look into code level as shown below -In the above, we have declare layout margin-top, bottom, start and end. those are the standard distance (Similar ...

Read More
Showing 59521–59530 of 61,248 articles
Advertisements