News Ticker

Menu

Browsing "Older Posts"

Browsing Category "Web-Design"

UpWork (oDesk) & Elance PostgreSQL RDBMS Test Question & Answers

July 03, 2015 / No Comments
UpWork (oDesk) & Elance PostgreSQL RDBMS Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of PostgreSQL RDBMS. Lets Start test.


Ques : Which authentication methods are supported by PostgreSQL?
Ans  :  Trust
        PAM
        LDAP
        Radius
        Password

Ques : Which index types are supported by PostgreSQL?
Ans  :  B-tree
        GiST
        Hash
        GIN

Ques : Out of the following backup approaches, which ones are applicable to PostgreSQL?
Ans  : SQL dump
       File system level backup
   Continuous archiving

Ques : In the following operation, which ones can trigger a trigger?
Ans  : insert
       update
   delete

Ques : Which index types support multicolumn indexes?
Ans  : B-tree
       GiST
   GIN

Ques : What kind of triggers are offered by PostgreSQL?
Ans  : Per-row triggers
      Per-statement triggers

Ques : Which of the following statements will cast the integer value 1 to type text?
Ans  :  SELECT CAST(1, text) as cast_integer;
        SELECT 1::text AS cast_integer;
 
Ques : Are the contents of the pg_autovacuum system catalog saved when pg_dumpall is used to backup the database?
Ans  : No

Ques : Can deferrable constraints be deferred by a trigger?
Ans  : Yes

Ques : After a PostgreSQL installation, how will you create the database cluster?
Ans  :  With initd

Ques : Consider the following query:

Create table foo (bar varchar);

What will be the size limit of the bar?
Ans  :  No limit (It will be equivalent to the text)

Ques : What is the difference between to_tsvector() and ::tsvector ?
Ans  :  to_tsvector () can be used in select statements, while ::tsvector cannot

Ques : While creating a trigger, the function it will call may be created after it and attached to it.
Ans  : True

Ques :  What is the command used to import a backup made with pg_dumpall > file.dmp?
Ans  :  psql -f file.dmp

Ques : An ISO-8601 time may be entered into a table using the numeric format 012411 instead of 01:24:11.
Ans  : True

Ques : Consider the following empty table:

CREATE TABLE example (
    a integer,
    b integer,
    c integer,
    UNIQUE (a, c)
);

Which of the following inserts will cause an error?
Ans  : insert into example (a, b, c) values (1, 2, 3), (1, 4, 3);

Ques : What is the effect of turning fsync off in postgresql.conf?
Ans  : File synchronization will be deactivated

Ques : What is the ~ operator?
Ans  : POSIX regular expression match operator

Ques : What is the default ordering when ORDER BY is not specified?
Ans  : The ordering is unknown if not specified

Ques : Which one of the following text search functions does not exist?
Ans  :  plainto_tsvecto

Ques : Which PostgreSQL version added the enum datatype?
Ans  : 8.0

Ques :  While creating a table with a field of the serial type, a sequence will be created.
Ans  :  True

Ques : What can be stored in a column of type decimal(4,3)?
Ans  : 4 numeric values with up to 3 digits to the right of the decimal point.

Ques : What interfaces are available in the base distribution of PostgreSQL?
Ans  : C

Ques : A table can have only one primary key column.
Ans  : True

Ques : What command will correctly restore a backup made with the following command?
pg_dump -Fc dbname > filename
Ans  : psql -f filename dbname

Ques :   How can you configure PostgreSQL autovacuum?
Ans  : By editing postgresql.conf

Ques :  What library is used by PostgreSQL for encryption?
Ans  : None of the above

Ques : On a UNIX system, what is the best way to prevent all non-local connections to the postmaster?
Ans  :  None of the above

Ques : How will you change the TCP port which PostgreSQL will listen to?
Ans  : By changing "port" in postgresql.conf

Ques : Which of the following queries will create a table with two fields, "id" and "name" with "id" as an auto incrementing primary key?
Ans  :  create table foo (id serial primary key, name varchar(255));

Ques : How will you list the available functions from psql?
Ans  :  \df

Ques : What is the well known port number for the postgresql database service?
Ans  : 5432

Ques : What is true regarding file system backup?
Ans  : All of the above

Ques : How do you alter a column to forbid null values?
Ans  : None of the above

Ques : What is the storage size of an integer on a 64bit system?
Ans  : 4bytes

Ques : Which function should be used to highlight the results?
Ans  :  ts_highlight

Ques : When using LIKE to compare strings, what is the wildcard operator (operator which matches zero or more characters)?
Ans  : *

Ques : For proper results, which of the following should contain a tsvector?
Ans  : Lexemes

Ques : Which of the following statements will produce an error?
Ans  :  SELECT now()::int;

Ques : To backup a database, the postmaster daemon must be halted.
Ans  : True

Ques : The following statement will retrieve the second element of the array column products in table store_products.

SELECT products[1] FROM store_products;
Ans  : True

Ques : SELECT 'infinity'::timestamp;

Will this statement produce an error?
Ans  : Yes

Ques :  What is the difference between tokens and lexemes?
Ans  :  A lexeme is a string while a token is an intege

Ques : Which kind of index can be declared unique?
Ans  : Hash

Ques :  SELECT rtrim('foobar', 'abr');

The result of this statement is foo.
Ans  : True

Ques : SELECT !!3;

What output will this statement give?
Answers:
Ans  : 6

Ques : How do you create a table with a field of the int array type?
Ans  : create table foo (bar integer[]);

Ques : create table foo (bar integer[]);
Ans  : None of the above

Ques : Which of the following statements will create a table with a multidimensional array as second column?
Ans  : CREATE TABLE favorite_books (customer_id integer, themes_and_titles text[][]);

Ques : If max_connections is 10 and 10 connections are currently active, how can you be sure the superuser will be available to connect?
Ans  :  Set superuser_reserved_connections in postgresql.conf

Ques : How will you rank text search results?
Ans  : With the ORDER BY operator

Ques : Which of the following statements will create a table special_products which is a child of the table store_products?
Ans  : CREATE TABLE special_products (quality int) INHERITS store_products;

Ques : Which of the following statements will create a table?
Ans  : SELECT * INTO products_backup FROM special_products;

Ques : Which of the following statements will retrieve the number of values stored in an array column?
Ans  : SELECT array_dims(products) FROM store_products;

Ques : Does PostgreSQL support SSL?
Ans  : Yes

Ques : Given a table special_products that inherits from a table store_products, which of the following statements will modify store_products only without affecting its child table?
Ans  : UPDATE ONLY store_products SET name = 'Wine' WHERE id = 2;

Ques : How do you select a single random row from a table?
Ans  : SELECT * FROM tab ORDER BY random() LIMIT 1;

Ques : PostgreSQL triggers can be written in C directly.
Ans  : True

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance Oracle PL Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance Oracle PL Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Oracle PL. Lets Start test.


Ques : The oracle server implicitly opens a cursor to process:
Ans  :  A Sql select statement
       DML Statements

Ques : Which two among the following programming constructs can be grouped within a package?
Ans  : Constant
       Sequence

Ques : Which two statements, among the following, describe the state of a package variable after executing the package in which it is declared?
Ans  : It persists across transactions within a session
       It persists from session to session for the same user

Ques : Which of the following is not a legal declaration?
Ans  : declare x,y varchar2(10);
      declare Sex boolean:=1;
 
Ques : Which two statements out of the following regarding packages are true?
Ans  : The package specification is required, but the package body is optional
       The specification and body of the package are stored separately in the database
 
Ques : A table has to be dropped from within a stored procedure. How can this be implemented
Ans  : Use the DBMS_DDL packaged routines in the procedure to drop the table

Ques : CREATE OR REPLACE PACKAGE manage_emp IS
tax_rate CONSTANT NUMBER(5,2) := .28;
v_id NUMBER;
PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER);
PROCEDURE delete_emp;
PROCEDURE update_emp;
FUNCTION cal_tax (p_sal NUMBER) RETURN NUMBER;
END manage_emp;
/
CREATE OR REPLACE PACKAGE BODY manage_emp IS

PROCEDURE update_sal (p_raise_amt NUMBER) IS
BEGIN
UPDATE emp SET sal = (sal * p_raise_emt) + sal
WHERE empno = v_id;
END;

PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER) IS
BEGIN
INSERT INTO emp(empno, deptno, sal) VALUES
(v_id, p_depntno, p_sal);
END insert_emp;

PROCEDURE delete_emp IS
BEGIN
DELETE FROM emp WHERE empno = v_id;
END delete_emp;

