Tuesday, June 30, 2015

php5 upwork test answers


php5 upwork test answers | Does PHP 5 support exceptions?

All Answers of php5 upwork oDesk  elance test answers Click here


php5 upwork test answers





Does PHP 5 support exceptions?
Answers:
• Yes
• No

php5 upwork test answer | What will be the output of the following code?

php Test Answers


What will be the output of the following code?
<?
echo 5 * 6 / 2 + 2 * 3;
?>
Answers:
• 1
• 20
• 21
• 23
• 34

php5 upwork test answer | What is the best way to change the key without changing the value of a PHP array element?

php upwork test answers


true answers of upwork | php5


What is the best way to change the key without changing the value of a PHP array element?
Answers:
• $arr[$newkey] = $oldkey; unset($arr[$oldkey]);
• $arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]);
• $newkey = $arr[$oldkey]; unset($arr[$oldkey]);
• $arr[$newkey] = $oldkey.GetValue(); unset($arr[$oldkey]);

php5 upwork test answer | true answers of upwork | php5 | What is the correct line to use within the php.ini file, to specify that 128MB would be the maximum amount of memory that a script may use?

true answers of upwork | php5


What is the correct line to use within the php.ini file, to specify that 128MB would be the maximum amount of memory that a script may use?
Answers:
• memory_limit = 128M
• limit_memory = 128M
• memory_limit: 128M
• limit_memory: 128M

php5 upwork test answer | What would occur if a fatal error was thrown in your PHP program?

test answers of upwork

What would occur if a fatal error was thrown in your PHP program?
Answers:
• The PHP program will stop executing at the point where the error occurred.
• The PHP program will show a warning message and program will continue executing.
• Since PHP is a scripting language so it does not have fatal error.

• Nothing will happen.

php5 upwork test answer | Which of the following will store order number (34) in an 'OrderCookie'? | upwork

upwork test answers

 Which of the following will store order number (34) in an 'OrderCookie'?
Answers:
• setcookie("OrderCookie",34);
• makeCookie("OrderCookie",34);
• Cookie("OrderCookie",34);
• OrderCookie(34);

Which of the following is useful for method overloading?

perfect test answers of php5



 Which of the following is useful for method overloading?
Answers:
• __call,__get,__set
• _get,_set,_load
• __get,__set,__load
• __overload

upwork test ans | What is the string concatenation operator in PHP?

upwork test ans | What is the string concatenation operator in PHP?

What is the string concatenation operator in PHP?
Answers:
• +
• ||
• .
• |||
• None of these

php5 upwork exam answers 2015 | Which function can be used to delete a file?

php5 upwork exam answers
Which function can be used to delete a file?
Answers:
• delete()
• delete_file()
• unlink()
• fdelete()
• file_unlink()


php5 upwork test answer | What function should you use to join array elements with a glue string?

php5 upwork exam answers 2015


What function should you use to join array elements with a glue string?
Answers:
• join_st
• implode
• connect
• make_array
• None of these

upwork | Which one of the following is not an encryption method in PHP?

upwork php5 test answers

Which one of the following is not an encryption method in PHP?
Answers:
• crypt()
• md5()
• sha1()
• bcrypt()

php5 upwork test answer | Which of the following is incorrect with respect to separating PHP code and HTML?

php5 test answers

Which of the following is incorrect with respect to separating PHP code and HTML?
Answers:
• Use an MVC design pattern.
• As PHP is a scripting language, HTML and PHP cannot be separated.
• Use any PHP template engine e.g: smarty to keep the presentation separate from business logic.
• Create one script containing your (PHP) logic outputting XML and one script produce the XSL to translate the XML to views.

upwork test answers | What enctype is required for file uploads to work?

php5 test answers 2015


What enctype is required for file uploads to work?
Answers:
• multipart/form-data
• multipart
• file
• application/octect-stream
• None of these

For the following code: Which of the following sequence will run successfully?

php5 test answers | upwork


For the following code:
<?php

function Expenses()
{
    function Salary()
    {
    }

    function Loan()
    {
        function Balance()
        {
        }
    }
}

?>
Which of the following sequence will run successfully?
Answers:
• Expenses();Salary();Loan();Balance();
• Salary();Expenses();Loan();Balance();
• Expenses();Salary();Balance();Loan();
• Balance();Loan();Salary();Expenses();

php5 | Which of the following will start a session?

upwork php5 test answers


 Which of the following will start a session?
Answers:
• session(start);
• session();
• session_start();
• login_sesion();

