Tag:Amount of money

  • Buckle questions 169, 171, 189, 198 and 202

    Time:2021-2-22

    Buckle questions 169, 171, 189, 198 and 202 169. Most elements code: class Solution { public int majorityElement(int[] nums) { Arrays.sort(nums); return nums[nums.length/2]; } } 171. Serial number of Excel table How to solve the problem: Tag: String traversal, decimal conversion The initialization result is ans = 0. During traversal, each letter is subtracted from […]

  • Two way binding of form form explored by antdesignpro 4.0

    Time:2021-2-15

    preface:In Ant Design Pro3.23.6Version, the form form binding value is usedgetFieldDecoratorMethod assignment matchingvalidateFieldsMethod value to achieve the effect of two-way binding4.0How to assign values in the version? AntDesignPro3.23.6Version example: //Assignment <Form labelCol={{ span: 6 }} wrapperCol={{ span: 14 }} onSubmit={this.handleSubmit} > <Form.Item> {getFieldDecorator(‘money’,{ rules=[{ required: true, Message: ‘please enter the amount’, }], })( <InputNumber min={0} […]

  • Shaggot event book – regular expressions

    Time:2021-2-8

    //Nonzero positive integers var num1 = /^+?[1-9][0-9]*$/; //Positive integer + 0 var num2 = /^d+$/; //Positive number var num3 = /^d+(?=.{0,1}d+$|$)/; //Amount format var moneyReg = /(^[1-9]([0-9]+)?(.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9].[0-9]([0-9])?$)/; Keep updating

  • Algorithm Java Multithread Cooperation & red packet random distribution algorithm

    Time:2021-1-25

    1. Using java multithreading to print 1 to n The requirements are as follows: For a given integer n, start n threads (numbered 1 to n respectively). The working logic of the thread is: the thread numbered x can only print integer X, Realize the code logic, make n threads work together, print natural sequence […]

  • The object oriented writing method of S

    Time:2021-1-18

    JS object oriented writing1、 The JS file is introduced into HTML <script> var BuyBw8Product = new buyBw8Product(); </script> 2、 Generally, when writing JS code of a larger module, this method is used to write JS Create a new JS. The content structure is as follows: /** * create by wkk *Description:*** */ !function(){ function b(){ […]

  • Leetcode 213. Robbing the House II Python implementation

    Time:2021-1-16

    Title Requirements: Thinking: If you rob the first house, you can’t rob the last house. If you rob the last house, you can’t rob the first house. Therefore, nums can be divided into two cases. One is nums [: – 1] and nums [1:], traverse these two arrays, and then compare the maximum amount of […]

  • How to sort million level orders by amount

    Time:2021-1-15

    The previous “code byte” introduces someClassical sorting algorithmThe best time complexity of them is O (nlogn)How to sort million level orders by amount?Do you think it can be implemented according to the merge sort and quick sort learned before? The function can be completed, but the efficiency is too low. Today, “code brother” will take […]

  • How does SQL server perform row column conversion of data through pivot (Advanced)

    Time:2020-12-15

    script: /* Note: how does SQL server perform column column conversion (Advanced) on data through pivot, which is used for monthly ranking of employee performance, monthly ranking of customer sales amount, etc Script source: https://www.cnblogs.com/zhang502219048/p/13173228.html Author: zhang502219048 Author WeChat official account: SQL database programming (micro signal zhang502219048) */ declare @n int = 2 create table […]

  • Contract wallet integration DAPP

    Time:2020-12-7

    The conventional Ethereum account (EOA) has an unfortunate limitation. Each transaction from the EOA can only interact directly with a single address or contract. This often happens in DAPP interactions, such as “you must unlock x before you can get y”. Contract based accounts (contract wallets) are not subject to this restriction, and transactions can […]

  • Leetcode 337. Robbery III | Python

    Time:2020-11-23

    337. Robbery III Source: leetcode https://leetcode-cn.com/problems/house-robber-iii subject After the last robbery of a street and a circle of houses, the thief found a new feasible area to steal. There is only one entrance to this area, which we call “root”. In addition to the “root”, each house has and only one “father” house connected to […]

  • Python Beginners – product discounts

    Time:2020-11-1

    x = int(input(“x=”)) If x < 1600: ා if x is less than 1600, y is equal to 0 Y = 0 ා no discount Print (“payable:” X – (x * y)) ා y equals the discount price, which should be the total price minus the discount amount elif 1600 <= x < 2400:# Y […]

  • Leetcode – dynamic programming 1

    Time:2020-10-19

    5. Longest palindrome string Given a string s, find the longest palindrome substring in S. You can assume that the maximum length of S is 1000. Example 1: Input: “babad”Output: “bab”Note: “ABA” is also a valid answer. Example 2: Input: “CBBD”Output: “BB” Train of thought 1The central extension means that each character is taken as […]