What is CTET

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

595 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
Updated on 30-Jul-2019 22:30:24

257 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

FTP Rename Function in PHP

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

331 Views

The ftp_rename() function renames a file or directory on the FTP server.Syntaxftp_rename(conn,oldname,newname);Parametersconn − The FTP connectionold_name − The file or directory to rename.new_name − The new name of the file or directoryReturnThe ftp_rename() function returns TRUE on success or FALSE on failure.ExampleThe following is an example −

Delete File or Directory on Termination in Java

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

283 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
Updated on 30-Jul-2019 22:30:24

297 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 Constraint Layout Works in Android

Arjun Thakur
Updated on 30-Jul-2019 22:30:24

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

Cancel Executing AsyncTask in Android

Chandu yadav
Updated on 30-Jul-2019 22:30:24

2K+ Views

Before getting into example, we should know what is AsyncTask in android. AsyncTask going to do operations/actions in background thread and update on mainthread. While doing background operations on background thread, user can cancel operations by using the following code -AsynTaskExample mAsyncTask = new AsyncTaskExample(); mAsyncTask.cancel(true);This example demonstrate about how to cancel an executing AsyncTask in android.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 when ... Read More

Job Opportunities in Software Field with Active BTech Backlog

Tejas Charukula
Updated on 30-Jul-2019 22:30:24

529 Views

It really does not matter whether you complete your B.Tech or not if you have software skills. Many companies are allowing one or two backlogs when they select the students during campus interviews.A lot of my friends who have one or two backlogs are already placed in good companies like Deloitte, Wipro, and others based on their technical knowledge by the end of 4th year, even before final exams. At the end of the day, you have to complete the graduation. But, for time being you can start working in the software field.

FTP rmdir Function in PHP

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

81 Views

The ftp_rmdir() function deletes a directory on the FTP server. Remember that the directory to be deleted should be empty.Syntaxftp_rmdir(conn,dir);Parametersconn −The FTP connectiondir − The empty directory to be deleted.ReturnThe ftp_rmdir() function returnsTRUE on success or FALSE on failure.ExampleThe following is an example −

Round a Double to BigDecimal in Java

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

409 Views

The java.math.BigDecimal class provides operations for arithmetic, scale manipulation, rounding, comparison, hashing, and format conversion.Firstly, let us pass a double to BigDecimal −BigDecimal val = new BigDecimal(9.19456);Now, we will round it −val = val.setScale(2, BigDecimal.ROUND_HALF_EVEN);Above, we have used the field ROUND_HALF_EVEN. It is a rounding mode to round towards the "nearest neighbor" unless both neighbours are equidistant, in which case, round towards the even neighboursThe following is an example −Example Live Demoimport java.math.BigDecimal; public class Demo { public static void main(String args[]) { BigDecimal val = new BigDecimal(9.19456); ... Read More

Advertisements