free upwork test answers of php5 | What is the correct way to send a SMTP (Simple Mail Transfer Protocol) email using PHP?

free upwork test answers of php5

What is the correct way to send a SMTP (Simple Mail Transfer Protocol) email using PHP?
Answers:
• s.sendmail($EmailAddress, [$MessageBody], msg.as_string())
• sendmail($EmailAddress, "Subject", $MessageBody);
• mail($EmailAddress, "Subject", $MessageBody);
• <a href="mailto:$EmailAddress">$MessageBody</a>

PERFECT ANSWERS OF UPWORK Which of the following is correct about Mysqli and PDO?

 PERFECT ANSWERS OF UPWORK


Which of the following is correct about Mysqli and PDO?
Answers:
• Mysqli provides the procedural way to access the database while PDO provides the object oriented way.
• Mysqli can only be used to access MySQL database while PDO can be used to access any DBMS.
• MySQLi prevents SQL Injection whereas PDO does not.
• MySQLi is used to create prepared statements whereas PDO is not.

upwork correct php5 answers | What will be the output of the following code?

upwork correct php5 answers

What will be the output of the following code?
<?php
var_dump (3*4);
?>
Answers:
• int(3*4)
• int(12)
• 3*4
• 12
• None of the above

ALL PHP5 UPWORK TEST ANSWERS | Which of the following will print out the PHP call stack?

ALL PHP5 UPWORK TEST ANSWERS



 Which of the following will print out the PHP call stack?
Answers:
• $e = new Exception; var_dump($e->debug());
• $e = new Exception; var_dump($e->getTraceAsString());
• $e = new Exception; var_dump($e->backtrace());
• $e = new Exception; var_dump($e->getString());

Which of the following is not a PHP magic constant? | UPWORK | PHP5


UPWORK | PHP5 TEST ANSWERS


Which of the following is not a PHP magic constant?
Answers:
• __FUNCTION__
• __TIME__
• __FILE__
• __NAMESPACE__
• __CLASS__

UPWORK | Which of the following variable declarations within a class is invalid in PHP?

TEST SOLUTION OF UPWORK


Which of the following variable declarations within a class is invalid in PHP?
Answers:
• private $type = 'moderate';
• internal $term = 3;
• public $amnt = '500';
• protected $name = 'Quantas Private Limited';

Which of the following will read an object into an array variable?

php5 Upwork test answers
Which of the following will read an object into an array variable?
Answers:
• $array_variable = get_object_vars($object);
• $array_variable = (array)$object;
• $array_variable = array $object;
• $array_variable = get_object_vars $object;

Which of the following characters are taken care of by htmlspecialchars?

upwork php5 test answers


 Which of the following characters are taken care of by htmlspecialchars?
Answers:
• <
• >
• single quote
• double quote
• &
• All of these

php5 upwork test Answers | Which of the following is true about the singleton design pattern?

php5 upwork test answers


Which of the following is true about the singleton design pattern?

Answers:
• A singleton pattern means that a class will only have a single method.

• A singleton pattern means that a class can have only one instance object.

• A singleton pattern means that a class has only a single member variable.
• Singletons cannot be implemented in PHP.

upwork test answers | Which of the following is not a file-related function in PHP?



upwork test answers | Which of the following is not a file-related function in PHP?



Which of the following is not a file-related function in PHP?

Answers:
• fclose
• fopen
• fwrite
• fgets

• fappend

upwork test answers | Which of the following will check if a function exists?

upwork test answers


Which of the following will check if a function exists?

Answers:

• function_exists()

• has_function()
• $a = "function to check"; if ($a ()) // then function exists
• None of these

php5 upwork test answers | Which of the following is used to maintain the value of a variable over different pages?

php5 upwork test answers


Which of the following is used to maintain the value of a variable over different pages?


Answers:

• static
• global
• session_register()
• None of these

php5 upwork test answers | Which of the following methods should be used for sending an email using the variables $to, $subject, and $body?

php5 upwork test answers


Which of the following methods should be used for sending an email using the variables $to, $subject, and $body?

Answers:

• mail($to,$subject,$body)

• sendmail($to,$subject,$body)
• mail(to,subject,body)
• sendmail(to,subject,body)

php5 upwork test answer | What is the best practice for running MySQL queries in PHP? Consider the risk of SQL injection.

php5 upwork test answers




What is the best practice for running MySQL queries in PHP? Consider the risk of SQL injection.

Answers:

• Use mysql_query() and variables: for example: $input = $_POST['user_input']; mysql_query("INSERT INTO table (column) VALUES ('" . $input . "')");