PROCEDURE update_emp IS
v_sal NUMBER(10,2);
v_raise NUMBER(10, 2);
BEGIN
SELECT sal INTO v_sal FROM emp WHERE empno = v_id;
IF v_sal < 500 THEN v_raise := .05;
ELSIP v_sal < 1000 THEN v_raise := .07;
ELSE v_raise := .04;
END IF;
update_sal(v_raise);
END update_emp;

FUNCTION cal_tax (p_sal NUMBER)RETURN NUMBER IS
BEGIN
RETURN p_sal * tax_rate;
END cal_tax;
END manage_emp;
/
What is the name of the private procedure in this package?
Ans  : UPDATE_SAL

Ques : An internal LOB is _____.
Ans  : Stored in the database

Ques : The technique employed by the Oracle engine to protect table data, when several people are accessing it is called:
Ans  :  Concurrency Control

Ques : Which table should be queried to determine when the procedure was last compiled?
Ans  : USER_OBJECTS

Ques : Which cursor dynamically allows passing values to a cursor while opening another cursor?
Ans  : Implicit Cursor

Ques : Which precomplied word is called, which when encountered, immediately binds the numbered exception handler to a name?
Ans  : Exception_init

Ques : How can migration be done from a LONG to a LOB data type for a column?
Ans  : Using ALTER TABLE statement

Ques : Which table and column can be queried to see all procedures and functions that have been marked invalid?
Ans  : USER_OBJECTS table,STATUS column

Ques : In which type of trigger can the OLD and NEW qualifiers can be used?
Ans  : Row level DML trigger

Ques : Examine the following trigger:

CREATE OR REPLACE TRIGGER Emp_count
AFTER DELETE ON Employee
FOR EACH ROW
DECLARE
n INTEGER;
BEGIN
SELECT COUNT(*) INTO n FROM employee;
DMBS_OUTPUT.PUT_LINE( 'There are now' || n || 'employees');
END;

This trigger results in an error after this SQL statement is entered: DELETE FROM Employee WHERE Empno = 7499;
How should the error be corrected?
Ans  : Take out the COUNT function because it is not allowed in a trigger

Ques : Which Section deals with handling of errors that arise during execution of the data manipulation statements, which makeup the PL/SQL Block?
Ans  : Exception

Ques :  Which of the following statements is true?
Ans  :  Stored functions can increase the efficiency of queries by performing functions in the query rather than in the application

Ques :Examine the following code:
CREATE OR REPLACE FUNCTION gen_email (first_name VARCHAR2, last_name VARCHAR2,
id NUMBER)
RETURN VARCHAR2 IS
email_name VARCHAR2(19);
BEGIN
email_name := SUBSTR(first_name, 1, 1) ||
SUBSTR(last_name, 1, 7) ||.@Oracle.com .;
UPDATE employees SET email = email_name
WHERE employee_id = id;
RETURN email_name;
END;
Which of the following statements removes the function?
Ans  : DROP FUNCTION gen_email;

Ques : In Pl/Sql, if the where clause evaluates to a set of data, which lock is used?
Ans  :  Page Level lock

Ques : If user defined error condition exists,Which of the following statements made a call to that exception?
Ans  : Raise

Ques : Which of the following are identified by the "INSTEAD OF" clause in a trigger?
Ans  : The view associated with the trigger

Ques : What type of trigger is created on the EMP table that monitors every row that is changed, and places this information into the AUDIT_TABLE?
Ans  : FOR EACH ROW trigger on the EMP table

Ques : Which procedure is called after a row has been fetched to transfer the value, from the select list of the cursor into a local variable?
Ans  :  Row_value

Ques : What is the maximum number of handlers processed before the PL/SQL block is exited, when an exception occurs?
Ans  : Only one

Ques : When the procedure or function is invoked, the Oracle engine loads the compiled procedure or function in the memory area called:
Ans  : PGA

Ques : What happens during the execute phase with dynamic SQL for INSERT, UPDATE, and DELETE operations?
Ans  : The area of memory established to process the SQL statement is released

Ques : Examine the following package specification:
CREATE OR REPLACE PACKAGE combine_all
IS
v_string VARCHAR2(100);
PROCEDURE combine (p_num_val NUMBER);
PROCEDURE combine (p_date_val DATE);
PROCEDURE combine (p_char_val VARCHAR2, p_num_val NUMBER);
END combine_all;
/
Which overloaded COMBINE procedure declaration can be added to this package specification?
Ans  :  PROCEDURE combine;

Ques : Which part of a database trigger determines the number of times the trigger body executes?
Ans  : Trigger type

Ques : Which table should be queried to check the status of a function?
Ans  : USER_OBJECTS

