Tag:Odd number

  • Sharding JDBC is used to separate database and table, and read and write are separated


    Sub database and sub table Why do we have to divide the database and table? The amount of data in the database is uncontrollable. With the development of time and business, there are more and more data in the table. If you curd the database table again, it will cause performance problems. In order to […]

  • JS map filter array


    Find out all the scores above 60 let scores = [95,91,59,55,42,82,72,85,67,66,55,91] let scores2 = scores.filter(item => item>60 ?) console.log(scores2) // [95,91,82,72,85,67,66, 91] Turn numbers into weeks let arr = [0,1,2,2,3,3,3,4,4,4,4,6] let arr2 = arr.map((item) =>{ return{ 0: ‘Monday’, 1: ‘Monday’, 2: ‘Tuesday’, 3: ‘Wednesday’, 4: ‘Thursday’, 6: ‘Saturday’ }[item] }) console.log (arr2) // [‘sunday ‘,’ […]

  • In a word, it’s a recurrence


    Modification record: 2021.2.6 The format of the problem is unified 2021.2.3 At the end of the article, we add the recursive review link of big brother Ah, what is recursion? Namely: fromKnownreachunknown。Using observation to find the previous known data, we can get the conclusionRecurrence formulaAnd then the recursive formula is used to solve the problem. […]

  • C practical exercise topic 3


    Title:An integer, after adding 100, is a complete square number, and then 168 is a complete square number. What is the number? Program analysis: Suppose the number is X. 1. Then: x + 100 = N2, x + 100 + 168 = m2 2. Calculation equation: M2 – N2 = (M + n) (M – […]

  • Vue.js Understand the priority of V-for and V-IF from the source code


    stay vue.js In it, V-for and V-IF can be used together to act on a certain element. I read an article on the Internet saying that V-for and V-IF should never be used on the same element at the same time. I feel a bit ridiculous. The official website also indicates that they can be […]

  • Using translate (- 50%, – 50%) causes text blur


    When writing a toast component, the text on the component will become blurred. It is found that the toast uses thetransform: translate(-50%, -50%); ↑It’s the same ↑What it looks like after using translate In the process of reproduction, it is found that there is no blurring problem in Firefox, but there will be blurring problems […]

  • Leetcode 1025. Divisor game | Python


    1025. Divisor game Source: leetcode https://leetcode-cn.com/problems/divisor-game subject Alice and Bob play games together. They take turns. Alice started first. At first, there was a number n on the blackboard. In each player’s turn, players need to do the following: Choose any onex, satisfy0 < x < NAndN % x == 0 。 useN – xReplace […]

  • JQuery filter selector


    //Entry function $(document).ready(function() { //Even digit var jqLi = $(“ul li:odd”); jqLi.css(“margin”, 5); jqLi.css(“background-color”, “red”); //Odd digit jqLi = $(“ul li:even”); jqLi.css(“background-color”, “yellow”); //Specifies the index value element jqLi = $(“ul li:eq(0)”); jqLi.css(“background-color”, “green”); }); Beijing Shanghai Guangzhou Roasted Duck Beer self-help

  • Chapter 1: pythagorean array (2)


    Pythagorean array theorem Pythagorean array theorem: each primitive Pythagorean array (a, B, c) (where a is odd and B is even) can be obtained from the following formula: a = st\\ b = \frac{s^2-t^2}{2}\\ c = \frac{s^2 + t^2}{2} amongs>t\geq 1Is any odd number that has no common factor.The proof process is as follows:Considering the […]

  • JS native exercises


    1. Output the number between 1 and 10000       for(i=1;i<=10000;i++)           {         document.write(i + ““) } 2. Find the sum of all even numbers between 1 and 100 3. Find the sum of all odd numbers between 1 and 100 4. Find the number within […]

  • Chapter 1: pythagorean array (1)


    Pythagoras theorem (Pythagorean theorem) indicates that the sum of the squares of the lengths of the two right angles of any right triangle is equal to the square of the length of the hypotenuse. It is expressed by formula a^2 + b^2 = c^2 The first question is whether there are infinitely many Pythagorean arrays […]

  • Python Beginner – enter a number to determine parity


    Num = int (input (“please enter an integer”)) if num%2 == 0: Print (“this number is even”, Num) else: Print (“this number is odd”, Num)