Tencent end 2019 engineers face questions and answers to resolve

First, multiple choice (a total of 21 questions, each question 5 minutes)

1 want to find siblings of all elements in the jquery Which of the following can be achieved?

A、eq(index)

B、find(expr)

C、siblings([expr])

D、next()

Reference answer: C

Answer Analysis:

jQuery siblings () method ----------------------

siblings () method returns all elements of the selected element compatriots.

The following example returns

All compatriots elements: ### examples

 

 

You can also use the optional parameter to filter the search for compatriots elements.

The following examples belonging to return

All compatriots elements
elements:

Examples

 

 


jQuery next () method ------------------

next () method returns a fellow next element of the selected element.

This method returns only one element.

The following example returns

Next compatriots element: ### examples

 

 

 

jQuery find () method
 

find () method returns the descendent elements of the selected element, all the way down to the last generations.

The following examples belonging to return

All elements of future generations: ### examples

 

2. The following is not a RDBMS ()

A、mysql

B、postgreSql

C、oracle

D、hadoop

Reference answer: D

Answer Analysis: RDBMS SQL is the foundation, it is also the basis for all modern database systems, such as MS SQL Server, IBM DB2, Oracle, MySQL and Microsoft Access. hadoop is a distributed database

(Join the group 677 079 770 for more answers to interview questions and learning materials.)

3.JavaScript basic composition does not include the following () options

A HOUSE

B, BOM

C、ECMAScript

D、jQuery

Reference answer: D

Answer Analysis: jQuery library is written in javascript.

JavaScript's three main components are: ECMAScript (core), DOM (Document Object Model), BOM (Browser Object Model). 

 

4. For border-radius label statement is wrong

For border-radius, saying the error is

A, represents rounded corners

B, IE8 support good

C, IE9 support good

D, firefox support good

Answers: B

Answer Analysis: Internet Explorer 9+ support border-radius and box-shadow property. Firefox, Chrome and Safari all support the new border properties. Note: For border-image, Safari 5 and older versions need to prefix -webkit-.

Opera supports border-radius and box-shadow property, but the need for border-image prefix -o-

![]

 

5. In doing mobile development, shows a list of page data, data required to display the mark on the left side of the page ...

In doing mobile development, data displayed on a page with a list of data required to display the title of the page on the left side, the right side shows a navigation icon, how do ()

A, <div style = "float: left"> text title </ div> <div style = "float: right"> icon </ div>

B, <div> Text title </ div> <div> icon </ div>

C, <div style = "display: box;"> text title </ div> <div style = "display: box"> icon </ div>

D, <div style = "float: left"> text title </ div> <div style = "float: left"> icon </ div>

Answers: A

(Join the group 677 079 770 for more answers to interview questions and learning materials.)

6. With regard to the properties of the method of operation JQuery, the error is described below :()

A, addClass (): adding the specified class name matching element

B, val (): returns the setting or values ​​of matching elements

C, html (): returns the HTML content provided or set of matched elements

D, removeAttr (): returns the set of matching elements or attributes and values

Reference answer: D

Answer Analysis: No

 

7. Under the description of DoS attacks, the error is?

A, DoS attacks typically by inhibiting the flow of all or a particular message object side, an entity so that the system can not perform its normal function, generates a service denied

B, DoS attack without the target system, can be achieved only from external attack

C, as long as there is no internal software system vulnerabilities, DoS attacks can not succeed

D, Ping of Death, Land Attack, UDP floods, Smurf attacks are common DoS attacks

Reference answer: C

Answer Analysis: denial of service: when an entity can not perform its normal function, or its action prevents other entities to perform their normal functions, denial of service will occur. This attack does not necessarily require the presence of loopholes, such as UDP flood the target system.

 

8. In the object-oriented software development process, the use of the design pattern ().

A, allows the use of object-oriented concept in a non-object-oriented programming language in

B, in order to reuse successful design and architecture

C, in order to reduce the number of the design process to create a class

D, to ensure that the running speed of the optimal value

Answers: B

Answer Analysis: B.

Emergence of design patterns is to code reuse, maintainability increase.

 

9.Java core package, provided the application program package is the base class ().

A java.lang

B java.util

C、 java.applet

D java.rmi

Answers: A

Answer Analysis: No

 

10. The following media queries define the way in which one is adapted iphone6s of?

A、.@media(min-device-width:375px) and(max-device-width:667px) and(-webkit-min-device-pixel-ratio:2){}

B、.@media(min-device-width:414px) and(max-device-width:736px) and(-webkit-min-device-pixel-ratio:3){}