Ques : Which of the following statements is true regarding stored procedures?
Ans  :  A stored procedure must have at least one executable statement in the procedure body

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER secure_emp
BEFORE LOGON ON employees
BEGIN
IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR
(TO_CHAR(SYSDATE, 'HH24:MI')
NOT BETWEEN '08:00' AND '18:00')
THEN RAISE_APPLICATION_ERROR (-20500, 'You may
insert into the EMPLOYEES table only during
business hours.');
END IF;
END;
/
What type of trigger is it?
Ans  : This is an invalid trigger

Ques : Which code is stored in the database when a procedure or function is created in SQL*PLUS?
Ans  : Only P-CODE

Ques : Evaluate the following PL/SQL block:
DECLARE
v_low   NUMBER:=2;
v_upp   NUMBER:=100;
v_count NUMBER:=1;
BEGIN
FOR i IN v_low..v_low LOOP
INSERT INTO test(results)
VALUES (v_count)
v_count:=v_count+1;
END LOOP;
END;
How many times will the executable statements inside the FOR LOOP execute?
Ans  : 1

Ques : What can be done with the DBMS_LOB package?
Ans  : Use the DBMS_LOB.FILEEXISTS function to find the location of a BFILE

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER UPD_SALARY
FOR EACH ROW
BEGIN
UPDATE TEAM
SET SALARY=SALARY+:NEW.SALARY
WHERE ID=:NEW.TEAM_ID
END;
Which statement must be added to make this trigger executable after updating the SALARY column of the PLAYER table?
Ans  : AFTER UPDATE ON PLAYER

Ques : Examine the following code:

CREATE OR REPLACE PACKAGE comm_package IS
g_comm NUMBER := 10;
PROCEDURE reset_comm(p_comm IN NUMBER);
END comm_package;

User MILLER executes the following code at 9:01am:
EXECUTE comm_package.g_comm := 15

User Smith executes the following code at 9:05am:
EXECUTE comm_package.g_comm := 20

Which of the following statement is true?
Ans  :  g_comm has a value of 15 at 9:06am for Miller

Ques : The CHECK_SAL procedure calls the UPD_SAL procedure. Both procedures are INVALID.Which command can be issued to recompile both procedures?
Ans  : ALTER PROCEDURE CHECK_SAL compile

Ques : Examine the following procedure:
PROCEDURE emp_salary
(v_bonus  BOOLEAN,
V_raise BOOLEAN,
V_issue_check in out BOOEAN)
is
BEGIN
v_issue_check:=v_bonus or v_raise;
END;
If v_bonus=TRUE and v_raise=NULL,which value is assigned to v_issue_check?
Ans  : TRUE

Ques : Which package construct must be declared and defined within the packages body?
Ans  :  Private Procedure

Ques : What happens when rows are found using a FETCH statement?
Ans  : The current row values are loaded into variables

Ques : Evaluate the following PL/SQL block:
DECLARE
result BOOLEAN;
BEGIN
DELETE FROM EMPloyee
WHERE dept_id IN (10,40,50);
result:=SQL%ISOPEN;
COMMIT:
END;

What will be the value of RESULT if three rows are deleted?
Ans  : FALSE

Ques : Which two statements among the following, regarding oracle database 10g PL/SQL support for LOB migration, are true?
Ans  : Standard package functions accept LOBs as parameters

Ques : Which command is used to disable all triggers on the EMPLOYEES table?
Ans  : ALTER TABLE employees DISABLE ALL TRIGGERS;

Ques : SQL%ISOPEN always evaluates to false in case of a/an:
Ans  : Implicit Cursor

Ques : Which datatype does the cursor attribute '%ISOPEN' return?
Ans  : BOOLEAN

Ques : Which of the following is a benefit of using procedures and functions?
Ans  : Procedures and Function avoid reparsing for multiple users by exploiting shared SQL areas

Ques : All packages can be recompiled by using an Oracle utility called:
Ans  :  Dbms_utility

Ques : Which type of variable should be used to assign the value TRUE, FALSE?
Ans  : Scalar

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER update_emp
AFTER UPDATE ON emp
BEGIN
INSERT INTO audit_table (who, dated) VALUES (USER, SYSDATE);
END;
/
An UPDATE command is issued in the EMP table that results in changing 10 rows
How many rows are inserted into the AUDIT_TABLE ?
Ans  : 1

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance JSON Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance JSON Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of JSON. Lets Start test.


Ques : Which of the following properties form part of the response to a JSON-RPC method invocation?
Ans  : result + error + id

Ques :  Which of the following methods is/are provided by JSONRequest?
Ans  : get + cancel

Ques : Which of the following parameters can be passed in the JSONRequest.get request?
Ans  : url + done

Ques : Which of the following is/are true with regard to JSONRequest?
Ans  :  It is a two way data interchange between any page and any server + It accumulates random delays before acting on new requests when previous requests have failed.

Ques : Which of the following properties are contained in the request for a JSON-RPC method invocation?
Ans  :  method+ params

Ques : Which of the following statements is/are not correct about the JSON-RPC?
Ans  :  It wraps an object, allowing you to call methods on that object and get the return values. + It allows for bidirectional communication between the service and the client.

Ques : Which of the following parameters can be passed in the JSONRequest.post request?
Ans  :  done+ send

Ques : Which of the following statements is/are true about modules with reference to JSON?
Ans  : Modules cannot have negative CSS margins + The CSS display property of a module must be static.

Ques : Which of the following is a valid JSONPath expression?
Ans  :  $.store.book[0].title

Ques : Which of the following JSONPath elements represents the root object/element?
Ans  : $

Ques : Which of the following parameter values cannot be serialized in JSONRequest?
Ans  : send

Ques : Which of the following correctly describes the term tuple typing in JSON Schema?
Ans  : It provides an enumeration of possible values that are valid for the instance property. It should be an array, and each item in the array should represent a possible value for the instance value.

Ques : Which of the following statements is correct about JSON?
Ans  :  It is a lightweight data interchange format.

Ques : What is the significance of the arrow before the following code in JSON?
--> { "method": "echo", "params": ["Hello JSON-RPC"], "id": 1}
Ans  : It shows the data sent to the service.

Ques : In order to find the authors of all the books in the store, which of the JSONPath codes will you use?
Ans  :  $.store.book[*].author

Ques : What will be the output of the code shown above?
Ans  : OpenDoc 3

Ques : In order to find the price of everything in the store, which of the JSONPath codes will you use?
Ans  : $.store..price

Ques : Which of the following statements correctly describes the following syntax?

{"state":{optional:true},"town":{"required":"state",optional:true}}
Ans  : An instance includes a state property and a town property which is optional.

Ques : Which of the following elements of JSONPath can be used to apply the filter(script) expression?
Ans  : ?()

Ques : State whether true or false.

JSONRequest allows the connection when the Content-Type in both directions is an application/jsonrequest.
Ans  : True

Ques : JSON does not allow you to create an empty object.
Ans  : False

Ques : Which of the following correctly describes the disallow property of the JSON Schema?
Ans  : This attribute may take the same values as the "type" attribute.

Ques : Which of the following correctly describes the function of the JSON.stringify method in JSON?
Ans  :  It converts a JavaScript object into a JSON string.

Ques :  Which of the following properties should be declared first in order to define a schema from an instance?
Ans  :  $schema

Ques : Which of the following schema properties takes schema as value in JSON?
Ans  : extends

Ques : While using JSONRequest.cancel, what will happen to the request if it is still in the outgoing message queue?
Ans  : It will be deleted from the queue.

Ques : What does the [start:end:step] element of JSONPath signify?
Ans  : it represents an array slice operator.

Ques :  Which of the following schema properties does not need to be validated by JSON validators?
Ans  : enum

Ques : Which of the following schema properties always has a unique value for all its instances in JSON?
Ans  : identity

Ques : Which of the following features of JSON has the property of exemption from the same origin policy?
Ans  : JSONRequest

Ques : In the above code snippet, what is the purpose of declaring the JSONRequest.post?
Ans  :  It will queue the request and return the request number.

Ques : Which of the following serialization formats is/are supported by JSON?
Ans  : None of the above

Ques : If a schema property is declared false, which of the following attributes can not be used to extend the schema?
Ans  : additionalProperties

Ques : Which syntax is correct for the jsonPath() function during the implementation of JSONPath?
Ans  : jsonPath(obj, expr [, args])

Ques : In the code snippet below, which line contains an error?

Line1: {
Line2: "id":"person",
Line3: "type":"object",
Line4: "properties":{
Line5: "name":{"type":"string"},
Line6: "age":{"type":"integer"}
Line7: }
Line8: }
Line9: {
Line10:"id":"marriedperson",
Line11: "extends":{"ref":"person"},
Line12: "properties":{
Line13: "age":{"type":"integer",
Line14: "minimum":17},
Line15: }
Line16: }
Ans  : Line 11

Ques : Which of the following correctly describes the JSON Schema?
Ans  :  It is intended to provide validation and interaction control of the JSON data.

Ques : Which of the following parameters of JSONRequest hold/s the information of implicit authentication and cookies during post operation?
Ans  : send

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance Web Design Test Question & Answers

July 02, 2015 / No Comments
UpWork (oDesk) & Elance Web Design Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Web Design. Lets Start test.


Ques : In CSS, z-index is used to do what?
Ans :  Bring div elements to the front or back of other div elements on a webpage

Ques : The asterisk (*) in css refers to:
Ans :Any Element

Ques : All HTML tags are enclosed in what ?
Ans :  <>

Ques : In a CSS Stylesheet, the commands or styles for each ID and Class are called
Ans : Declarations

Ques : Skeuomorphism is used in web design to
Ans :  help users acclimate to elements on a page because they resemble and retain cues from the physical object with the same function

Ques : To adjust leading, one would need to use which CSS property?
Ans :  line-height

Ques : In HTML, the names of IDs and Classes are referred to as
Ans :  Selectors

Ques : Sprites are
Ans : An image with multiple graphics in it that can be used as a CSS background-image to show only parts of the sprite.

Ques : Which one of these statements are TRUE about designing for the web
Ans : Browser rendering of fonts is different between most browsers.

Ques : Some CSS3 declarations are not compatible with older browsers, especially IE8 and earlier versions. What could be a solution?
Ans : All of these

Ques : Allowing white space in your design is a good design tool to_____.
Ans : reduce a page view's complexity and increase user's speed of comprehension.

Ques : SASS and LESS are
Ans :Precompilers that use a syntax with more features that can make writing CSS easier.

Ques : SVG is
Ans : A vector based graphic file format supported in most modern browsers.

Ques : Which resource allow us to use fonts that are not system fonts?
Ans :  @font-face

Ques : What is the preset order of direction listing when using a CSS shorthand property, which can be extended as "property-right" or "property-bottom"?
Ans :  top right bottom left

Ques : When designing forms it's helpful to
Ans : consider streamlining the process by using things like autocomplete comboboxes and date pickers

Ques : As you’re building your template, some of the divs seem to be stacking rather than aligning next to each other as you had intended. Which of the following is a solution to get them to align next to each other?
Ans : Any of these

Ques : What's the name of the meta tag used for mobile website design
Ans : viewport

Ques :  Where is "RewriteEngine on" used?
Ans : When using Apache in the .htaccess file

Ques : When designing call to actions, it's best to
Ans : Draw user attention with considerate prominance through size, color and position

Ques : Which is a good way to implement Responsive Web Design?
Ans : Mostly CSS3 with some jQuery

Ques : Which of these is not a responsive technique for images
Ans : Using absolute width and height values for images

Ques : Social media apps such as Facebook offer interfaces to web developers to integrate into their own web projects. These are referred to as:
Ans : API

Ques : What is the "Three-click rule" ?
Ans : A web user should be able to find any information with no more than three mouse clicks.

Ques : The most important thing to consider when designing for the web is to
Ans : design for the intended audience

Ques : tracking and leading cannot be controlled in web design.
Ans : False

Ques : DOM is best described as:
Ans : A language-neutral object oriented system applied to HTML

Ques : Which one of the following elements are still usable with HTML5 doctype?
Ans : Div

Ques : CSS3 offers developers the ability to create rounded corners and drop-shadows without using images. What are the benefits of NOT using images?
Ans :  All of these

Ques : To create a link to an anchor, you use the______property in A tag.
Ans : href

Ques : You cannot designate an inline image as a hypertext link.
Ans : False

Ques : Search boxes should be:
Ans :  clearly visible, quickly recognizable, and easy to use

Ques : What is the tag for an inline frame?
Ans :  iframe

Ques : Designing a UI refers to:
Ans :  Any of these

Ques : Software programs, like your Web browser, use a mathematical approach to define color.
Ans :  True

Ques : What is a common database querying language.
Ans :  MySQL

Ques : Choose the correct HTML tag for the largest heading
Ans : h1

Ques : Which of these browsers is notorious for giving web developers a headache, not to mention more work to do?
Ans : Internet Explorer

Ques : The page title is inside the____tag.
Ans :  head

Ques :  Tables can be nested (table inside of another table).
Ans : True

Ques : When a user interacts with a menu, what's a good way to provide feedback?
Ans : Changing the color or background of the menu

Ques : H1 is the smallest header tag.
Ans :  False

Ques : When designing a responsive web site, it's important to
Ans : All of them.

Ques : What is the full form of CSS?
Ans : Cascading Style Sheets

Ques : What is the correct HTML tag for inserting a line break?
Ans :

Ques : What does FTP stand for
Ans : File Transfer Protocol

Ques : Which DTD does NOT allow inline styling?
Ans :XHTML 1.0 Strict

Ques : What is the default CSS position of an element?
Ans : Static

Ques : Why do you need a humans.txt file in your web development?
Ans :  This file credits and identifies the people who may take part in the creation of the website.

Ques : True or false: The default browser font size is 16px
Ans : True

Ques : If you want to increase the font size by 2 relative to the surrounding text, you enter +2 in the tag.
Ans :  True

Ques :  Which attribute you should use to create a "tooltip" for an image?
Ans :  Title

Ques : When designing a responsive web site, it's important to
Ans : All of them.

Ques : How would you write Hello in an alert box?
Ans : alert ("hello");

Ques : Which of these is not a responsive technique for images
Ans :  Using absolute width and height values for images

Ques : Sprites are
Ans : An image with multiple graphics in it that can be used as a CSS background-image to show only parts of the sprite.

Ques : When designing forms it's helpful to
Ans :consider streamlining the process by using things like autocomplete comboboxes and date pickers

Ques : Responsive typography generally uses what unit of measurement to scale up and down
Ans : em

Ques : Relative path make your hypertext links______.
Ans :  Portable

Ques : Viewport dimensions at which we decide to alter the page design, are known as:
Ans : Media Queries

Ques :  Which of the following is NOT a component of Responsive Web Design?
Ans : Web fonts

Ques : What declaration would generate a "scrollbar" IF text exceeded a div's fixed size?
Ans :  { overflow : auto }

Ques : Which of the following is a type of HTML code that controls the appearance of the document contents?
Ans :  tags

Ques : A URL redirect is:
Ans : when a domain name or a URL is directed to another domain or URL.

Ques :  Visual hierarchy helps
Ans : establish a pace and order for reading and priority of content

Ques : Which of the following would create a shadow on a div with text inside it?
Ans :  box-shadow

Ques : Which of the following is not a method for adding CSS to an HTML page.
Ans : Entitling CSS to the HTML

Ques : Which of the following is a correct JQuery statement?
Ans :  $(document).ready(function())

Ques : Progress trackers
Ans :is a good technique to help users have context where they are in a multi-step process.

Ques : A “Tableless” website refers to:
Ans :  A website that does not use tables for layout.

Ques : True or false? It is possible to combine structures (e.g, linear and hierarchical).
Ans :  True

Ques : Organic SEO (Search Engine Optimization) most accurately means:
Ans :  Using strategic keywords and phrases to improve the search engine rankings of a web page

Ques :  What are the general syntax for inline image?
Ans :  img src=file

Ques : Which of the following will NOT be found in the
Ans :  Table

Ques : Interpret this statement: Michelle
Ans :  It will print out Michelle in bold font

Ques : True or False? HTML stands for HyperText Markup Logistics.
Ans :  False

Ques : True or False? HTML5 uses some self-closing tags.
Ans : True

Ques : True or False? No matter which word is used, Java and Javascript are still one in the same.
Ans :  False

Ques : In Web design, what are the aspects of space that you should be considering:
Ans :  All options

Ques :  A “responsive” website is one that:
Ans : Resizes to fit different screen sizes

Ques : In relation to the web, CMS stands for:
Ans : Content Management System

Ques :   and
have the same effect
Ans : False

Ques : True or False? Apache is a popular open source web server.
Ans : True

Ques : It's important and helpful to design forms in an order and position as they normally are presented (e.g. address or credit card information forms)
Ans :  True, it helps create a good user experience and builds trust.

Ques : True or False? ASP.NET and PHP are one in the same.
Ans : False

Ques : Which of the following affects SEO?
Ans :  All of these

Ques : In web design terminology, 'widows' and 'orphans' refer to
Ans : An isolated line or word of text

Ques : Which of the following affects the User Experience of the website?
Ans : All of them.

Ques : Is the attribute "align" supported by html5?
Ans :  No

Ques : Which of the following ATTRIBUTE use define the author of a page?
Ans :

Ques : Which of the following is a correct JQuery statement?

Ans :  $(document).ready(function())

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance Twitter Bootstrap Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance Twitter Bootstrap Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Twitter Bootstrap. Lets Start test.
Ques : Which of the following are not Bootstrap plugins?
Ans  : tocible
Ans  :boilerplate

Ques : Which type of trigger cannot be used with the "delay" option to show and hide a popover?
Ans  : manual

Ques : Which of the following will set a modal window to not be closed on click?
Ans  : Setting the option "backdrop" to static

Ques : Which of the following LESS variables does not belong to the Navbar component?
Ans  : @navbar-default-height

Ques : Which of the following classes will make tables scroll up horizontally when width of the view is under 768px?
Ans  : .table-responsive

Ques : Which of the following will set a modal window to be closed when the escape key is pressed?
Ans  : Setting the option "keyboard" to true

Ques : Which of the following will correctly call a dialog prompt?
Ans  :  All of these

Ques : Which of the following is not a Bootstrap component?
Ans  : Pivottable

Ques : Which of the following colors is the default hover background color of the table row?
Ans  :  #f5f5f5

Ques : How many validation styles for states of on-form controls does Bootstrap have?
Ans  : 3

Ques : Which of the following are not options of the method $().tooltip(options)?
Ans  : backdrop

Ques : Which of the following are not options of the method $().tooltip(options)?
Ans  :  backdrop

Ques :  Which of the following are helper classes?
Ans  :  .close

Ques : Which of the following statements is correct about using the Collapse plugin?
A) The Transitions plugin must be included.
B) The Popover plugin must be included.
Ans  : Statement A is true while Statement B is false.