Use PDO prepared statements and parameterized queries: for example: $input= $_POST["user-input"] $stmt = $pdo->prepare('INSERT INTO table (column) VALUES (":input"); $stmt->execute(array(':input' => $input));

• Use mysql_query() and string escaped variables: for example: $input= $_POST["user-input"] $input_safe = mysql_real_escape_string($input); mysql_query("INSERT INTO table (column) VALUES ('" . $input. "')");
• Use mysql_query() and variables with a blacklisting check: for example: $blacklist = array("DROP","INSERT","DELETE"); $input= $_POST["user-input"] if (!$array_search($blacklist))) mysql_query("INSERT INTO table (column) VALUES ('" . $input. "')");

Thursday, June 25, 2015

complete android upwork test answers of 2015 and 2016

Android test

php5 upwork test answer | What is the best way of opening camera as sub-activity?



What is the best way of opening camera as sub-activity?
Answers:
• Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivity(takePictureIntent);
• Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, 1); }
• Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1);
• Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, -1); }

What is the correct way to restrict app visibility on Google Play to devices that have a camera?




What is the correct way to restrict app visibility on Google Play to devices that have a camera?
Answers:
• <uses-feature android:name="android.hardware.camera"/>
• <uses-feature android:name="android.hardware.camera" android:required="true" />
• <uses-feature android:name="android.hardware.camera.front" android:required="true" />
• <uses-permission android:name="android.permission.CAMERA"/>

Which of the following sensors is only hardware-based?

Which of the following sensors is only hardware-based?
Answers:
• linear acceleration sensor
• gravity sensor
• rotation vector sensor
• accelerometer sensor

Which of the following formats is not supported in Android?




Which of the following formats is not supported in Android?
Answers:
• MP4
• MPEG
• AVI
• MIDI

Which of the following permissons is needed to perform the network operations through internet? a) INTERNET b) ACCESS_NETWORK_STATE




Which of the following permissons is needed to perform the network operations through internet?
a) INTERNET
b) ACCESS_NETWORK_STATE
Answers:
• a
• b
• both
• none

What is the advantage of using AsyncTaskLoader instead of AsyncTask?




What is the advantage of using AsyncTaskLoader instead of AsyncTask?
Answers:
• a bit easier to work with
• the possibility easily update progress bar
• no comparison, because it implements completely different functionality
• less work with the configuration of application

Which of the following protocols are provided by Google for GCM Connection Servers? A) HTTP B) XMPP C) SOAP D) RMI



Which of the following protocols are provided by Google for GCM Connection Servers?
A) HTTP
B) XMPP
C) SOAP
D) RMI
Answers:
• A and B
• A, B, C
• C, D
• all of these

Which of the following 4 classes does not relate to others? ApplicationInfo, SyncInfo, ActivityInfo, PackageInfo



Which of the following 4 classes does not relate to others?

ApplicationInfo, SyncInfo, ActivityInfo, PackageInfo
Answers:
• ApplicationInfo
• SyncInfo
• ActivityInfo
• PackageInfo

Which of the following are valid ways to deploy an Android application to a device?


Which of the following are valid ways to deploy an Android application to a device?
Answers:
• Using the "adb install /path/to/apk" command from the command prompt/terminal, when USB Debugging Mode is enabled in the device.
• Exporting and signing the package, then browsing it to install.
• Launching the application from an IDE, when USB Debugging Mode is enabled in the device.
• All of these.

Which of the following classes is not used in working with database?

Which of the following classes is not used in working with database?
Answers:
• SQLiteOpenHelper
• SQLiteDatabase
• ContentProvider
• DatabaseHelper

Which of the following statement is correct regarding StrictMode?



Which of the following statement is correct regarding StrictMode?
Answers:
• StrictMode detects improper layouts
• StrictMode detects operation which blocks UI
• StrictMode detects the speed of the connection
• All of the above

Which of the following are true about enabling/disabling menu items from an Activity class?

Which of the following are true about enabling/disabling menu items from an Activity class?
Answers:
• onCreateOptionsMenu can be used to enable/disable some menu items in an Android application.
• onPrepareOptionsMenu can be used to enable/disable some menu items in an Android application.
• onShowOptionsMenu can be used to enable/disable some menu items in an Android application.
• The menu items in an Android application cannot be disabled

Which of the following should be used to save the unsaved data and release resources being used by an Android application?

