Technology Questions

Q:

In the JCL, how do you define the files referred to in a subroutine ?

Answer

Supply the DD cards just as you would for files referred to in the main program.

Report Error

View answer Workspace Report Error Discuss

0 2484
Q:

How can you avoid callback hells ?

Answer

There are lots of ways to solve the issue of callback hells:


1. Modularization: break callbacks into independent functions
2. Use a control flow library, like async
3. Use generators with Promises
4. Use async/await (note that it is only available in the latest v7 release and not in the LTS version)

Report Error

View answer Workspace Report Error Discuss

Subject: Java
Job Role: Analyst , IT Trainer

3 2484
Q:

Difference between Arraylist and Linked list?

Answer

ArrayList and LinkedList both implements List interface and maintains insertion order. Both are non synchronized classes.


 


But there are many differences between ArrayList and LinkedList classes that are given below.


 

ArrayList    V/s     LinkedList ::


 

1) ArrayList internally uses dynamic array to store the elements.


                   Whereas


LinkedList internally uses doubly linked list to store the elements.


 

2) Manipulation with ArrayList is slow because it internally uses array. If any element is removed from the array, all the bits are shifted in memory.


                   Whereas


Manipulation with LinkedList is faster than ArrayList because it uses doubly linked list so no bit shifting is required in memory.


 

3) ArrayList class can act as a list only because it implements List only.


                   Whereas


LinkedList class can act as a list and queue both because it implements List and Deque interfaces.


 

4) ArrayList is better for storing and accessing data.


                   Whereas


LinkedList is better for manipulating data.

Report Error

View answer Workspace Report Error Discuss

3 2480
Q:

What is the difference between using copy() and move() function in php file uploading?

Answer

Copy() makes a copy of the file. It returns TRUE on success. It can copy from any source to destination. Move simply Moves the file to destination if the file is valid. While move can move the uploaded file from temp server location to any destination on the server. If filename is a valid upload file, but cannot be moved for some reason, no action will occur.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2480
Q:

What is Bit Mapped Index?

Answer

Bitmap indexes make use of bit arrays (bitmaps) to answer queries by performing bitwise logical operations.


Bitmap indexes are useful in the data warehousing applications.


Bitmap indexes have a significant space and performance advantage over other structures for such data.


Tables that have less number of insert or update operations can be good candidates.


The advantages of Bitmap indexes are:


   - They have a highly compressed structure, making them fast to read.


   - Their structure makes it possible for the system to combine multiple indexes together so that they can      access the underlying table faster.


The Disadvantage of Bitmap indexes is:


  - The overhead on maintaining them is enormous. 

Report Error

View answer Workspace Report Error Discuss

0 2479
Q:

Explain how to store the uploaded file to the final location.

Answer

A HTML form should be build before uploading the file. The following HTML code is used for selecting the file that is to be uploaded. The type attribute of input must be “file”.


<form enctype="multipart/form-data" action="uploader.php" method="POST">


<input type="hidden" name="MAX_FILE_SIZE" value="100000" />


Choose a file to upload: <input name="uploadedfile" type="file" /><br />


<input type="submit" value="Upload File" />


</form>


At the time of executing uploader.php, the uploaded file will be stored in a temporary storage are on the webserver. An associative array $_FILES['uploadedfile']['name'] is used for uploading. The ‘name’ is the original file that is to be uploaded. Another associative array $_FILES['uploadedfile']['tmp_name'] is used for placing the uploaded file in a temporary location on the server and the file should be empty and should exist with the tmp_name.


The following code snippet is used for uploading the file.


$target_path = "uploads/"; // the target location of the file


$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);


if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) 


{


       echo "The file ". basename( $_FILES['uploadedfile']['name']). 


        " has been uploaded";


}


else


{


      echo “There was an error while uploading the file”;


}


The function move_uploaded_file()is used to place the source file into the destination folder, which resides on the server.


If the uploading is successful, the message “The file filename has been uploaded. Otherwise the error message “There was an error while uploading the file” would be displayed.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2479
Q:

What are the different models used in cluster analysis?

Answer

There are many algorithms that can be used to analyze the database to check the maintenance of all the data sets that are already present. The different types of cluster models include as follows:


- Connectivity models: these are the models that connect one cluster to another cluster. This includes the example of hierarchical clustering that is based on the distance connectivity of one model to another model. 


- Centroid models: these are the models that are used to find the clusters using the single mean vector. It includes the example of k-means algorithm.


- Distribution models: it includes the specification of the models that are statistically distributed for example multivariate normal distribution model.


- Density models: deals with the clusters that are densely connected with one another in the regions having the data space. 


- Group models: specifies the model that doesn’t provide the refined model for the output and just gives the grouping information

Report Error

View answer Workspace Report Error Discuss

0 2478
Q:

Oracle Server supports two different forms of replication: Basic and Advanced replication. Explain difference between these.

Answer

Basic Replication : Basic replication is implemented using standard CREATE SNAPSHOT or CREATE MATERIALIZED VIEW statements. It can only replicate data and not procedures, indexes replication is always one-way, and snapshot copies are read only.


Advanced Replication : Advanced replication supports various configurations of updatable snapshot, multi-master and update anywhere replication. It is more difficult to configure but allows data and other database objects like indexes and procedures to be replicated.


 


Differences between Basic and Advanced replications:


- With basic replication, data replicas provide read-only access to the table data whereas advanced replication features extend the capabilities of basic read-only replication by allowing applications to update table replicas throughout a replicated database system.


- With Basic Replication applications can query data from local data replicas. On the other hand with advanced replication, data replicas anywhere in the system can provide both read and update access to a table's data.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2477