Ques : Which of the following statements are correct with regards passing options?

A) Options can be passed via data attributes or JavaScript.
B) For data attributes, the option name has to be appended to option-, as in option-animation="".
C) For data attributes, the option name has to be appended to data-, as in data-animation="".
D) Options can be passed only via JavaScript.
Ans  :  A and C

Ques :  What is the default amount of time delay between automatically cycling items in a carousel?
Ans  : 5000

Ques :  Which of the following classes are contextual classes?
Ans  : .warning

Ques : Which of the following components is used to indicate the current page's location within a navigational hierarchy?
Ans  : breadcrumbs

Ques : Which of the following are no Bootstrap plugins?
Ans  : boilerplate/ocible

Ques :  Which of the following statements are correct with regards passing potions?
Ans  :  For data attributes, the option name has to be appended to data-, as in data-animation=””./ Options can be passed via data attributes or JavaScript.


Ques : Which of the following are helper classes?
Ans  : .clearfix/.caret/.close


Ques : Which of the following will set a modal window to be closed when the escape key is presed?
Ans  : Setting the option “keyboard” to true

Ques : What is the default amount of time delay between automatically cycling items in a carousel?
Ans  : 5000

Ques :   Which of the following is the default hover background color of the table row?
Ans  : #f5f5f5

Ques : which of the following are not option of the method $().tooltip(options)?
Ans  : backdrop/show

Ques : Which of the following will set a modal window to not be closed on click?
Ans  : Setting the option “backdrop” to static

Ques : Which of the following classes are contextual classes?
Ans  : .danger/ .warning


Ques : Which of the following classes will make tables scroll up horizontally when width of the view is under 768px?
Ans  :  .table-scrollable

Ques :  Which of the following will correctly call a dialog prompt?
Ans  : All of these

Ques : Which of the following LESS variables does not belong to the Navbar component?
Ans  : @navbar-default-height

