• ## Introduction to Python office 5: xlrd operating excel columns

Time：2021-11-23

Operating excel columns 1 # get the total number of columns 2 print(sheet.ncols) 3 # obtain the data of a specific column and a list composed of cell objects 4 print(sheet.col(3)) 5 # get the specific value of a cell 6 print(sheet.col(3)[3].value) 7 # get the value of a row 8 print(sheet.col_values(3)) 9 # print […]

• ## Implementation of wechat red packet algorithm with PHP

Time：2021-5-1

Using PHP to send red packets, when we enter the number of red packets and the total amount, PHP will randomly allocate each amount according to these two values to ensure that everyone can get a red packet. The amount of each red packet is different, that is, the amount of red packets should be […]

• ## 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 conventional dynamic programming algorithm problems and solutions of two evil sects

Time：2020-9-18

The following are two very classic dynamic programming algorithm problems, from the force buckle, the solution is also a cliche. However, the two solutions ranking first in their respective speed are very unusual. They open a pit and analyze later. Leetcode 322 change Given coins of different denominations and a total amount. Write a function […]

• ## TP SQL statistics query syntax

Time：2020-4-26

Get today’s order total and order total //Fields distinguish the order whose order type is not equal to 1, and the order amount is money and freight \$fields = [ ‘COUNT(1) as order_num’, ‘SUM(IF(order_type != 1, money + order_freight, 0)) as order_price’ ]; //Where is the payment status of today’s order \$where = [ [ […]