Elance MongoDB Test Answers
·
In what language(s) is MongoDB supported?
Python
Javascript
PHP
All
of above.
Perl
True or False? MongoDB can have foreign keys.
False
True
Which of the following expressions are valid JSON documents?
{Name:
"Schoolify", url: 'www.schoolifybd.com'}
{Name: Schoolify, url: 'www.schoolifybd.com'}
{Name: "Schoolify": url: 'www.schoolifybd.com'}
{Name: "Schoolify". url: 'www.schoolifybd.com'}
{Name: "Schoolify", url: www.schoolifybd.com}
Which of the following are considered Core MongoDB operations?
Create, Select, Update, Drop
Create, Read, Update, Drop
Create,
Read, Update, Delete
Create, Select, Update, Delete
MongoDB's query language uses operators that start with which character?
@
$
#
:
You can write custom MapReduce functions in MongoDB using:
Json
Python
Java
Javascript
PHP
Which of the following would you use to query an inventory collection to get all items of type "food" with price less than $34?
db.inventory.find({type: "food", price: {$lt: 34}}).explain()
db.inventory.find({type:
"food", price: {$lt: 34}})
db.inventory.find({type: "food", price: {$lte: 34}})
The interactive "mongo" shell interface is based on:
JavaScript
Python
Ruby
Scala
Which of the following is syntactically correct for searching the "posts" collection for a post with the title of "Big News Story"?
db.posts.find(title: 'Big News Story');
posts.search('title': 'Big News Story');
posts.search({'title': 'Big News Story'});
db.posts.find({title:
'Big News Story'});
How can you optimize document storage?
Specify an explicit, smaller _id value
Use shorter field names within documents
Embed small documents within other documents
(All
of these)
This replication process is
synchronous
asynchronous
Which of the following terms describe MongoDB?
Document-oriented
DBMS
Static schema
Configurable cache
Relational database
Instead of tables, MongoDB stores data in structures called:
Collections
Pages
Maps
Tuples
What does MongoDB's Sharding provide?
Automatic balancing for changes in load and data distribution
Automatic failover
Easy addition of new machines without down time
Scaling to one thousand nodes
All
of these
Which of the following statement are true
The _id of a document need only be unique on the shard in which the
document is housed
By default, there is no index on _id. It is best practice to add one if
you expect to query based on _id.
If
you do not specify and _id when doing an insert, the driver will create one for
you
You must specify and _id when inserting documents
The maximum BSON document size is:
8 megabytes
4 megabytes
16
megabytes
12 megabytes
MongoDB supports UTF-8 for strings in stored objects and queries:
Sometimes
Never
Always
Which of the following statements are true about MongoDB
MongoDB supports joins
MongoDB does not support transactions and operations are not atomic.
MongoDB
does not support transactions but operations are atomic.
MongoDB supports transactions
Which platform does MongoDB support?
Mac OS X
Windows
Linux
All
of above
The MongoDB database is capable of:
ACID-compliant transactions
Multi-table joins
Atomic
(per document) operations
Multi-object commits with rollbacks
MongoDB stores documents in structures called
BSON
objects
JSON objects
JavaScript objects
ODB objects
Which method should be used to create an index on a collection, if it does not already exist?
ensureIndex()
createIndex()
reIndex()
checkIndex()
To perform a search on a collection, and obtain a cursor object for the results, use:
query()
findAndModify()
find()
findOne()
The map-reduce operation uses a temporary collection for data processing; The benefit of this behavior is that the operations:
Do not take up any additional space in the database
Are more secure than they would be if performed on a named collection
Can
be performed concurrently on the same collection, without affecting the
intermediate states
Are more accurate than they would be if performed on the live data
Which statement of the followings could NOT drop an index?
db.runCommand({dropIndexes:'foo', index : '*'})
db.runCommand({dropIndexes:'foo', index : {y:1}})
db.myCollection.reIndex()
db.collection.dropIndex({x: 1, y: -1})
db.collection.dropIndexes();
To create an index for user_name field on user collection, which of the following is the correct syntax?
db.user.ensureIndex({user_name:1});
db.user.createIndex({user_name:1});
db.user.saveIndex({user_name:1});
db.user.attachIndex({user_name:1});
The currently preferred replication method is called:
Replica pairs
Master/Slave
Arbiter members
Replica
sets
TSV files should be expected to contain:
Document indexing for a named Collection
Binary data logs
Tab-separated
text fields
Geographic data coordinates
To atomically modify and return a single document from a collection, use:
upsert()
aggregate()
findAndModify()
update()
Indexes in mongodb are NOT good for:
Collections where the number of reads is much greater than the number of
writes.
Collections
which are write-intensive
Which feature of mongoDB is used to balance load among multiple machines?
GridFS
Sharding
Replica Sets
Geospatial Indexing
BSON
MongoDB uses GridFS to:
Store
large files, distributed as smaller pieces
Prevent data loss after a crash or hard shutdown
Reduce and summarize large data structures
Index and sort extremely large sets of documents
The core database operations in MongoDB are abbreviated as:
BSON
JSON
CRUD
MDB
In MongoDB V2.4, what type of JavaScript engine is used to execute all JavaScript on Mongo shell ?
Rhino
SpiderMonkey
JavaScriptCore
Futhark
V8
The aggregation framework is most similar to which facility from the world of relational databases
views
foreign keys
Group
by
constraints
The binary log of transactions used to recover the database after a crash is called the:
Journal
Master Replica
Primary Shard
Ledger
When Storing large files in MongoDB one is encouraged to use...
GridFS
BSON
MongoFS
None of these
Authentication in MongoDB is:
Available with sharding since version 1.8.
Off
by default.
U udp firewall between mongod and client connections.
Based on Linux user authentication.
Not needed if we use a non-standard port for mongod.
MongoDB's Replication can be in Master-Slave form or _______ form.
Replica
Sets
None of above
Replications
Sharding
Which of the following is not a stage in the aggregation pipeline
sort
group
having
limit
Which of the following atomic operations would you use to add a value to an array only if it does not already exist in the array?
$inc
$pop
$push
$addToSet
$pull
While replication provides data redundancy, journaling is also recommended because:
It allows the use of Replica Sets in addition to Replica Pairs
It improves write performance on the journaled database
It
allows faster, more reliable recovery after a crash
It improves read performance on the journaled database
Which feature of mongoDB is used for data redundancy?
GridFS
Embedded Documents
Sharding
BSON
Replica
Sets
MongoDB can have indexes on Array Elements?
False
True, MongoDB indexes the first non-empty element of the array.
True, MongoDB indexes the first element of the array.
True,
MongoDB indexes each element of the array.
What's the difference between `save()` and `insert()` in mongo shell?
No difference between them.
save() updates the document if if already exists (judges by comparing
them byte by byte); inserts if it's new.
save() updates the document if if already exists (judges by their
indexed keys); inserts if it's new.
save()
updates the document if if already exists (judges by if they already contains
`_id`); inserts if it's new.
None of above is correct.
MongoDB uses the acronym TTL to mean:
Table Time Limit
Temporary Table Listing
Time
To Live
Total Time Limit
Indexing
Makes all writes faster
Makes writes that involve the index faster
Slows down reads that involve the index
Slows
down writes that involve the index
An operation is said to be "idempotent" if it is proven to:
Eventually produce consistent results, if run a sufficient number of
times with the same inputs
Produce varying results when run multiple times, even with the same
input
Produces results within linear time, compared to the number of inputs
Produce
consistent results over multiple runs, given the same input
Which of the following binaries handles routing of sharded queries to the proper shard?
mongo
mongorouter
mongos
mongod
MongoDB document names cannot start with the characters:
@ or #
( or )
$
or .
^ or *
What do drivers use with protocol on the wire?
Protocol Buffers
BSON
REST
JSON
Due to their default behavior, Capped Collections are ideal for storing:
Non-vital,
chronological records, like logs
Important records like user accounts or invoices
Records that require high levels of consistency, e.g. account balances
or sales figures
Extremely large, unordered lists of documents
When a Capped Collection becomes full, and a new document is added:
The collection expands, based on size_increment property, only if
auto_resize is enabled
The
oldest entry is overwritten with the new document
The newest stored entry is overwritten by the new document
The operation fails
What is the extra space allocated to document on the disk to prevent moving a document when it grows as the result of update() operations.
map-reduce
pcap
padding
partition
A Priority 0 or "passive" replica member:
Does not vote in elections during a failover
Does not accept read operations
Does not maintain a full copy of the data set
Cannot
become a primary member
"write concern" allows an application to:
Ensure that data storage is evenly distributed between servers
Track the amount of space remaining after each database write
Observe
the success or failure of database writes
Create event handlers that fire in response to database writes
"read preference" affects how an application:
Selects
a replica set member to read from
Selects the index to use when searching for a document
Selects a document collection for a read operation
Sorts the results of a read operation
All writes in MongoDB Must go the primary
False
True by default but can be overridden
True
False by default but can be overriden
If you have a compound index on multiple fields (a,b,c), you can use it to query on:
(a),
(a,b), or (a,b,c)
Any combination of a,b,c
(a), (b), or (c)
Only (a,b,c)
The equivalent for like %keyword% on mongodb find is:
db.collection.find({field:{$regex:{/keyword/},$options:"i"})
db.collection.find({field:"/keyword/i")
db.collection.find({field:{$regex:{/keyword/i}})
How many collections are created when use use gridfs to store large files
2
1
3
0
What is the easiest way to do tasks like totaling or averaging field values in MongoDB newer versions?
Use Map-Reduce
Use
Aggregation Framework
Use newly-implemented $avg and $total collection operations.
You want to minus one to field foo, what should you use?
{ foo : { $inc : -1 } }
{
$inc : { foo : -1 } }
{ foo : { $dec : 1 } }
{ $dec : { foo : 1 } }
Which of the following statements are true about the MongoDB Write Consistency model
Eventually consistent by default
Depends on the value of w parameter specified in the getLastError cal.
Always strongly consistent
Strongly
consistent by default, can be made eventually consistent
Which of the following is the correct operation to query a document for both 'Football' and "Reading" within the interests data collected from a profile?
db.profile.find({interests: "Football", interests:
"Reading"})
db.profile.find({interests:
{$all : ["Football", "Reading"] }})
db.profile.find({interests: {$in: ["Football",
"Reading"] }})
db.profile.find({$or: [{interests: "Football"}, {interests:
"Reading"}]})
How many data types are available in MongoDB?
6
2
8
4
When a replica set election takes place which types of nodes can participate
regular,
hidden, and arbiters
only arbiters
only regular nodes
regular and arbiters but not hidden
Which datum does MongoDB use for calculating geospatial coordinates?
LVM
TSV
GPS
WGS84
What term is use to describe the order that a database stores documents on disk?
sort order
natural
order
write order
oplog
Which of the following is not a BSON serialization type?
ObjectId
Regular expression
Hash
table
Double
In MongoDB's Geospatial Indexing, if you want to create & use index on EARTH, what is NOT TRUE?
Using decimal degrees in (longitude, latitude) order.
Indexing documents by multiple locations is possible in recent versions.
Adding spherical : true inside geoNear query.
Creating a "2d" index first.
Specifying
in key like { lat : -50, lon : 13 }
A property used to address servers based on their real-world locations is called:
GeoIP
Sharding
Cluster tagging
Data-center
awareness
You cannot use characters among /\. "*<>:|? in database names, in release version
<=2.0
>=2.2
>=2.0
<=2.2
>=1.8
MongoDB queries return a limited size (or "threshold") of results by default, usually:
101
256
4096
512
What is the minimum number of mongod instances that may make up a replica set?
1
3
4
2
Haystack Indexes are typically used to:
Index large sets of documents for quick keyword searches
Improve
the performance of 2D geospatial queries
Improve the performance of spherical coordinate queries
Provide full-text indexing and searches within large, individual
documents
Suppose you have a collection foo with an index created using the statement db.foo.ensureIndex({a:1, b:-1, c:1}). Which of the following queries could use the index
db.foo.find({c:1})
db.foo.find({b:1})
db.foo.find({a:1, b:1})
db.foo.find({c:1, b:1})
By default, MongoDB allows up to _____ collections.
32,768
12,000
Unlimited
65,536
24,000
A "SQLError" object is:
An API library for MySQL databases
An object that indicates an error in the webpage
A callback object
An object that is thrown when an error occurs when
manipulating a database
When catching exceptions and returning errors,
which of the following sides are critical to warn about results?
HTML5/CSS3 callbacks
Native side callbacks
XML and JSON callbacks
JavaScript error callbacks
In order to deploy a Phonegap app to an
Android device you will need a
None of these
An Android Provisioning Profile
A Phonegap Certificate
A Google Certificate
In order to deploy a Phonegap project to an
iOS device you must use which IDE?
Eclipse
Xcode
Webstorm
The User Interface in Phonegap takes place in
what kind of object
NetworkView
PencilView
InternetView
WebView
Cordova is the opensource foundation for
Phonegap
True
FALSE
In order to build an app in Phonegap you will
need to know
HTML
Objective-C
HTML and Javascript
Javascript
True or False? The Eclipse IDE can be used to
debug both Javascript code and native side PhoneGap plugins in an Android app?
False
True
It is possible to use bootstrap.js in a
Phonegap App
Only when deploying to tablets
Only if you remove the CSS media queries
FALSE
True
Which of these languages are used by a
PhoneGap app?
JavaScript
All of these
Native languages
HTML5/CSS3
Which of the following best describes a hybrid
app?
One that has features of Windows and Android native
application.
One that has features of IOS and Android native
application.
One that has features of IOS and Windows native
application.
One that has features of both a web application and
a native application.
By default the first user created content in a
Phonegap app is found in:
index.css
index.htm
index.html
index.js
Which Language will you need to know in order
to build a custom Phonegap plugin for Android
Objective-C
Ruby
C#
Java
When can PHP be used in conjunction with a
Phonegap app?
Only the Android environment supports PHP
Only when making network protocols via
(XmlHTTPRequests, WebSockets,..) to communicate with backend services.
You can write any Phonegap application using PHP
You can use a plugin to enable you to write an app
with PHP
What function do you need to use to
communicate between the Cordova JavaScript and native environment?
cord_JS.exec
javascript.exec
cordova.get
cordova.exec
Phonegap is a
Web application framework
IDE
Mobile application framework
Javascript framework
When writing a Phonegap app for iOS you would
tell Phonegap which plugins you wanted to use in which file:
main.m
libCordova.a
config.xml
Localizable.strings
Developing a Phonegap plugin for iOS requires
you to interface Javascript with which language?
Python
Java
Objective-C
Cocoa Touch
Which event allows us to know when the Cordova
application is fully loaded?
"ondeviceready"
event.focus()
There's no way to know when a PhoneGap app is fully
loaded
"pageinit"
It is safe to make calls to the Phonegap API
after which Javascript event fires:
onLoad
viewDidLoad
deviceReady
onBodyLoad
Changes to the DOM in javascript need to be
triggered after which Event:
online
resume
phonegapstart
deviceready
Which language is the entry point for any
plugin?
CSS3
XML
cURL
JavaScript
When creating an iOS Phonegap project from the
command line the compiler creates which files?
Config.xml
All of the above
WWW folder
Default icons
Phonegap is not compatible with which
Javascript framework
Zepto JS
Phonegap is compatible with all HTML, CSS and
Javascript including frameworks.
Angular JS
Backbone JS
Phonegap is owned by:
Adobe
Nitobi
Microsoft
Google
Phonegap does NOT support the following
Platforms
OS/2
iPad
Windows 8
Windows Phone
In order to know device reachability, we can
use the following PhoneGap object:
window.open();
radio.connection
navigator.connection
navigator.connection.cell_3g
PhoneGap is ___ solution.
Paid solution
Open source
subscription solution
Framework
Regarding the Notification plugin, the
"confirmCallback" is called when the user:
Presses one of the buttons on the confirmation
dialog box
Answers an incoming phone call
Presses one of the buttons on the AppBrowser
Swipes to unlock their phone
What sytax would you use to execute custom
code when a certain event fires:
document.exectueCode(
document.addEventListener(
window.startEvent(
window.executeCode
When writing a Phonegap app for android you
would tell Phonegap which plugins you wanted to use in which file:
permissions.xml
AndroidManifest.xml
platform.xml
config.xml
The Adobe PhoneGap Build service allows compiling
a project for multiple platforms in the cloud, by uploading:
HTML, CSS and Javascript assets
HTML, PHP and Sencha assets
Configuration files and Javascript logic
Web and native compiled sources
What is required to run the Phonegap Command
Line Interface
Java
BSD
UNIX
Node.js
The syntax to call a native Phongap feature
from within its Javascript file begins with
phonegap.start(
cordova.exec(
plugin.start(
feature.start(
jquery is a required library in a Phonegap
project
TRUE
False
In order to deploy a Phonegap app to an iPhone
or iPad you will need a:
A Phonegap Certificate
A Certificate from Apple
A Provisioning Profile from Apple
Provisioning Profile and Certificate from Apple
(both C and D)
Phonegap requires jquery
Only the minimized version
TRUE
TRUE; jquery version 1.3 and above
False
Phonegap requires you to use XHTML
TRUE
TRUE after Phonegap version 2.3
False
Phonegap uses native UI instead of CSS to
position HTML elements
False
TRUE
The "onprogress" property is most
closely associated with which PhoneGap object?
FileTransfer
notification.alert
InAppBrowser
notification.confirm
What does function
"camera.getPicture" do?
Open the device's default camera application
Open the device's gallery of images
Upgrade the user's camera to the latest software
version
Select a photo for sharing through email, text or
social media
Which of the following best describes
PhoneGap's architecture?
PhoneGap has a MVC architecture.
PhoneGap has a template based architecture.
PhoneGap has a two tier architecture.
PhoneGap has a plugin-based architecture.
To which directory/directories do you copy
your splash screen image for Android development?
Res/drawable directories
Resources/splash directory
Splash/draw directory
File/popout directories
When developing iOS PhoneGap plugins, you
execute the plugin by using a call from:
JavaScript using window.open function
All of these are valid
JavaScript using cordova.exec function
a custom HTML5 tag
Which callback function do we need to
implement in order to get info from the Compass using the CompassHeading
object?
"headingSuccess"
"degreesCompass"
"compassSuccess"
"compassGo"
Which of the following objects can be
graphically customized?
notification.alert
None of these
notification.confirm
notification.beep
A plugin for which native capability is
currently only available with a third-party plugin
NFC
GPS data
Camera
Local data storage
Which class should be extended by Android
plugins?
PhoneGapPlugin
CordovaPlugin
PluginIntent
Activity
Javascript Lambda Functions can be used in
Phonegap
Only if they don't call cordova.exec
YES
Only if they are not nested
NO
In order to generate a clean, new, PhoneGap
project in Android using a Terminal, we need to:
Generate iOS version before an Android version
Install an Eclipse IDE special command-line bundle
Any of the above will allow us to generate a
project
Make sure that the "tools" and
"platform-tools" folders are in the PATH
Anonymous Javascript functions are prohibited
in Phonegap
Only if they are not contained within a Javascript
closure
NO
only if they rely on variables in native code
YES
You can use high resolution graphics for
retina display devices in Phonegap
Not unless the camera is 8megapixels or more
Only if you set the pixel dimensions of the
container to the pixel dimension of your high resolution graphics
FALSE
True
iOS plugins should use the
"pluginInitialize" method for their ______ logic.
API
startup
SQL injection
shutdown
In order to access device-level features (i.e.
access to camera) in version 3.0, you must implement it as a plugin. The plugin
is added (or removed) to your project by:
Using the CLI’s plugin command
Downloading from the Phonegap website
Downloading directly from Github
Manually adding to your project
The Phonegap API has a function for taking a
photo with the device camera or retrieving a one from the device image gallery.
Which is correct?
phonegap.takePhoto
camera.getCamera
camera.getPhoto
camera.getPicture
Which of the following events is fired when a
PhoneGap application is sent to the background?
"pause"
"pagebeforeshow"
"ondeviceready"
"resume"
You can only access the camera on an iPhone
when using Phonegap 2.7 and above
False
TRUE
It is possible to host a PHP server locally in
Phonegap
False
TRUE
To which file in your Cordova-Android
application's folder do you need to add your plugin?
res/xml/config.xml
res/plugin.xml
configPlatform/android.xml
res/drawable/cordova.xml
Which of these permissions are required when
using the PhoneGap Contacts API in Android?
android.permission.READ_CONTACTS
<plugin name="Contacts"
value="org.apache.cordova.ContactManager" />
android.permission.GET_ACCOUNTS,
android.permission.READ_CONTACTS, android.permission.WRITE_CONTACTS
<Privilege> <Name>ADDRESSBOOK</Name>
</Privilege>
The "capture" object is assigned to
the navigator.device object, therefore it has _______ scope in Javascript.
global
limited
augmented
permission-based
You will need a Macintosh computer in order to
produce a Phonegap app that will be distributed in the Apple iTunes App Store
False
True
In order to compile and run a Phonegap app in
the iPhone simulator with Xcode you will need
A Provisioning Profile from Apple
A Certificate from Apple
None of these
A Phonegap Certificate
CSS Media Queries are required in Phonegap
TRUE
False
Only when deploying to tablets
Only for high-resolution devices
The "options" string for the
InAppBrowser must not contain:
Commas
Letters
Numbers
Blank spaces
The PhoneGap Storage API is based on which
database's specifications?
W3C WebHTML
PhoneSQL Database
W3C WebSQL
WWC SQLWeb
What is the main function of the localStorage
object?
It provides the ability to record and play back
audio files on a device
It obtains information and performs operations
specific to the user's locale and timezone
It allows you to save data as key-value pairs
through the W3C storage interface
It allows you to save data as key-value pairs
through the user defaults of the device
To debug an app using the iOS simulator, you
can use Safari’s developer tools
FALSE
True
In Phonegap for Android the MainActivity class
is extended by what Cordova class
AndroidGap
PhoneGap
DroidGap
AndroidActivity
Which of the following are valid methods of
the FileReader object?
readAsDataURL, truncate, moveTo
readAsDataURL, readAsText, readAsBinaryString
moveTo, copyTo, readAsBinaryString
readAsDataURL, getParent, createWriter
Cordova is distributed by
Adobe
Apache
Apple
Nitobi
Which of the following code can be used to override
the back button behavior of a device?
window.addEventListener("backbuttonpressed",
function() { // New behavior here }, false);
function onBackKeyDown() { // New behavior here }
function onDeviceReady() { device.backButton =
function () { // New behavior here } }
document.addEventListener("backbutton",
function() { // New behavior here... }, false);
Phonegap conforms to what browser protocol:
Opera
WebKit
Depends on destination OS
Mozilla
When debugging an iOS plugin's Objective-C
side, which of the following lines should be added to config.xml?
None of the above
<plugin name="service_name"
value="PluginClassName" />
+
(CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAs...
exec(<successFunction>, <failFunction>,
<service>, <action>, [<args>]);
In Phonegap 3.0, the connection object is
exposed via:
navigator.connection.WIFI
navigator.network.connection.type
navigator.connection.type
Why is using a 9-patch technique recommended
for adding a SplashScreen for Android?
It's necessary to keep the splashscreen visible for
several seconds before launching the app
It's necessary to avoid splashscreen distortion in
different screen sizes
9-patch is not necessary in SplashScreens for
PhoneGap projects
Because 9-patch improves SplashScreen image
resolution
Which of the following is NOT true about the
Geolocation object?
No guarantee is given that the object returns the
device's actual location
It provides location information for the device
It uses synchronous functions that will block the
main thread
It is based on the W3C Geolocation API
Specification
Phonegap requires you to use HTML5
TRUE after Phonegap version 2.3
False
TRUE
When the executeSql method of a SQLTransaction
is called it will invoke its callback with a:
SQLCallback
SQLexec.exe
SQLStatusCheck
SQLResultSet
Which of these parameters are not required
when creating a Cordova project from the iOS command line?
Project name
Package location
Package name
Project location
If you wish to use Parse.com to host a
database for your Phonegap app you will have to use a Plugin
False
Only if you need the internet
TRUE
Only if you are using Javascript
Which of these are NOT PhoneGap supported
mobile platforms?
Firefox OS
Web OS
Tizen and Bada
(all of these)
Which format is used to encode retrieved data
through the FileReader object?
MD5-SHA1
JSON format
UTF-8
base64
Which method should be overriden by an Android
Plugin?
"execute"
"cordova"
"service"
"action"
If you forget to add your iOS plugin's mapping
to config.xml, what could happen?
The app does not crash, but a native dialog is
displayed with an error
The app crashes, and the Xcode log shows an error
The app crashes, but it will not return an error
The app does not crash, but the Xcode log shows an
error
When a call to a Database object's transaction
method is performed, what PhoneGap object should be used in order to invoke
callbacks?
SQLTransaction
new JavaTransaction(args)
SQLResultSetRowList
SQLCallback
Phonegap uses a simplified version of
Javascript
False
TRUE
Assuming you have your platform SDK, Node.js
and the Phonegap utility already installed, what is the correct command for
building a project for version 3.0?
$ phonegap create myproject com.example.myproject
MyProject
$ cordova create myproject com.example.myproject
MyProject
$ ./create myproject com.example.myproject
MyProject
$ phonegap ./create myproject com.example.myproject
MyProject
What PhoneGap object can be used to get the
device platform name?
Platform
Device
Notification
Window.device
The default security policy for outside domain
access is to:
Allow all network access to outside domains.
Forbid all network access to outside domains
Forbid network access for some dangerous domains
Allow all network aceess for some predefined
domains
If you write an App in Phonegap, you will be
able to run it on Android and iPhone without modifying your custom Javascript
Maybe
No
Yes
Which of the following statements is true?
All of these
The Connection object allow us to know the WiFi
status, but not celullar connection
PhoneGap can't recognize the device OS that is
currently running
You can use FileWriter to write to a file multiple
times
When embedding Cordova's WebView on Android,
what happens if you don't add the thread pool?
Web pages will not load completely
The plugins will use incorrect threads
The WebView plugin will operate at slower speeds
The plugins will have no threads to run on
Remote debugging on an iOS device is possible
on some platforms by using which of the following:
Chrome
Safari
Firebug
Weinre
In Phonegap 3.0 a Plugin is called a
Tool
Interface
Feature
Plugin
Which of the following is true about the
Capture object?
It is assigned to the navigator.device object, and
therefore has global scope
It is assigned to the window object, and therefore
has a local scope
All of these
It does support image and video capture, but not
audio capture
What is the correct command for installing a
Phonegap plugin via CLI? (Example: Camera plugin)
$ phonegap local plugin add
https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
$ phonegap plugin add
https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
$ phonegap local plugin add camera
$ cordova local plugin add
https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
Regarding Android PhoneGap plugins, which
thread is used to run JavaScript code in a WebView?
An activity thread
A private thread
WebCore
UI Thread
Which of the following are the two properties
handled by the "batterycritical" event?
criticalLevel (to know whether the battery is below
10% or not) isPlugged (to know whether or not the device is plugged in)
level (to get battery percentage) isPlugged (to
know whether or not the device is plugged in)
level (to get battery percentage) isDamaged (to
know whether or not the device has a damaged battery)
None of the above is handled by the
"batterycritical" event
Phonegap build can accommodate all third-party
plugins for its build process?
TRUE
False
When hiding a splash screen in iOS, what value
do you need for "AutoHideSplashScreen" in the config.xml file?
true
navigator.splashscreen.hide()
3000
false
In order to submit a Phonegap app to the Apple
iTunes App Store you would need to use
A Phonegap Certificate
XCode and "Application Loader"
"Phonegap Build"
Only "Application Loader"
Which thread is used to execute iOS plugin
methods?
UIWebView Thread
Plugin methods don't execute in any thread
WebCore Thread
UI Thread
Which of the following statements is NOT true?
In Android multiple "watchPosition" can
be in effect at one time
With geolocation.watchPosition, we're able to track
significant position changes
All of these are true
In iOS, multiple "watchPosition" can be
in effect at one time
You will need a Macintosh computer in order to
produce a Phonegap app that will run on an iPhone
TRUE
False
Subscribe to:
Posts (Atom)