Ques : Which type of trigger cannot be used with the “delay” option to show and hide a popover?
Ans  : manual

Ques : How many validation styles for states of on-form controls does Bootstrap have?
Ans  : 3

Ques : Which of the following statements is correct about using the collapse plugin?
i) The Transitions plugin must be included.
ii) The popover plugin must be included.
Ans  :  Statement A is true while Statement B is false.

Ques :  Setting the option “backdrop” to true
Ans  : Setting the option “backdrop” to static

Ques :  Which of the following is the default hover background color of the table row?
Ans  :  #f5f5f5

Ques :  which of the following are not option of the method $().tooltip(options)?
Ans  : backdrop/show

Ques : Which of the following will set a modal window to not be closed on click?
Ans  : Setting the option “backdrop” to static

Ques :  Which of the following classes will make tables scroll up horizontally when width of the view is under 768px?
Ans  : .table-scrollable

Ques :  Which of the following will correctly call a dialog prompt?
Ans  : All of these

Ques : What does the following HTML code do?
Ans  : It highlights new or unread items.

Ques :  Which type of trigger cannot be used with the “delay” option to show and hide a popover?
Ans  : manual

Ques : How many validation styles for states of on-form controls does Bootstrap have?
Ans  : 3

Ques : Which of the following statements is correct about using the collapse plugin?
A) The Transitions plugin must be included.
B) The popover plugin must be included.
Ans  : Statement A is true while Statement B is false. t B is true while Statement A is false.

Ques :  Which of the following are no Bootstrap plugins?
Ans  : tocible/boilerplate

Ques :  Which of the following statements are correct with regards passing potions?


Ans  : Options can be passed via data attributes or JavaScript./ For data attributes, the option name has to be appended to data-, as in data-animation=””.

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance JavaScript Test Question & Answers

June 28, 2015 / No Comments
UpWork (oDesk) & Elance JavaScript Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of this skill. Lets Start test.



Ques : Which of the following prints "AbBc"?
Ans  : var b = 'a'; var result = b.toUpperCase() + 'b' + 'b'.toUpperCase() +'C'['toLowerCase'](); alert(result);

Ques : Performance-wise, which is the fastest way of repeating a string in JavaScript?
Ans  : String.prototype.repeat = function(count) { if (count < 1) return ''; var result = '', pattern = this.valueOf(); while (count > 0) { if (count & 1) result += pattern; count >>= 1, pattern += pattern; } return result; };

Ques : What is the final value of the variable bar in the following code?

var foo = 9;
bar = 5;
(function() {
    var foo = 2;
    bar= 1;
}())
bar = bar + foo;
Ans  : 10

Ques : Which of the following code snippets changes an image on the page?
Ans  : var img = document.getElementById("imageId"); img.src = "newImage.gif";

Ques : Which of the following results is returned by the JavaScript operator "typeof" for the keyword "null"?
Ans  : object

Ques : Which of the following will check whether the variable vRast exists or not?
Ans  :  if (typeof vRast =="undefined") {}

Ques : Which of the following choices will change the source of the image to "image2.gif" when a user clicks on the image?
Ans  : img id="imageID" src="image1.gif" width="50" height="60" onmousedown="changeimg(image1.gif)" onmouseup="changeimg(image2.gif)"

Ques :  Which of the following Regular Expression pattern flags is not valid?
Ans  : p

Ques : Which of the following statements is correct?
Ans  : Undefined object properties can be checked using the following code: if (typeof something === "undefined") alert("something is undefined");

Ques : Which of the following choices will turn a string into a JavaScript function call (case with objects) of the following code snippet?

Ans  : window['foo']['bar']['baz']();

Ques : Which of the following options can be used for adding direct support for XML to JavaScript?
Ans  : E4X

Ques : Which of the following will detect which DOM element has the focus?
Ans  : document.activeElement

Ques : Which of the following will randomly choose an element from an array named myStuff, given that the number of elements changes dynamically?
Ans  :  randomElement = myStuff[Math.floor(Math.random() * myStuff.length)];

Ques : Which of the following objects in JavaScript contains the collection called "plugins"?
Ans  : Navigator

Ques : What is the difference between call() and apply()?
Ans  : The call() function accepts an argument list of a function, while the apply() function accepts a single array of arguments.

Ques : Select the following function that shuffles an array?
Ans  :  function shuffle(array) { var tmp, current, top = array.length; if(top) while(--top) { current = Math.floor(Math.random() * (top + 1)); tmp = array[current]; array[current] = array[top]; array[top] = tmp; } return array; }

Ques : Which of the following code snippets removes objects from an associative array?
Ans  : delete array["propertyName"];

Ques : What is the error in the statement: var charConvert = toCharCode('x');?
Ans  :  toCharCode() is a non-existent method.

Ques : What does the following JavaScript code do?

contains(a, obj) {
    for (var i = 0; i < a.length; i++) {
        if (a[i] === obj) {
            return true;
        }
    }
    return false;
}
Ans  :  It checks if an array contains 'obj'.

Ques : If an image is placed styled with z-index=-1 and a text paragraph is overlapped with it, which one will be displayed on top?
Ans  : The paragraph.

Ques : Which of the following code snippets gets an image's dimensions (height & width) correctly?
Ans  : var img = document.getElementById('imageid'); var width = img.clientWidth; var height = img.clientHeight;

Ques : var profits=2489.8237

Which of the following code(s) produces the following output?

output : 2489.824
Ans  : profits.toFixed(3)

Ques : A form contains two fields named id1 and id2.  How can you copy the value of the id2 field to id1?
Ans  : document.forms[0].id1.value=document.forms[0].id2.value

Ques : Which of the following is true about setTimeOut()?
Ans  : The statement(s) it executes run(s) only once.

Ques : How can the operating system of the client machine be detected?
Ans  :  Using the navigator object

Ques : Which of the following descriptions is true for the code below?

var object0 = {};
Object.defineProperty(object0, "prop0", { value : 1, enumerable:false, configurable : true });
Object.defineProperty(object0, "prop1", { value : 2, enumerable:true,  configurable : false });
Object.defineProperty(object0, "prop2", { value : 3 });
object0.prop3 = 4;
Ans  : Object 'object0' contains 4 properties. Property 'prop1' and property 'prop3' are available in the for...in loop. Property 'prop0' and property 'prop3' are available to delete.

Ques : Consider the following variable declarations:

var a="adam"
var b="eve"

Which of the following would return the sentence "adam and eve"?
Ans  : a.concat(" and ", b)

Ques : Which object can be used to ascertain the protocol of the current URL?
Ans  : location

Ques : Which of the following best describes a "for" loop?
Ans  : "for" loop consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement executed in the loop.

Ques : Which of the following is not a valid HTML event?
Ans  :  onblink

Ques : Which of the following are JavaScript unit testing tools?
Ans  : Buster.js, YUI Yeti, Jasmine

Ques : Which of the following can be used for disabling the right click event in Internet Explorer?
Ans  :  event.button == 2

Ques : Which of the following Array methods in JavaScript runs a function on every item in the Array and collects the result from previous calls, but in reverse?
Ans  : reduceRight()

Ques : What will be the final value of the variable "apt"?

var apt=2;
apt=apt<<2 b="">
Ans  : 8

Ques :  How can a JavaScript object be printed?
Ans  : console.log(obj)

Ques : Which of the following is the correct syntax for using the JavaScript exec() object method?
Ans  : RegExpObject.exec(string)

Ques : Having an array object var arr = new Array(), what is the best way to add a new item to the end of an array?
Ans  : arr.push("New Item")

Ques : Consider the following JavaScript validation function:
function ValidateField()
{
        if(document.forms[0].txtId.value =="")
                {return false;}

        return true;
}
Which of the following options will call the function as soon as the user leaves the field?
Ans  :  input name=txtId type="text" onblur="return ValidateField()"

Ques : Which of following uses the "with" statement in JavaScript correctly?
Ans  : with (document.getElementById("blah").style) { background = "black"; color = "blue"; border = "1px solid green"; }

Ques : Which of the following modifiers must be set if the JavaScript lastIndex object property was used during pattern matching?
Ans  : g

Ques : What would be the use of the following code?

