Tag:End

  • F # functional programming – Exercise answers

    Time:2021-1-18

    original texthttps://fsharpforfunandprofit.com/posts/computation-expressions-bind/ There is an exercise at the end of the original text let strToInt str = ??? let stringAddWorkflow x y z = yourWorkflow { let! a = strToInt x let! b = strToInt y let! c = strToInt z return a + b + c } // test1 let good = stringAddWorkflow “12” […]

  • Push () method

    Time:2021-1-8

    effect: Adds one or more elements to the end of the array and returns the new length Grammar: array.push(item1, item2, …, itemX) Item, the element added to the array be careful: The new element is added at the end of the arrayThis method changes the length of the arrayThis method does not generate a new […]

  • Leetcode refers to offer 11. Rotate the smallest number of arrays | Python

    Time:2020-12-19

    Rotate the smallest number in the array Source: leetcode https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof subject Moving the first elements of an array to the end of an array is called array rotation. Input a rotation of an incremental sorted array and output the smallest element of the rotated array. For example, the array [3,4,5,1,2] is a rotation of [1,2,3,4,5], […]

  • SSH appears in Git push_ dispatch_ run_ fatal

    Time:2020-12-14

    Problem: gitpush encountered the following error: ssh_dispatch_run_fatal: Connection to 52.74.223.119 port 22: Software caused connection abort fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Cause: DNS resolution problem Open CMD and enter ping command to view github.com Connection, request timeout: Solution: configure the […]

  • Linux text view command and its options (cat, head, tail)

    Time:2020-11-28

    Linux system built-in commands can be queried in the following two ways: “cat — help” or “man cat”. The common options and official explanations of the cat command are as follows: cat file_ Name displays all the contents of the file cat -b file_ Name displays the non empty line content of the file cat […]

  • Insertion sort algorithm

    Time:2020-11-24

    The insert sort pair divides the array into sorted and unsorted parts. Generally, the left side is sorted and the right side is unsortedThen the first element of the unsorted sequence is taken as the element to be inserted, and then the sorted sequence is traversed,Note that we have to traverse the sorted sequence from […]

  • Git push commit error the remote end hung up unexpected

    Time:2020-11-19

    Cause of error The connection with the remote service was interrupted, but the check found that the origin is still there. It may be that the file is too large and the cache is not enough. Increase the cache size Solution Project directory. Git config Add the following code at the end [http] postBuffer = […]

  • Cocos2d-x gets the getdpi () method of device class in Lua environment

    Time:2020-11-18

    When doing multi-resolution adaptation, I encountered a special requirement. I need to do some adaptation work according to the real size in the real world. This requires calling the getdpi () method of the device class to obtain the DPI value of the current device screen. Unfortunately, cocos2d-x 3.2 does not export the device class […]

  • Linux partial commands

    Time:2020-10-7

    See which ports are open netstat -tlpn Ubuntu opens specified portGenerally, iptables will be installed when Ubuntu is installed. If not, install it installInput at terminal sudo apt-get install iptables Add ruleInput at terminal iptables -I INPUT -p tcp –dport 80 -j ACCEPT The 80 in the middle is the port that needs to be […]

  • Mapping / mounting NFS rpcbind between Linux servers

    Time:2020-10-3

    Server: Linux CentOS 7.6 Implementation function: a server / directory is mapped to B server / directory 1、 Install NFS and rpcbind on server a and server B respectively yum install nfs-utils rpcbind 2、 Modify the / etc / exports file on server B (mapped server), add a line of code at the end, expose […]

  • [20200103] guid conversion_ BASE64.txt

    Time:2020-9-24

    [20200103] guid conversion_ BASE64.txt –//Recently, I was doing a project optimization, which used UUID a lot http://blog.itpub.net.x.y265/viewspace-2670513/= >[20191225] primary key enables–//I have a discussion about the advantages and disadvantages of uuid.txt. My own point of view should not be abused or used everywhere. Reasonable use is the right choice –//Yesterday, I read 12C related books […]

  • Solution of generating JSON with blank space and blank line by PHP

    Time:2020-9-23

    1. Delete the extra blank lines in PHP file, especially at the end of the file?>Blank line at the back2. Modify the PHP file to UTF-8 no BOM format, vscode can click “UTF-8 with BOM” in the status bar at the bottom right corner, and then select “save by encoding = > UTF-8”