C、@media only screen and (min-device-width:320px) and (max-device-width:480px) and (-webkit-device-pixel-ratio:2){}

D、@media only screen and (min-device-width:320px) and (max-device-width:568px) and (-webkit-min-device-pixel-ratio:2){}

Answers: A

Answer Analysis: Do not tangle selecting the A or B selected mainly in -webkit-min-device-pixel-ratio: 2 This property

Want to know here to see the article (interpretation is correct, but this device pixel ratio above is wrong)

iPhone6s plus 2 and 3 to see the device pixel ratio

min-device-width and we usually write this label is also differentiated min-width I also learned to learn ha ha ha

 

11. jquery, if you want to get the value of the width of the current window, the following is the realization of this feature?

A、width()

B、width(val)

C、width

D、innerWidth()

Answers: A

Answer Analysis:

 

12. The following HTML code shows a list of users:

 

 

 

You can delete a user when the desired product manager administrator clicks "Delete" button on the realization of the function which statements are true:

A, first of all you need to bind each element button click event:. $ ( 'Button') on ( 'click', removeUser);

B, acquired by the user click time ID: $ (e.target) .attr ( "data-id");

C, before the page will be deleted from the list of items, you need to call the backend API, $. Delete ( '/ delete / user / xxx'). Then (() => {// the user is removed from the page})

D, in a one-page application, if the user dynamically add a new record, need to re-bind the event record of the delete button.

Reference answer: C

Answer Analysis:

slightly

 

13. With regard to the factory model, saying the error is?

A, creating a definition of an interface object, allowed to decide which instance of a subclass of the class of a factory, the factory model creation process so as to delay subclasses

B, created during the execution of the parent class

C, let the child class implements the factory interface, is the return of an abstract product

D, mainly to solve the problem of interface options

Answers: B

Answer Analysis: The main interface options to solve the problem of the definition of a created object's interface, let subclasses decide which instance of a class factory, the factory model so that it delay the process of creating a subclass to be created in the process of the implementation of its subclasses

 

14. The following description about the box model is correct:

A, the standard box model: the total width of the box left margin + = left border + padding + width of about

B, IE box model are: the total width of the box left margin + = left border + width

C, the standard box model: the total width of the box left margin + = left border + width

D, IE box model: total width = width box

Answers: A

Answer Analysis:

 

 

15.head tag will be a lot of ()

head tag will be a lot of ()

A、<meta>

B、<link>

C、<title>

D、<script>

Reference answer: C

Answer Analysis: <head> tag is used to define the head of the document, which is a container for all the head elements. <Head> element can be referenced in the script, tells the browser where to find style sheets, provide meta-information and so on.

The head of the document describes various attributes of information and documents, including the title of the document, as well as the relationship between location and other documents on the Web and so on. The vast majority of data contained in the document header will not actually appear to the reader as the content.

The following labels are available in the head section: <base>, <link>, <meta>, <script>, <style>, and the <title>.

The title <title> definition document, it is only required in the head section element.

However, no A will be garbled.

 

16. The following notation does not belong to the operator is JavaScript ()

A、$#

B、&&

C、==

D、=

Answers: A

Answer Analysis: $ #, JavaScript is currently out of this operator

 

17. In the HTML page, insert CSS stylesheet does not include the form of ()

A, Embedded

B, indexed

C, external formula

D, inline

Answers: B

Answer Analysis:

slightly.

 

18. The following html elements which fall within the block-level element is

A、h3,ul,form,table,p

B、h2,table,ul,a,input

C、p,ul,form,div,strong

D、div,p,h1,table,span

Answers: A

Answer Analysis:

 

 

19.JS closure usage scenario, the error is ()

A, iterators

B, generator

C, data cache

D, freeing memory

Reference answer: D

Answer Analysis:

Closures will increase memory usage rather than release

 

20. Move the mouse button and when clicked, what will be a series of events?

A、active hover focus

B、foucs hover active

C、hover active foucus

D、hover focus active

Reference answer: D

Answer Analysis: hover -> focus -> active

Hover -> Focus -> response

 

21. The following regular expression which matches a string?

re = /(?<=z)abc(?=:)/

A、z:abc:z

B、:abcz

C、zabc:

D、:zabc

Reference answer: C

Answer Analysis: (? <= Z) indicates matches (z) at the beginning of the string, and captured (stored) into packets

(? = :) indicates matches (:) end of the string, and is captured (stored) into packets

Second, multiple-choice questions (8 questions, each question 5 minutes)

1. About Web semantic argument, right there?

A, semantic meaning is to do the right things with the right label

B, semantic structured so that the page content, structure more clearly

C, semantic facilitate browser, easy to read the code, easy to maintain

D, semantic easy SEO, multi-page, put some H1 tag will increase the page ranking

Answer: A, B, C

Answer Analysis: h1 has the highest weight, the best on a page using a finger to highlight your content h1, h1 distract too much of its heavy weight of the entire page, the search engine is very unfriendly.

 

2.JavaScript the == operator to say right there?

A, if the same type of two values, are compared by the comparative method ===

B, wherein if a value is null, the other is undefined, they are equal

C, if the value is a number other is a string, the string will be converted to digital comparison

D, if a value of the object, the other is a number or string, the target value is then converted to the original rule continues comparative ==

Answer: A, B, C, D

Answer Analysis:

== operator is equal to the flow of determining how

If the two values are the same type, are compared by the comparison method ===
If the types are different, are compared using the following rules
if one value is null, the other is undefined, they are equal
if the other is a numeric value string, comparing string into a number
if the Boolean type, converts true 1, false is converted to 0, and then continue with the comparison rule ==
If a value of the object, the other is a number or string, converting the original target value then continue the comparison with == rule
all other cases are not considered equal
  

3. Given a regular expression, select it successfully matched items. () Re = / ^ [aeiou] * d $ /

A、d

B、aeioud

C uoiead

D, harness

Answer: A, B, C, D

Answer Analysis: ^ represents the beginning of a certain character or string

* Represents 0 or a string comprising a plurality of front

$ Indicates the end of a certain character or string

 

4. Which design patterns to reduce resource usage:

A、prototype

B、singleton

C、flyweight

D、abstract factory

Answers: B, C

Answer Analysis: First of all singleton certainly reduce resource usage and ensure only one instance of that class forever!

Prototype model adapted to the case of the initialization information conversion does not occur, the method is suitable for cloning, the main purpose is to avoid reinitialize the object, if the latter need for new objects, but also need to distinguish shallow copy and deep copy. Whether it is deep or shallow copy copy just copy the resources, it does not reduce resource usage.

Flyweight (Flyweight): Share-based techniques for some common information (or module) abstracted, avoiding the overhead of a large number of similar class, but also reduces the usage of resources.

Such as Java and C ++ class to initialize a string information, an example in C ++: string s = "hello"; string p = "hello". (This has in C ++ problems, confusion, it is noted, there are also problems investigated in C ++ string to achieve the recommended use C to describe the char * s = "hello" and char * p = "hello", s and p refer to the same address), they are actually one and the same instance, string objects in shared memory

BC answers

 

5. Which of the following HTML tags are within the line elements:

A、`p`

B、`span`

C、`canvas`

D、`label`

E、`img`

Answers: B, D, E

Answer Analysis:

p, canvas -> block element

span, img, label -> inline elements (inline)

 

6.JavaScript correct about === operators say?

A, if the two values ​​are null or are undefined, they are equal

B, if the two values ​​are all Boolean true or false, they are equal

C, wherein if there is a NaN, they are not equal

D, and if the numerical values ​​are equal, they are equal, equal to -0 0

Answer: A, B, C, D

Answer Analysis:

Equal === operator determines what process
if the two values are not the same type, they are not equal
if the two values are null or are undefined, they are equal
if the two values are all Boolean true or false , they are equal
if one of them is NaN, they are not equal
if both numeric and values are equal, they are equal, equal to -0 0
if they are strings and contains the same 16-bit value at the same position, they are equal him; if not equal, they are not equal in length or content; but the same results of two different display string encoding == === and that they are not equal
if they refer to the same objects, arrays, functions, they are equal; if different points objects, they are not equal

 

7. given by the HTML code, the selector can be selected from the elements P is?

 

 

A、.box p

B、.box > p

C、.box + p

D、.box,p

Answers: A, D

Answer Analysis: Slightly

 

8. common browser-side storage technologies What?

A、cookie

B、localStorage

C、session

D、userData

Answer: A, B, D

Answer Analysis:

** browser: **

cookie

WebStorage(localStorage、sessionStorage)

userData

indexedDB

**Service-Terminal:**

session

 

 

Share content limit from time to time :( join the group 677 079 770 for more answers to interview questions and learning materials.)

 ★ Tencent Senior PHP Engineer written questions 

 ★ one hundred million PV high concurrency scenarios order handling 

 ★ laravel development Lynx mall Component Services 

 ★ banners TV video broadcast infrastructure project combat 

 

 

 

 


 

 

Guess you like

Origin www.cnblogs.com/993089249a/p/11612660.html