Which of the following should be used to save the unsaved data and release resources being used by an Android application?
Answers:
• Activity.onStop()
• Activity.onPause()
• Activity.onDestroy()
• Activity.onShutdown()
• Activity.onFreeze()

Which of the following statements are correct with regards to publishing updates of apps on Google Play?

Which of the following statements are correct with regards to publishing updates of apps on Google Play?
Answers:
• The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the same private key.
• The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the same private key.
• The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the new private key.
• The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the new private key.

Which of the following would you have to include in your project to use the SimpleAdapter class?

Which of the following would you have to include in your project to use the SimpleAdapter class?
Answers:
• import android.content;
• import android.widget;
• import android.database;
• import android.database.sqlite;
• import android.util;

Which of the following is/are appropriate for saving the state of an Android application?




Which of the following is/are appropriate for saving the state of an Android application?
Answers:
• Activity.onFreeze()
• Activity.onPause()
• Activity.onStop()
• Activity.onDestroy()

Which of the following is the parent class for the main application class in an Android application that has a user interface?




Which of the following is the parent class for the main application class in an Android application that has a user interface?


Answers:

• MIDLet
• AndroidApp

Activity

• AppLet
• Application

Which of the following can be used to bind data from an SQL database to a ListView in an Android application?



Which of the following can be used to bind data from an SQL database to a ListView in an Android application?

Answers:

• SimpleCursor

• SimpleCursorAdapter

• SimpleAdapter
• SQLiteCursor
• SQLLiteAdapter

Which of the following packages provide the classes required to manage the Bluetooth functionality on an Android device?



Which of the following packages provide the classes required to manage the Bluetooth functionality on an Android device?

Answers:


• android.hardware

• android.bluetooth

• android.bluez
• org.bluez



Which of the following can be accomplished by using the TelephoneNumberUtil class?



Which of the following can be accomplished by using the TelephoneNumberUtil class?


Answers:

• Save a phone number to the contacts in the phone device.
• Retrieve a phone number from the contacts in the phone device.
• Delete a phone number from the contacts in the phone device.

Format an international telephone number.

• Setting and retrieving the call forwarding phone number on the phone device.

Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?



Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?

Answers:

notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.

• notifyPhoneCallState is a call back function that is called when the call state changes.
• notifyPhoneCallState is called to initiate a call from the device.
• notifyPhoneCallState is used to send notifications about call states.
• notifyPhoneCallState gets called when the device receives an incoming phone call.

What is the purpose of the ContentProvider class?



What is the purpose of the ContentProvider class?

Answers:

• To play rich media content files.
• To create and publish rich media files.

To share data between Android applications.

• To access the global information about an application environment.
• To maintain global application state.

Which of the following is the immediate base class for Activity and Service classes?


Which of the following is the immediate base class for Activity and Service classes?

Answers:

• Application
• ApplicationContext

• Context

• Component
• Object

Wednesday, June 24, 2015

Which of the following are classes that can be used to handle the Bluetooth functionality on a device?

Which of the following are classes that can be used to handle the Bluetooth functionality on a device?

Answers:

• Adapte
• Manage
• Matche

BluetoothAdapte

ANDROID UPWORK TEST ANSWERS | How many expansion files can an APK file have? Select all correct options.

How many expansion files can an APK file have? Select all correct options.


Answers:

• one

two

• three
• four

ANDROID UPWORK TEST ANSWERS | Which of the following are Android build modes?

Which of the following are Android build modes?

Answers:

• Debug mode

• Release mode
• Production mode
• Development mode

ANDROID UPWORK TEST ANSWERS | What is "Android-dx"?

What is "Android-dx"?


Answers:

• A command line tool to create Android project files.
• A framework to create unit tests for Android projects.
• A resource editor to create user interface for Android applications.

A tool to generate Android byte code from .class files.

• An emulator to execute and debug Android projects.

ANDROID UPWORK TEST ANSWERS | Which of the following fields of the Message class should be used to store custom message codes about the Message?

Which of the following fields of the Message class should be used to store custom message codes about the Message?


Answers:

• tag

what

• arg1
• arg2
• userData

ANDROID UPWORK TEST ANSWERS | Select the two function calls that can be used to start a Service from your Android application?

Select the two function calls that can be used to start a Service from your Android application?

Answers:

• bindService

• startService

• runService
• startActivity

ANDROID UPWORK TEST ANSWERS | Which of the following Integrated Development Environments can be used for developing software applications for the Android platform?

Which of the following Integrated Development Environments can be used for developing software applications for the Android platform?


Answers:

• Android IDE

• Eclipse