function validate(field) {
    var valid=''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'';
    var ok=''yes'';
    var temp;

    for(var i=0;i
        temp='''' + field.value.substring(i,i+1)

        if(valid.indexOf(temp)==''-1'') {
                ok=''no'';
        }
    }

    if(ok==''no'') {
        alert(''error'');
        field.focus();
    }
}
Ans  : It will force a user to enter only English alphabet character values.

Ques : How can created cookies be deleted using JavaScript?
Ans  : Overwrite with an expiry date in the past

Ques : What would be the value of 'ind' after execution of the following code?

var msg="Welcome to ExpertRating"
var ind= msg.substr(3, 3)
Ans  : com

Ques : Are the two statements below interchangeable?

object.property
object[''property'']
Ans  :  Yes

Ques :  Which of the following is not a valid method in generator-iterator objects in JavaScript?
Ans  : stop()

Ques : Which of the following code snippets will return all HTTP headers?
Ans  : var req = new XMLHttpRequest(); req.open('GET', document.location, false); req.send(null); var headers = req.getAllResponseHeaders().toLowerCase(); alert(headers);

Ques :  Which of the following is the most secure and efficient way of declaring an array?
Ans  :  var a = []

Ques : Which of the following built-in functions is used to access form elements using their IDs?
Ans  :  getElementById(id)

Ques : Which of the following correctly uses a timer with a function named rearrange()?
Ans  : tmr=setTimeout("rearrange ()",1)

Ques : Which of the following can be used to escape the ' character?
Ans  :  \

Ques : Which event can be used to validate the value in a field as soon as the user moves out of the field by pressing the tab key?
Ans  : onblur

Ques : When setting cookies with JavaScript, what will happen to the cookies.txt data if the file exceeds the maximum size?
Ans  : The file is truncated to the maximum length.

Ques : Which of the following are not global methods and properties in E4X?
Ans  :  setName() and setNamespace()

Ques : What is the purpose of while(1) in the following JSON response?

while(1);[['u',[['smsSentFlag','false'],['hideInvitations','false'],['remindOnRespondedEventsOnly','true'],['hideInvitations_remindOnRespondedEventsOnly','false_true'],['Calendar ID stripped for privacy','false'],['smsVerifiedFlag','true']]]]
Ans  : It makes it difficult for a third-party to insert the JSON response into an HTML document with a script tag.
Ques : Consider the three variables:

someText = 'JavaScript1.2';
pattern = /(\w+)(\d)\.(\d)/i;
outCome = pattern.exec(someText);

What does outCome[0] contain?
Ans  :  JavaScript1.2

Ques : Which of the following determines whether cookies are enabled in a browser or not?
Ans  : (navigator.cookieEnabled)? true : false

Ques : How can global variables be declared in JavaScript?
Ans  :  Declare the variable between the 'script' tags, and outside a function to make the variable global

Ques : What will be output of the following code?

function testGenerator() {
    yield "first";
    document.write("step1");

    yield "second";
    document.write("step2");

    yield "third";
    document.write("step3");
}

var g = testGenerator();
document.write(g.next());
document.write(g.next());
Ans  : firststep1second

Ques : Which of the following methods will copy data to the Clipboard?
Ans  : execCommand('Copy')

Ques : Which of the following code snippets trims whitespace from the beginning and end of the given string str?
Ans  : str.replace(/^\s+|\s+$/g, '');

Ques : What is the meaning of obfuscation in JavaScript?
Ans  : Making code unreadable using advanced algorithms.

Ques : Which of the following JavaScript Regular Expression modifiers finds one or more occurrences of a specific character in a string?
Ans  : +

Ques : Which of the following is not a valid JavaScript operator?
Ans  :  ^    

Ques : Which of the following can be used to invoke an iframe from a parent page?
Ans  :  window.frames

Ques : What value would JavaScript assign to an uninitialized variable?
Ans  : undefined

Ques : How can the user's previously navigated page be determined using JavaScript?
Ans  :  Using the window object

Ques : Which of the following is not a valid method for looping an array?
Ans  :  var a= [1,2]; a.loop( function(item) { alert(item); })

Ques : Which of the following correctly sets a class for an element?
Ans  :  document.getElementById(elementId).setAttribute("className", "Someclass");

Ques : An HTML form contains 10 checkboxes all named "chkItems". Which JavaScript function can be used for checking all the checkboxes together?
Ans  : function CheckAll() { for (z = 0; z < document.forms[0].chkItems.length; z++) { document.forms[0].chkItems[z].checked=true } }

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techtunes, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance jQuery Test Question & Answers

/ No Comments
jQuery Test Question & Answer is really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is very valueable to acquire knowledge of this skill. Lets Start test.


Ques: How can the href for a hyperlink be changed using jQuery?
Ans: $("a").attr("href", "http://www.google.com/");

Ques: The position function gets the ___ positions of an element that are relative to its offset parent.
Ans: top and left

Which of the following code snippets returns the same result as $('#id1 li').not($('#li2'));?
Ans: $('#li2').siblings();

Ques: Which of the following is the correct way to debug JavaScript/jQuery event bindings with Firebug or a similar tool?
Ans: var clickEvents = $('#foo').data("events").click; jQuery.each(clickEvents, function(key, value) { console.log(value) // prints "function() { console.log('clicked!') }" })

Ques: Which of the following events can be used to disable right click contextual menu?
Ans: contextmenu

Ques: Which of the following gets the href attribute of "id1"?
Ans:  $('#id1).attr('href');

Ques: Which of the following is the correct way to manage a redirect request after a jQuery Ajax call?
Ans: $.ajax({ type: "POST", url: reqUrl, data: reqBody, dataType: "json", success: function(data, textStatus) { if (data.redirect) { // data.redirect contains the string URL to redirect to window.location.href = data.redirect; } else { // data.form contains the HTML for the replacement form $("#myform").replaceWith(data.form); } } });

Ques: Which of the following is the correct way to change the image source during click event of a button in jQuery?
Ans: $("#button").click(function(){$(“img”).attr(); });

Ques: What is the purpose of  $(document).ready() function in Jquery?
Ans:To execute functions after DOM is loaded

Ques:  Which of the following will show an alert containing the content(s) of a database selection?
Ans: $.ajax({ type: "GET", url: "process_file.php?comp_id="+comp_id, success: function (result) { alert(result); } });

Ques:  How can an Ajax request that has not yet received a response be canceled or aborted?
Ans: //xhr is an Ajax variable xhr.abort()

Ques: Consider the following code snippet:
$('a.arrow-1').click(function () {
    $('.second-row').slideUp();
    $(this).parent('.first-row').siblings('.second-row').slideDown();
});

The order of the animations of this code snippet are:
Ans: .second-row will slide up, then the targeted parent sibling .second-row will slide down.

Ques: Consider the following code snippet:


$('#ul1 li').live('click', function1);

$('#ul1').after('<li id="lastLi">Last item</li>');


Is function1 executed if "lastLi" is clicked?
Ans: No

Ques: jQuery allows you to use ___ function to switch between showing and hiding an element.
Ans:  toggle

Ques: What does $('tr.rowClass:eq(1)'); return?
Ans: One element set which is the second row of the first table.

Ques: Which option can be used to have jQuery wait for all images to load before executing something on a page?
Ans: With jQuery, can use $(document).ready() to execute something when the DOM is loaded and$(window).load() to execute something when all other things are loaded as well, such as the images.

Ques: offset function gets the current offset of the first matched element in pixels relative to the ___.
Ans: document

Ques:  Consider the following code snippet:

$(document).ready(function() {
  $('div').each(function(index) {
    alert(this);
  });
});

Which of the following objects does the 'this' variable refer to?
Ans:  The current div tag of the iteration.

Ques:  Which of the following returns the children tags of "id1"?
Ans:  $('#id1').children();

Ques: Which of the following is the correct way to select an option based on its text in jQuery?
Ans:  $("#myselect option").filter(function(){ return $(this).text() == 'text';}).prop('selected', true);

Ques:  Consider the following code snippet:

$('#id1').animate({width:"240px"}, { queue:false, duration:1000 }).animate({height:"320px"}, "fast");

The order of the animations of this code snippet is ___.
Ans: Both the width animation and the height animation occur at the same time.

Ques:  What is the result of NaN == NaN?
Ans: false

Ques: $("div").find("p").andSelf().addClass("border");
The statement adds class border to ___.
Ans: all div tags and p tags in div tags

Ques:  $('#a1').one('click', {times: 3}, function1);

Which of the following is true for the above?
Ans: function1 will be executed once regardless of the number of times a1 is clicked.

Which of the following code snippets return(s) a set of all li tags within id1 except for the li tag with id li2?
Ans:  $('#id1 li').not($('#li2'));

Ques: Assume that you want that first the tag with "id1" fades out and then the tag with "id2" fades in. Which of the following code snippets allow(s) you to do so?
Ans:  $('#id1').fadeOut('fast', function() {$('#id2').fadeIn('slow')});

Ques: Which of the following methods can be used to copy element?
Ans: clone

Ques: $('#id1').animate({width:"80%"}, "slow")

The above code snippet will ___.
Ans: animate the tag with id1 from the current width to 80% width.

Which of the following code snippets return(s) a set of all li tags within id1 except for the li tag with id li2?
Ans:  $('#id1 li').not($('#li2'));

Ques: Which of the following methods can be used to utilize the animate function with the backgroundColor style property?
Ans: Use the jQuery UI library.

Ques: Consider the following code snippet:
$('#id1').animate({width:"240px"}, { queue:false, duration:1000 }).animate({height:"320px"}, "fast");
The order of the animations of this code snippet is ___.
Ans: Both the width animation and the height animation occur at the same time.

Ques: Which option is correct to perform a synchronous AJAX request?
Ans: beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); }, async: false }); }


Ans: $("#list option[value='2']").text();

Ques: If jQuery is included before another library, how can conflict between jQuery and that library be avoided?
Ans: By calling jQuery.noConflict(); right after including jQuery.

Ques: Which of the following functions is/are built-in jQuery regular expression function(s)?
Ans:  match

Ques: each() is a generic ___ function.
Ans: iterator

Ques: Consider the following code snippet:
$(document).ready(function1);
$(document).ready(function2);
$(document).ready(function3);
Which of the following functions are executed when DOM is ready?
Ans:  function1, function2, and function3

Ques: Which of the following represents the best way to make a custom right-click menu using jQuery?
Ans: $(document).bind("contextmenu", function(event) { event.preventDefault(); $("
Custom menu
") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });


Ques: Consider the following code snippet:
$('#button1').bind('click', function(data) {...});
What is the data argument?
Ans: Click event's data

Ques: $("div").find("p").andSelf().addClass("border");

The statement adds class border to ___.
Ans: all div tags and p tags in div tags

Ques: What is the result of this function: jQuery.makeArray ( true )?
Ans:  [ true ]

Ques: Which of the following is the correct way to get the value of a textbox using id in jQuery?
Ans:  $(“#textbox”).val()

Ques: The hide() function hides an element by ___.
Ans:  setting "display" inline style attribute of that element to "none".

Ques: Consider the following code snippet:

$('#table1').find('tr').filter(function(index) { return index % 3 == 0}).addClass('firstRowClass');

The result of the above code snippet is ___.
Ans: The rows of table1 at order 3n + 1 (n = 0, 1, 2,...) will belong to the class firstRowClass.

Ques: One advantage of $.ajax function over $.get or $.post is that ___
Ans: $.ajax offers error callback option.

Ques: Using an element of some kind that is being hidden using .hide() and shown via .show().  Which of the following is the best way to determine if that element is currently hidden or visible on the screen?
Ans: $(element).is(":visible")

Ques: Which of the following will get the first column of all tables using jQuery?
Ans:  $('table.tblItemTemplate td:first-child');

Ques: Which option is correct to use the below function to set cursor position for  textarea?
Function:
$.fn.selectRange = function(start, end) {
    return this.each(function() {
        if (this.setSelectionRange) {
            this.focus();
            this.setSelectionRange(start, end);
        } else if (this.createTextRange) {
            var range = this.createTextRange();
            range.collapse(true);
            range.moveEnd('character', end);
            range.moveStart('character', start);
            range.select();
        }
    });
};
Ans: $('#elem').selectRange(3,5);

Ques: Assuming that the jQuery UI library is used to make a list sortable, which of the following code snippets makes "list1" sortable?
Ans:  $('#list1').sortable();

Ques: Which of the following functions can be used to stop event propagation?
Ans: stopPropagation

Ques: How can the child img be selected inside the div with a selector?
Ans: jQuery(this).find("img");

Ques: jQuery allows simulating an event to execute an event handler as if that event has just occurred by using ___.
Ans:  trigger function

Ques: Which of the following is the correct use of ajaxStart() function?
Ans: ajaxStart() function is used to run some code when ajax call start.

Ques:  The height function returns the height of an element in ___.
Ans: pixel units

Ques: Which of the following values is/are valid value(s) of secondArgument in addClass('turnRed', secondArgument); function, if the jQuery UI library is being used?
Ans: 3000

Ques: Consider the following code snippet:


$('#button1').bind('click', function(data) {...});


What is the data argument?
Ans: Function's data

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techtunes, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance AJAX Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance AJAX Test Question & Answers is really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is very valueable to acquire knowledge of this skill. Lets Start test.


Ques : Which of the following is/are true regarding AJAX?
Ans  : It's an engine developed by Microsoft to load web pages faster +  It's merely a concept with many implementation methods (XMLHttpRequest, iFrames...) + It's a good way to reduce network traffic, if used correctly

Ques : Which of the following browsers provide XMLHttpRequest property?
Ans  :Internet Explorer 7 + Firefox 2.0 + Safari 3.0

Ques : What is true regarding XMLHttpRequest.abort()?
Ans  : It can only be used with async requests + It will remove the onreadystatechange event handler

Ques : document.write ("Hello");  will pop a dialog box with "Hello" in it.
Ans  :  false

Ques : Is it possible to make a page "reload-safe" when using AJAX?
Ans  :  yes, if each AJAX request modifies the server side context, which would render a page similar to the actual JS modified page, if reloaded.

Ques : In the following list, which ones are used to fetch the result data of an XMLHttpRequest?
Ans  : responseXML

Ques : Is it always possible to make requests to multiple websites with different domain names from an AJAX client script?
Ans  :yes

Ques : Is the loading of an AJAX enabled web page any different from the loading of a normal page?
Ans  :  Yes

Ques : Can AJAX be used with HTTPS (SSL)?
Ans  : yes

Ques : Which of the following list is/are true regarding AJAX?
Ans  : It can be used to update parts of a webpage without reloading it

Ques : Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?
Ans  : Yes

Ques : Can AJAX be used with offline pages?
Ans  :  yes

Ques : Can a client AJAX application be used to fetch and execute some JavaScript code?
Ans  : no

Ques :  What language does AJAX use on the client side?
Ans  :  JavaScript

Ques : Can AJAX be used with PHP?
Ans  : yes

Ques : What is the correct way to execute the function "calc()" when an XMLHttpRequest is loaded?
Ans  : myRequest.onreadystatechange = calc;

Ques : Can an HTML form be sent with AJAX?
Ans  : yes

Ques : Can you call responseBody or responseText to get a partial result when the readyState of an XMLHttpRequest is 3(receiving)?
Ans  : No

Ques : Can an AJAX application communicate with other applications on the client computer?
Ans  : No

Ques : Which of the following describes the term 'Asynchronous' correctly?
Ans  : Ability to handle processes independently from other processes

Ques : What is the common way to make a request with XMLHttpRequest?
Ans  : myReq.send(null);

Ques : What is the correct way to have the function checkState called after 10 seconds?
Ans  :  window.setTimeout(checkState, 10000);

Ques : How can you create an XMLHttpRequest under Internet Explorer 6?
Ans  : var oReq = new ActiveXObject ("MSXML2.XMLHTTP.3.0");

Ques : The X in AJAX refers to XML, but is it possible to make a request for plain text data by using AJAX?
Ans  : yes

Ques : Is it possible to create and manipulate an image on the client with AJAX?
Ans  : yes

Ques : Is it possible to make some system calls on the client with AJAX?
Ans  : No

Ques : What is the third (async) parameter of the XMLHttpRequest open method?
Ans  :  If true, callbacks are executed

Ques : Which HTTP server does AJAX require?
Ans  : Any HTTP server will work

Ques : Which of the following is a block comment in JavaScript?
Ans  :  /* */

Ques : It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?
Ans  : myReq.setRequestHeader ("Content-Type", "text/xml");

Ques : Does JavaScript 1.5 have exception handling?
Ans  : yes

Ques : Which of the following cannot be resolved by using AJAX?
Ans  : Server crashes (failover)

Ques : Which of the following request types should be used with AJAX?
Ans  : HTTP GET request for retrieving data (which will not change for that URL)

Ques : When may asynchronous requests be used?
Ans  :  All of the above

Ques : Is it possible to access the browser cookies from a javascript application?
Ans  :    yes

Ques : Which of the following is not a JavaScript operator?
Ans  :  All of the above are Javascript operators

Ques : The server returns data to the client during an AJAX postback. Which of the following is correct about the returned data?
Ans  :  It only contains the data of the page elements that need to be changed

Ques : When doing an AJAX request, will the page be scrolled back to top as with normal requests?
Ans  : No

Ques : Javascript uses static bindings.
Ans  :  false

Ques : Which of the following is not a valid variable name in JavaScript?
Ans  :  2myVar

Ques : Is JavaScript the same as Java?
Ans  : no

Ques : What is NOSCRIPT tag for?
Ans  : To enclose text to be displayed if the browser doesn't support JS

Ques : In the following list, which states are valid?

XMLHttpRequest.readyState
Ans  : All of the above.

Ques : What is the standardized name of JavaScript?
Ans  : ECMAScript

Ques : which language does AJAX use on the server side?
Ans  : Any language supported by the server

Ques : Which of the following is/are not addressed by AJAX?
Ans  :  Offline browsing

Ques : Which of the following are drawbacks of AJAX?
Ans  : The browser back button cannot be used in most cases

Ques : What is the correct syntax to create an array in JavaScript?
Ans  : var array = new Array ();

Ques : Consider the following
function:


function foo ()
{
return 5;
}

What will the following code do?

var myVar = foo;
Ans  :  Assign the pointer to function foo to myVar

Ques : What should be called before 'send ()' to prepare an XMLHttpRequest object?
Ans  : open ()

Ques : Can you start multiple threads with JavaScript?
Ans  : No

Ques : Can AJAX be used to move files on the client-side?
Ans  :  No

Ques : Which of the following status codes denotes a server error?
Ans  :  500

Ques : When a user views a page with JavaScript in it, which machine executes the script?
Ans  :  The client machine running the Web Browser

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techtunes, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance C++ Programming Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance C++ Programming Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is very valueable to acquire knowledge of this skill. Lets Start test.


Ques : Consider the following code:
    class A {
          typedef int I;      // private member
          I f();
          friend I g(I);
          static I x;
      };
Which of the following are valid:
Ans  :
 A::I A::f() { return 0; }
 A::I g(A::I p = A::x);
 A::I g(A::I p) { return 0; }

Ques : Consider the following class hierarchy:


class Base

{

}


class Derived : public Base

{

}


Which of the following are true?
Ans  :  Derived can access public and protected member functions of Base + The following line of code is valid: Base *object = new Derived();

Ques : What linkage specifier do you use in order to cause your C++ functions to have C linkage
Ans  :  extern "C"

Ques : Sample Code


typedef char *monthTable[3];


Referring to the code above, which of the following choices creates two monthTable arrays and initializes one of the two?
Ans  : monthTable winter,spring={"March","April","May"};

Ques :  What access specifier allows only the class or a derived class to access a data membe
Ans  : protected

Ques : What is the output of the following code segment?

int n = 9;

int *p;

p=&n;

n++;

cout << *p+2 << "," << n;
Ans  : 12,10

Ques : What does ADT stand for?
Ans  : Abstract data type

Ques :  Consider the sample code given below and answer the question that follows.
class Shape
{
public:
virtual void draw() = 0;
};

class Rectangle: public Shape
{
public:
void draw()
{
// Code to draw rectangle
}
//Some more member functions.....
};

class Circle : public Shape
{
public:
void draw()
{
// Code to draw circle
}
//Some more member functions.....
};

int main()
{
Shape objShape;
objShape.draw();
}
What happens if the above program is compiled and executed?
Ans  : A compile time error will be generated because you cannot declare Shape objects

Ques : Consider the sample code given below and answer the question that follows.


class Person

{

public:

   Person();

      virtual ~Person();

};

class Student : public Person

{

public:

   Student();

   ~Student();

};


main()

{

   Person *p = new Student();

   delete p;

}


Why is the keyword "virtual" added before the Person destructor?
Ans  : To ensure that the destructors are called in proper orde

Ques : If input and output operations have to be performed on a file, an object of the _______ class should be created.
Ans  :  fstream

Ques : In the given sample Code, is the constructor definition valid?


class someclass

{

   int var1, var2;

   public:

      someclass(int num1, int num2) : var1(num1), var2(num2)

      {

      }

};
Ans  : Yes, it is valid

Ques : Consider the sample code given below and answer the question that follows.


template Run(T process);


Which one of the following is an example of the sample code given above?
Ans  : A template function declaration

Ques : Which of the following sets of functions do not qualify as overloaded functions?
Ans  : void x(int,char) int *x(int,char)

Ques : Consider the sample code given below and answer the question that follows.


1  class Car

2  {

3  private:

4  int Wheels;

5

6  public:

7  Car(int wheels = 0)

8  : Wheels(wheels)

9  {

10 }

11

12 int GetWheels()

13 {

14 return Wheels;

15 }

16 };

17 main()

18 {

19 Car c(4);

20 cout << "No of wheels:" << c.GetWheels();

21 }


Which of the following lines from the sample code above are examples of data member definition?
Ans  :  4

Ques : Which of the following statements about function overloading, is true?
Ans  :  Function overloading is possible in both C and C++

Ques : You want the data member of a class to be accessed only by itself and by the class derived from it. Which access specifier will you give to the data member?
Ans  :  Protected

Ques : Consider the sample code given below and answer the question that follows.


class Person

{

    string name;

    int age;

    Person *spouse;

public:

    Person(string sName);

    Person(string sName, int nAge);

    Person(const Person& p);


    Copy(Person *p);

    Copy(const Person &p);

    SetSpouse(Person *s);

};


Which one of the following are declarations for a copy constructor?
Ans  :  Person(const Person &p);

Ques : Which of the following member functions can be used to add an element in an std::vector?
Ans  : push_back

Ques : Which of the following are NOT valid C++ casts
Ans  :  void_cast

Ques : Consider the sample code given below and answer the question that follows:


     char **foo;
    /* Missing code goes here */
    for(int i = 0; i < 200; i++)
    {
        foo[i] = new char[100];
    }

Referring to the sample code above, what is the missing line of code?
Ans  : font size=2>foo = new char*[200];

Ques : Consider the line of code given below and answer the question that follows.

class screen;

Which of the following statements are true about the class declaration above?
Ans  : The syntax is correct

Ques : Which of the following are true about class member functions and constructors?
Ans  : A member function can return values but a constructor cannot

Ques : Consider the following code:


#include


int main(int argc, char* argv[])
{
        enum Colors
        {
                red,
                blue,
                white = 5,
                yellow,
                green,
                pink
        };

        Colors color = green;
        printf("%d", color);
        return 0;
}

What will be the output when the above code is compiled and executed?
Ans  : 11

Ques : Which of the following statements regarding functions are false?
Ans  :  You can create arrays of functions

Ques : Consider the following code:


#include

using namespace std;


class A
{
public :

        A()

        {

                cout << "Constructor of A\n";

        };

        ~A()

        {

                cout << "Destructor of A\n";

        };

};


class B : public A

{
public :

        B()

        {

                cout << "Constructor of B\n";

        };

        ~B()

        {

                cout << "Destructor of B\n";

        };

};


int main()
{

        B        *pB;

        pB = new B();

        delete pB;

        return 0;

}


What will be the printed output?
Ans  : Constructor of A Constructor of B Destructor of B Destructor of A

Ques : Consider the following code:
template void Kill(T *& objPtr)
{
   delete objPtr;
   objPtr = NULL;
}

class MyClass
{
};

void Test()
{
   MyClass *ptr = new MyClass();
   Kill(ptr);
   Kill(ptr);
}
Invoking Test() will cause which of the following?
Ans  : Code will execute properly

Ques : Consider the following statements relating to static member functions and choose the appropriate options:

1. They have external linkage
2. They do not have 'this' pointers
3. They can be declared as virtual
4. They can have the same name as a non-static function that has the same argument types
Ans  : Only 1 and 2 are true

Ques : What will be the output of the following code?

class b

{
    int i;

    public:

    virtual void vfoo()

  {

    cout <<"Base ";

  }

};

class d1 : public b

{

    int j;

    public:

    void vfoo()

  {

    j++;

    cout <<"Derived";

  }

};

class d2 : public d1

{

    int k;

};

void main()

{

    b *p, ob;

    d2 ob2;

    p = &ob;

    p->vfoo();

    p = &ob2;

    p->vfoo();

}
Ans  :  Base Derived

Ques :  Consider the following code:


#include

using namespace std;


int main()
{

cout << "The value of __LINE__  is " <<__line__ span="">


return 0;

}


What will be the result when the above code is compiled and executed?
Ans  : The code will compile and run without errors

Ques : Which of the following STL classes is deprecated (i.e. should no longer be used)?
Ans  :  ostrstream

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techtunes, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab