1/280
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Point out the wrong statement
A. Non Relational databases require that schemas be defined before you can add data
B. NoSQL databases are built to allow the insertion of data without a predefined schema
C. NewSQL databases are built to allow the insertion of data without a predefined schema
D. all
A. Non Relational databases require that schemas be defined before you can add data
Which of the following class is used to create and consume custom events in Node.js?
A NodeEvent
B. Events
C. Event
D. EventEmitter
D. EventEmitter
What will be the output of the below code in the console?
File: my_module.js
exports.name = 'Zeus';
Code:
var my_module = require('/mymodule');
console.log((function(settings){
return settings.split(").reverse().join(")
})(my_module.name));
A. Error
B. Zeus
C. undefined
D. sueZ
A. Error
How can you use the promise API with a callback-based function such as child__process.exec?
A new Promise(child__process.exec())
B. util.promisify(child__process.exec())
C. util.promisify(child__process.exec)
D. new Promise(child__process.exec)
C. util.promisify(child__process.exec)
What type of electronic document contains a public key?
A. digital certificate
B. smart card
C. security token
D. biometric
A. digital certificate
Which statement executes the code of samplejs file?
A nodejs sample.js
B. node sample.js
C. sample.js
D. All the answers are wrong
B. node sample.js
Which API clears the saved Dynamic Link to prevent it from being accessed twice?
A. getlnvitation API
B. get API
C. setlnvitation API
D. set API
A. getInvitation API
What should you do in your code to improve your application's performance?
A. Don't use synchronous functions
B. Use gzip compression
C. Do logging correctly
D. Handle exceptions properly
A. Don't use synchronous functions
_id is ___ a bytes hexadecimal number which assures the uniqueness of every document
A. 13
B. 16
C. 12
D. 10
C. 12
Which module is used to serve static resources in Nodejs?
A. node-static
B. http
C. noderesource
D. static
A. node-static
How can we check the current version of NPM?
A. npm --version
B. npm --ver
C. npm help
D. all the answers are wrong
A. npm --version
Which of these is the most logical first step in an API development project?
A. Create a functional view of the related application
B. Put API usage monitoring in place
C. Choose either an API proxy or an API gateway
D. All the answers are wrong
A. Create a functional view of the related application
Which statement is true about Node.js and threads?
A. Every Node process runs in a single thread, and all the HO work is run in that same thread
B. Every Node process gets four threads that it can share between its JavaScript VM and the event loop
C. The event loop is single-threaded, but a JavaScript VM can use multiple threads
D. JavaScript execution in Nodejs is single-threaded, but 110 operations are executed using multiple threads
C. The event loop is single-threaded, but a JavaScript VM can use multiple threads
What type of authentication method identifies and recognizes people based on physical traits such as fingerprints?
A. digital certificates
B. WEP
C. RADIUS
D. biometrics
D. biometrics
Which of the following ports not used by FCM?
A. 5228
B. 5229
C. 5230
D. 5231
C. 5231
Which of the following can help developers coordinate API code generation processes?
A. network layer, like an API gateway
B. security setup, like identity and access management
C. An underlying standard, like OpenAPl
D. An interpreted code language, like Python
C. An underlying standard, like OpenAPl
What is the Node LTS version?
A. It is the current unstable version and is to be avoided
B. It is the version that will be retired soon
C. It is the version with the latest features
D. It is the safest version for long-term support
D. It is the safest version for long-term support
Which of the following is NOT a valid stream in Node?
A. process.stdinfo
B. process.stdin
C. process.stdout
D. process.stderr
A. process.stdinfo
You have to read a large text file, replace some words in it, and write it back to a new file. You know that the memory on your target system is limited- What should you do?
A. Use regular expressions directly on the file
B. Use Promises and async/await to offload the task to libuv
C. Copy the file into a database and perform the operations there
D. Use readline together with streams to read and transform and write the file contents line by line
D. Use readline together with streams to read and transform and write the file contents line by line
The Firebase data is representing ___ objects.
A. SQL
B. Mongo
C. JSON
D. Javascript
C. JSON
The mongo shell loads and parses the ____ file on startup.
A. mongo.js
B. mongoc.js
C. mongorc.js
D. all of the mentioned
C. mongorc.js
Which choice is not a valid method on event emitters?
A. start
B. on
C. once
D. off
A. start
When a javaScript function is invoked (called) in Node, where is a new frame placed?
A. the call stack
B. the event loop
C. the poll phase
0. the events queue
A. the call stack
Which of the following method returns a cursor?
A. find
B. sort
C. skip
D. all of the mentioned
A. find
What is the most common form of authentication?
A. Pin
B. Public Key Infrastructure
C. Password
D. Biometrics
C. Password
When you run JavaScript in a Nodejs application, which of the following elements in a Node-is stack actually executes that JavaScript?
A. The libuv library
B. The c-ares library
C. The VM (like VS or Chakra)
D. The REPL module
C. The VM (like VS or Chakra)
Which global object acts like a bridge between a Node script and the host operating system?
A. v8
B. env
C. process
D. child__process
C. process
What will this code log to the console?
// File: person.js
exports.name = "Jane";
// File: index-is
const person = require('./person.js');
console.log(person);
A. {'Jane'}
B. {name: 'Jane'}
C. {}
D. Jane
B. {name: 'Jane'}
In MongoDB, ____ operations modify the data of a single collection.
A. GRID
B. All of the mentioned
C. Read
D. CRUD
D. CRUD
Which of the following statement will insert 400 documents in to the testData collection?
A. insertData("test", "testData", 200)
B. insertData("test", "testData", 400)
C. insertData("test", 'testData", 600)
D. all of the mentioned
B. insertData("test", "testData", 400)
Which habit gets developers into trouble when they develop RESTful APls?
A. Using any HTML methods
B. Keeping old versions of APIs available
C. Using custom API error codes
D. Providing state information to apps
C. Using custom API error codes
Which of the following function is valid for creation of new data inside MongoDB Shell?
A.
function insertData(dbName, colName, num)
{
var col = db.getSiblingDB(dbName).getCollection(colName);
for (i = 0; i < num; i++)
{
col.insertData({
x: i
});
}
print(col.count());
}
B.
function insertData(dbName, colName, num)
{
var col = db.getSiblingDB(dbName).getCollection(colName);
for (i = 0; i < num; i++)
{
col.insert({
x: i
});
}
print(col.count());
}
C.
insertData(dbName, colName, num)
{
var col = db.getSiblingDB(dbName).getCollection(colName);
for (i = 0; i < num; i++)
{
col.insert({
x: i
});
}
print(col.count());
}
D. None of the mentioned
B.
function insertData(dbName, colName, num)
{
var col = db.getSiblingDB(dbName).getCollection(colName);
for (i = 0; i < num; i++)
{
col.insert({
x: i
});
}
print(col.count());
}
The ___ message is used to update a document in a collection;
A. UPDATE
B. OP__UPDATES
C. OP__UPDATE
D. All of the mentioned
C. OP__UPDATE
What are the commands are used to enable debugging in Express App?
A. Linux
B. Windows
C. Both A and B
D. None
D. None
Which of the following tool automates various tasks of Node.js application?
A. Express.js
B. GruntJS
C. NPM
D. All the answers are wrong
B. GruntJS
Which function should be used to access the specific parts of a collection that have been made available to the client?
A.meteor.write()
B.meteor.subscribe()
C.meteor.publish()
D.meteor.read()
B.meteor.subscribe()
How to store local variables that can be access within the application?
A. Using app.storage
B. Using app.locals
C. Using database
D. Config file
B. Using app.locals
What are core features of Express framework?
A. Allows to set up middlewares to respond to HTTP Requests
B. Defines a routing table which can works as per HTTP Method and URL
C. Dynamically render HTML Pages
D. All of the others
D. All of the others
In Nodejs how node based web servers differ from traditional web servers?
A. Node based server uses a single threaded model and can serve much larger number of requests compared to any traditional server like Apache HTTP Server
B. Node based server process request much faster than traditional server
C. There is no much difference between the two
D. All the answers are correct
A. Node based server uses a single threaded model and can serve much larger number of requests compared to any traditional server like Apache HTTP Server
What function arguments are available to Expressjs Route handlers?
A. req - the request object
B. res - the response object
C. next
D. all of the others
D. all of the others
How can we create instance of http module?
A. var http = require("http")
B. var http = new require("http")
C. var http = new http()
D. All the answers are wrong
A. var http = require("http")
Which of the following method returns one document?
A. findOne()
B. findOne1()
C. selectOne()
D. searchOne()
A. findOne()
____ allows you to log on once and access multiple related by different systems without having to log on again.
A. Two Factor Authentication
B. Single Sign On
C. Multi-factor Authentication
D. Password
B. Single Sign On
Which term is used in reference to the process of giving individual-access to a system or resource?
A. authentication
B. authorization
C. accounting
D. auditing
B. authorization
What does RAML stand for?
A. Reusable API Markup Listing
B. RESTful API Mobile Language
C. REST Application Modeling Language
D. RESTful API Modeling Language
D. RESTful API Modeling Language
Which of the following method is called while accessing documents using the array index notation ?
A. cur.toArray()
B. cursor.toArray()
C. doc.toArray()
D. point.toArray()
B. cursor.toArray()
Which statement about event emitters is false?
A. Event names must be camelCase strings
B. The emit method allows arbitrary set of arguments to be passed to the listener functions
C. Any values returned by the listeners for an emitted events are ignored
D. When an event emitter objeect emits an event, all of the functions attached to that specific event are called
synchronously
A. Event names must be camelCase strings
Why a Node.JS code is pretty fast although being written in JavaScript?
A. Node.JS internally converts JavaScript code to Java based code and then execute the same
B. Node.JS internally converts JavaScript code to C based code and then execute the same
C. Being built on Google Chrome's V8 JavaScript Engine
D. All the answers are wrong
C. Being built on Google Chrome's V8 JavaScript Engine
How many types of Firebase Database Rule?
A. 2
B. 3
C. 4
D. 5
C. 4
(.read, .write, .validate, .indexOn)
What is the process of converting data into a format that cannot be read by another user?
A. Encryption
B. Keying
C. Locking
D. Registering
A. Encryption
Which of the following is a secret numeric password used for authentication?
A. security token
B. digital certificate
C. digital signature
D. PIN
D. PIN
What method is used for filtering in Firebase?
A. equalTo() method
B. endAt() method
C. startAt() method
D. All the answers are correct
D. All the answers are correct
Which one of the following is equivalent in MongoDB select" from employee order by salary desc;?
A. db.employee.find.sort({"salary":1}]
B. db.employee.sort ({"salary":-1}]
C. db.employee.sort({"salary":1}]
D. db.employee.find.sort ({"salary":-1}
D. db.employee.find.sort ({"salary":-1}
Which module variable holds the resolved absolute path of the current module file?
A. __pathname
B. __location
C. __flder
D. __filename
D. __filename
Which choice is not a subclass of the Error class?
A. GlobalError
B. TypeError
C. RangeError
D. AssertionError
A. GlobalError
Which of the following is true about RESTfuI web services?
A. Webservices based on REST Architecture are known as RESTful web services
B. Web services uses HTI'P methods to implement the concept of REST architecture
C. All the answers are correct
D. All the answers are wrong
C. All the answers are correct
Which method used to update the Firebase data?
A. alter
B. put
C. set
D. update
D. update
Point out the correct statement.
A. Collection is a group of MongoDB documents
B. MongoDB is an open-source document database, and leading NoSQL database
C. Collections do not enforce a schema
D. All of the mentioned
D. All of the mentioned
Which of the following statements holds good with respect to Node?
A. Node being a single thread, and uses async function calls to maintain the concurrency
B. Every API of Node is are asynchronous
C. Node thread keeps an event loop and whenever any task get completed, it fires the corresponding event which signals the event listener function to get executed
D. All of the others
D. All of the others
Which is the best command to run in order to empty your Mongo database?
A. meteor remove Mongo
B. meteor list
C. meteor repair
D. meteor reset
D. meteor reset
MongoDB can be used as a ___ , taking advantage of load balancing and data replication features over multiple machines for storing files
A. AMS
B. CMS
C. File system
D. None of the mentioned
A. AMS
When we want to detach all callbacks, we can use : playersRef.off();
A. True
B. False
C. Can be true or false
D. Can not say
A. True
When a request event is received in the HTTP module, what is the type of the first argument passed to that event, usually named req?
A. http.ServerRequest
B. http.lncomingMessage
C. http.ClientRequest
D. http.ServerResponse
B. http.lncomingMessage
Cookies are complex, large files/data that are sent to server with a client request ad stored on the server side.
A. True
B. False
C. Can be true or false
D. Can not say
A. False
Which is the best syntax to add a new entry to a Mongo database?
A. db.insert({"title":"Two Cities"})
B. db.add("title":"'l'wo Cities")
C. db.insert({"title","Two Cities"})
D. db.add("title","Two Cities")
A. db.insert({"title":"Two Cities"})
https://www.mongodb.com/docs/manual/reference/method/db.collection.insert/
How can you count the number of logical CPUs on the machine that is running Node?
A. node -p "process.cpus"
B. node -p "util.cpus().size"
C. node -p "process.os.cpus"
D. node -p "os.cpus().length"
D. node -p "os.cpus().length"
Which of the following is best practices for firebase?
A. Avoid Nesting Data
B. Denormalize Data
C. Both A and B
D. All the answers are wrong
C. Both A and B
Which method requests that the server accept the data enclosed in the request as a modification to existing object identified by the URI?
A. GET
B. DELETE
C. POST
D. PUT
D. PUT
What are the arguments passed to the module wrapper function?
A. exports
B. process
C. require
D. module
D. module
What are the arguments passed to the module wrapper function?
A. exports, __filename, __dirname
B. exports, process, require, module, __filename, __dirname
C. exports, module, __filename, __dirname
D. exports, require, module, __filename, __dirname
D. exports, require, module, __filename, __dirname
Which method will write or replace data on a specified path?
A. SET
B. GET
C. PUT
D. USE
A. SET
Which syntax is correct for declaring a Mongo collection named theFarm?
A. farmdb = new Mongo.Collection('theFarm');
B. farmdb = new Mongo.collection('theFarm');
C. farmdb = new mongo.Collection('theFarm');
D. farmdb = new mongo.collection('theFarm');
A. farmdb = new Mongo.Collection('theFarm');
https://docs.meteor.com/api/collections
In combination with a request method, root paths define the endpoints at which requests can be made. Which of the following are valid forms of route path?
A. strings
B. string patterns
C. regular expressions
D. All the answers are correct
D. All the answers are correct
Which of the following packages prevents writing to the Mongo collection when it is removed?
A. autopublish
B. insecure
C. tracker
D. mongo
B. insecure
https://docs.meteor.com/api/collections#Mongo-Collection-deny
Which core module in Node can you use to compile and run JavaScript code in a sandbox environment?
A. sandbox
B. buffer
C. vm
D. v8
C. vm
MongoDB has been adopted as software by a number of major websites and services.
A. Front-end
B. Back-end
C. Proprietary
D. All of the mentioned
B. backend
Which block function has the correct syntax to display several documents that have been sent to a template?
A. {{each photos}}
B. {{#each photos}}
C. ((each photos))
D. ((#each photos))
B. {{#each photos}}
(Handlebars template engine)
___ can be used for batch processing of data and aggregation operations
A. Hive
B. MapReduce
C. Oozie
D. None of the mentioned
B. MapReduce
Imagine that you sent the following ajax request:
$.post("/process", {name:'john'}, function(data){
// Do some stuff
});
What will be the answer from the server?
Tip: On server side, we have the code which is given below
Code:
app.post('/process', function(req, res) {
var data = "";
if (req.xhr) {
data += 'One';
}
if (req.body.name) {
data += 'Two';
}
res.send(data);
});
A. 'One'
B. 'Two'
C. 'OneTwo'
D. All of these
C. 'OneTwo'
Giải thích:
1.Bên client gửi post request bằng đoạn code này (Đây là AJAX)
$.post("/process", {name:'john'}, function(data){
// Do some stuff
});
"/process" : là route
{name:'john'} : là phần body của request
function(data){} : là callback function
2.Bên server nhận post request và xử lý bằng đoạn code này
app.post('/process', function(req, res) {
var data = "";
if (req.xhr) {
data += 'One';
}
if (req.body.name) {
data += 'Two';
}
res.send(data);
});
+Lúc này một biến rỗng tên là data được tạo ra ==> data = ''
+if đầu tiên kiểm tra xem một request có được gửi bằng AJAX hay không, lúc này req.xhr trả về true và thêm dữ liệu ==> data ='One'
+if thứ hai kiểm tra xem body của request có dữ liệu hay không, dữ liệu của body lúc này là {name:'john'} và thêm dữ liệu ==> data = 'OneTwo'
+Server trả một response với giá trị là 'OneTwo' về client
Which of the following is the correct way to get a normalized path?
A. path.normalize('/test/test1//2slashes/1slash/tab/..')
B. fs.normalize('/test/test1//2s|ashes//1slash/tab/..')
C. os.normalize('/test/test1//2s|ashes//1slash/tab/..')
D. All the answers are wrong
A. path.normalize('/test/test1//2slashes/1slash/tab/..')
How would you determine the number of cluster instances to start when using the cluster module?
A. const numInstances = cluster.instances().length;
B. const numInstances = cluster.instances();
C. const numInstances = require('os').cpus().length;
D. const numInstances = process.cpus().length;
C. const numInstances = require('os').cpus().length;
What is the correct way to pipe a readable stream and a writable stream?
A. readableStream.pipe(writableStream)
B. readableStream.on(pipe, writableStream)
C. writableStream.pipe(readableStream)
D. writableStream.on(pipe, readableStream)
A. readableStream.pipe(writableStream)
Which of the following method returns true if the cursor has documents?
A. hasMethod()
B. hasDoc()
C. hasNext()
D. All of the mentioned
C. hasNext()
___ is the term used in reference to two or more authentication methods used to authenticate someone.
A. Multifactor authentication
B. Two-factor authentication
C. Single Sign On
D. Passwords
A. Multifactor authentication
Which of the following objects allows you to get the value of the parameters on the URL?
A. req.params object
B. app.locals object
C. reg.data object
D. All the answers are wrong
A. req.params object
When might development teams select SaaS when creating APIs?
A. When an API does not fit in the current development toolchain
B. When you are working on small, fast-evolving projects
C. When in-house tool building costs are a concern
D. All of these scenarios
D. All of these scenarios
Is it possible to write tests in Node.js without an external library?
A. yes, through the debugger module
B. yes, through the assert module
C. yes, through the console module
D. no
B. yes, through the assert module
MongoDB stores all documents in:
A. Tables
B. Collections
C. Rows
D. All of the mentioned
B. Collections
What code print the endianness of operating system?
A. console.log('endianness : ' + os.getEndianness());
B. console.log('endianness : ' + os.endianness);
C. console.log('endianness : ' + os.endianness());
D. All the answers are wrong.
C. console.log('endianness : ' + os.endianness());
What is the process of identifying an individual?
A. authentication
B. authorization
C. accounting
D. auditing
A. authentication
Which syntax returns the first matching result in a Mongo database?
A. db.find()
B. db.Find()
C. db.findone()
D. db.findOne()
D. db.findOne()
Which of the following statements is used to install the Node.js express module?
A. $ node install express
B. $ install express
C. $ npm install express
D. All the answers are wrong
C. $ npm install express
Which of the following is second argument to projection ?
A. findOne()
B. findOne1()
C. selectOne()
D. find()
D. find()
What are the key features of Node.js?
A. Real time Data intensive
B. Highly scalable servers for Web Applications
C. Builds fast and scalable network Applications
D. All the answers are correct
D. All the answers are correct
The mongo shell and the MongoDB drivers use as the default write concern.
A. Nacknowledged
B. Acknowledgement
C. Acknowledged
D. All of the mentioned
C. Acknowledged
Which of these API management strategies picks a specification of a RESTful API and supports adaptation of that model to the specific interface requirements of a project?
A. The open process approach
B. The model approach
C. The iPaaS approach
D. All the answers are wrong
B. The model approach
What kind of apps is Firebase a backend for building?
A. Web
B. Android
C. IOS
D. All the answers are correct
D. All the answers are correct
Firebase is a backend platform for building?
A. Web
B. Android
C. IOS
D. All of the above
D. All of the above
Which of the following is not an Firebase Advantages?
A. No need for complicated configuration.
B. The data is real-time
C. Firebase offers simple control dashboard
D. Firebase free plan is limited to 50 Connections
D. Firebase free plan is limited to 50 Connections
The Firebase data is representing ________ objects.
A. SQL
B. Mongo
C. JSON
D. Javascript
C. JSON