• Visual Studio 2005
• Visual Studio 2008

ANDROID UPWORK TEST ANSWERS | Which of the following can you use to display an HTML web page in an Android application?

Which of the following can you use to display an HTML web page in an Android application?


Answers:

• WebBrowser
• BrowserView

WebView

• Browser
• HtmlView

ANDROID UPWORK TEST ANSWERS | What is "Android-Positron"? | ANDROID UPWORK TEST ANSWERS

What is "Android-Positron"?


Answers:

• A command line tool to create Android project files.

• A framework to create unit tests for Android projects.

• A resource editor to create user interface for Android applications.
• A tool to generate Android byte code from .class files.
• An emulator to execute and debug Android projects.

ANDROID UPWORK TEST ANSWERS | Which of the following can you use to add items to the screen menu? - ANDROID UPWORK TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

Which of the following can you use to add items to the screen menu?

Answers:

• Activity.onCreate

Activity.onCreateOptionsMenu

• Constructor of the Activity class.
• Activity.onCreateMenu
• Activity.onStart
• Activity.onPrepareOptionsMenu

ANDROID UPWORK TEST ANSWERS | Which of the following is not a life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity? - ANDROID UPWORK TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

Which of the following is not a life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity?


Answers:

• onCreate
• onInit

onCompleteThaw

• onRestart

ANDROID UPWORK TEST ANSWERS | What is the interface Spannable used for? | ANDROID UPWORK TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

What is the interface Spannable used for?


Answers:

• Manipulate text that can span across multiple pages.
• Manipulate text that can span across multiple TextView windows.

• This is the interface for text to which markup objects can be attached and detached.

• String parsing.

ANDROID UPWORK TEST ANSWERS | What is correct regarding GCM - Google Cloud Messaging service? - ANDROID UPWORK TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

What is correct regarding GCM - Google Cloud Messaging service?


Answers:

• It does server to device communication.
• It does device to server communication.

• It does device to server communication and vice versa.

• It does device to device communication.

ANDROID UPWORK TEST ANSWERS | Which of the following procedures will get the package name of an APK file? - UPWORD ANDROID TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

Which of the following procedures will get the package name of an APK file?


Answers:

• Looking for the package attribute's value of the <manifest> element in the manifest file.
• Executing the command, "pm list packages -f", in the ADB shell.

Programmatically, using PackageManager in an installed Android app.

• Using the AAPT platform tool, "aapt dump badging apkName.apk".

ANDROID UPWORK TEST ANSWERS | What is the maximum supported file size for a single APK file (excluding expansion packages) in the Google Play Store? | ANDROID UPWORK TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

What is the maximum supported file size for a single APK file (excluding expansion packages) in the Google Play Store?

Answers:


• 50MB

• 2GB
• 30MB
• unlimited

ANDROID UPWORK TEST ANSWRS - WHAT IS ANDROID ?


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

What is Android?

Answers:

• A new programming language that can be used to develop applications for mobile devices.
• A new IDE that can be used to develop applications for mobile devices.

• A software stack for mobile devices that includes an operating system, middleware and key applications.

• A new mobile device developed by Google.

ANDROID UPWORK TEST ANSWERS | Which of the following can be used to navigate between screens of different Android applications? | UPWORK ANDROID TEST ANSWRS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

Which of the following can be used to navigate between screens of different Android applications?


Answers:

• Binde
• Flow
• Navigate

• Intent

• ApplicationContext

ANDROID UPWORK TEST ANSWERS | Which of the following are valid features that you can request using requestWindowFeature? - UPWORK ANDROID TEST ANSWERS

Which of the following are valid features that you can request using requestWindowFeature?

Answers:

• FEATURE_NO_TITLE

• FEATURE_NO_ICON
• FEATURE_RIGHT_ICON
• FEATURE_NO_MENU
• FEATURE_TRANSPARENT_WINDOW

ANDROID UPWORK TEST ANSWERS | Which of the following are true? - ANDROID UPWORK TEST ANSWERS


>>COMPLETE  ANDROID TEST ANSWERS OF UPWORK 2015 | 2016

 

Which of the following are true?

Answers:


• startActivity and startActivityForResult can both be used to start a new activity from your activity class.

• Only startActivityForResult can be used to launch a new activity from your activity class.
• startActivity(myIntent); and startActivityForResult(myIntent, -1); have the same result.
• startActivity(myIntent); and startActivityForResult(myIntent, 0); have the same result.
• When startActivity is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.
• When startActivityForResult is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers