Tag:element

  • Mongodb array operator and operation operator

    Time:2020-7-2

    Array operation Create a document that contains arrays and nested arrays > db.accounts.insert({ name:”alice2″, balance:100,contact:[13611111111,”Guangzhou”] }) WriteResult({ “nInserted” : 1 }) > db.accounts.insert({ name:”alice2″, balance:100,contact:[[13611111111,13622222222],”Guangzhou”] }) WriteResult({ “nInserted” : 1 }) Query array elements and nested arrays > db.accounts.find({contact:{$all:[13611111111]}}) { “_id” : ObjectId(“5d7f8f0da7b5867462dee50f”), “name” : “alice2”, “balance” : 100, “contact” : [ 13611111111, “Guangzhou” ] […]

  • The difference between arrt() and prop() in jquery

    Time:2020-7-2

    In jQuery, both the attr() function and the prop() function are used to set or get the specified attribute, and their parameters and usage are almost identical. But it has to be said that the two functions are not the same. Let’s take a look at the differences between these two functions in detail. 1. […]

  • CSS basis and usage of front end

    Time:2020-7-2

    Introduction to CSS CSS(Cascading Style SSheet (cascading style sheet) definitionHow to displayHTML elements. When the browser reads a style sheet, it will format (render) the document according to the style sheet. CSS syntax CSS instance Each CSS style consists of two parts: a selector and a declaration. The declaration also includes properties and property values. […]

  • Java basics Part 12: collections, enhanced for loops, iterators, and generics

    Time:2020-7-2

    Common methods in collection interface:*Has all subclasses of*Set method: add, delete, modify and search * *Public Boolean add (e e); / / the return value of adding an element indicates whether the addition is successful*Public Boolean remove (object o); / / to delete an element, the return value indicates whether the deletion was successful*There is […]

  • My girlfriend asked me to teach her CSS, so I wrote this long article, moved to cry?

    Time:2020-7-1

    Writing background My girlfriend asked me to teach her CSS, so I tossed around for a week and finally finished this long article And then? Then when I published this article, would she be moved to cry? Familiar with HTML knowledge Common HTML elements headpart bodypart What is the meaning of DOCTYPE Let the browser […]

  • [brush leetcode together] find the kth largest element in the unordered array

    Time:2020-7-1

    Title Description The kth largest element was found in an unsorted array. Please note that you are looking for the kth largest element after the array is sorted, not the kth different element. Example 1: Input: [3,2,1,5,6,4] and K = 2Output: 5 Example 2: Input: [3,2,3,1,2,4,5,5,6] and K = 4Output: 4 explain: You can assume […]

  • Three methods of react data sharing

    Time:2020-7-1

    In a typical react application, data is passed from top to bottom (by parent and child) through props attribute. However, in the actual development, we find that there are some properties that many components need, so it is very cumbersome to pass props layer by layer through the component tree, and it is not easy […]

  • Java collection

    Time:2020-7-1

      1. What’s the difference between list, set and map? List: ordered and repeatable elements Set: element cannot be duplicated Map: an element is a key value pair. The key uniquely identifies a key value pair. The key cannot be repeated. The element can be repeated. Both key and value can be of any type. […]

  • Niuke.com offers [Python implementation] – Part1

    Time:2020-7-1

    Fibonacci sequence We all know Fibonacci sequence. Now we need to input an integer n. please output the nth term of Fibonacci sequence (starting from 0, item 0 is 0, n < = 39). Loop implementation, time complexity n def Fibonacci(self, n): if n == 0: return 0 if n == 1: return 1 a […]

  • Several good console debugging skills are recommended

    Time:2020-7-1

    In our daily front-end development, the most frequently used is usingconsole.logPrint out the information we need to debug in the browser console, but most people may not be aware of it, just like me beforeconsoleexceptlogMethods, there are many practical methods, these methods can make our debugging process easier, also more intuitive, more colorful, let’s see […]

  • [notes] jQuery framework learning notes

    Time:2020-6-30

    1. Break can only appear in loop or switch statement 2. The immutability of string in memory var str = “123”; str = str + “abc”; console.log(str); String operation The first step is to create a space in the stack to store the string “123” to which the variable STR points The second step is […]

  • Mongodb document projection

    Time:2020-6-30

    The second parameter of find specifies which fields are returned and which fields are not returned. 1 returns, 0 does not return > db.accounts.find({},{name:1,_id:0}) { “name” : “alice2” } { “name” : “charlie” } { “name” : “david” } { “name” : “charlie” } { “name” : “david” } If the field filter does not […]