Technology Questions

Q:

What are the ways of preserving data on a Web Form in ASP.NET?

Answer

These objects provide two levels of scope:


Application State


Data stored in the application object can be shared by all the sessions of the application.


Application object stores data in the key value pair.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET
Job Role: Software Architect

0 2389
Q:

The arranging of data in a logical sequence is called

A) Summarizing B) Classifying
C) Sorting D) Rearranging
 
Answer & Explanation Answer: C) Sorting

Explanation:

The process of arranging any items in a systematic manner in a logical sequence is called as Sorting. It can be of two types :

1. Ordering

Arranging items following some criterion like ascending or descending order

2. Categorizing

Grouping items with similar properties together.

Report Error

View Answer Report Error Discuss

Filed Under: SQL
Exam Prep: AIEEE , Bank Exams , CAT

3 2386
Q:

What is TDM?

Answer

TDM is a digital process that can be applied when the data rate capacity of the transmission  medium is greater than the data rate required by the sending and receiving devices.

Report Error

View answer Workspace Report Error Discuss

0 2385
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 2381
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 2380
Q:

How do you call a constructor for a parent class?

Answer parent::constructor($value)
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2379
Q:

How does DB2 determine what lock- size to use?

Answer

1. Based on the lock-size given while creating the table space


2. Programer can direct the DB2 what lock-size to use


3. If lock - size ANY is specified, DB2 usually chooses a lock-size of PAGE

Report Error

View answer Workspace Report Error Discuss

0 2375
Q:

What’s the difference between include and require?

Answer It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2373