Tag:Tree shape

  • PHP の sorting algorithm

    Time:2021-6-22

    1. Insert sort1) . insert sort directly $arr = [16,19,10,17,8,13,6,7,5,12]; $arr = insert_sort($arr); function insert_sort($arr) { $len=count($arr); for($i=1; $i<$len; $i++) { $tmp = $arr[$i]; for($j=$i-1; $j>=0; $j–) { if($tmp < $arr[$j]) { $arr[$j+1] = $arr[$j]; $arr[$j] = $tmp; } } } return $arr; } 2) . Hill sort $arr = [16,19,10,17,8,13,6,7,5,12]; $len = count($arr); for( […]

  • Tree component in Vue + iView covers the background color of clicking and moving mouse in

    Time:2021-6-13

    Tree component in Vue + iView covers the background color of clicking and moving mouse in 1. Development environment Vue + iView2. Computer system Windows 10 professional edition3. In the process of using Vue + iView development, we will use the tree component according to the requirements. Let me share it with you, hoping to […]

  • Vue studio management background (7): tree structure, file tree, node tree share a set of code nodetree

    Time:2021-5-30

    The content of this introduction is a little more complicated, using Vue to realize the tree structure. At present, this attribute structure has no editing function, just display. I’ll open another article tomorrow to introduce how to add editing function. I’ve thought about the title. Let’s look at the effect of today’s exhibition Recursion must […]

  • The realization of the purpose of adding new products

    Time:2021-5-3

    Toolbar menu description Introduction to introductory cases toolbar: [{ iconCls: ‘icon-help’, Handler: function () {alert} },{ iconCls: ‘icon-help’, Handler: function () {alert (‘help Toolbar ‘)} },’-‘,{ iconCls: ‘icon-save’, Handler: function () {alert (‘save Toolbar ‘)} },{ iconCls: ‘icon-add’, Text: “test”, Handler: function () {alert (‘save Toolbar ‘)} }] Icon styles in tables Page structure: Page […]

  • Leetcode 37

    Time:2021-4-24

    Before solving this problem, we need to know what is backtracking. Generally speaking, backtracking method is: there are many choices at present, we don’t know which one to choose, so we need to try each one. Every path you try to connect will get a tree solution. For example, in the coordinates above[0,2]Through observation, we […]

  • Combination pattern of design pattern

    Time:2021-1-16

    Composite pattern Intro In combination mode, objects are combined into a tree structure to represent the “part whole” hierarchical structure. Combination mode makes users use single object and combination object consistently. Intention: to combine objects into a tree structure to represent a “part whole” hierarchy. The combination pattern makes the user’s use of single object […]

  • Ant Design edited tree table

    Time:2021-1-9

    Ant Design Editable Tree Table Ant Design of React – Editable Tree TableTree table that can be edited Need in the work, but i did not find ready-made components easy to understand after Baidu and Google.Work needs, but Baidu Google did not find ready-made, available, easy to understand components. So i try to do it.So […]

  • String array to tree structure

    Time:2021-1-3

    Based on path string, classified directory string and database query record source, the tree data structure is constructed by JS object-oriented, function and process Questions Write an algorithm to achieve string array in accordance with a certain format into a tree structure const arr = [ ‘root/lufei.jpg’, ‘root/font/VarelaRound.ttf’, ‘root/font/SourceSansPro.ttf’, ‘root/img/avator.jpg’, ‘root/img/favicon.jpg’, ‘root/img/bg5.jpg’, ‘root/img/bg4.jpg’, ‘root/img/upload/a.png’, ‘root/img/nt/mvvm.png’, […]

  • Android development app embedded web page contains video and pictures

    Time:2020-12-19

    Scene Description: The app developed by the company’s Android needs to be embedded in H5 webpage, which contains videos and pictures, and the images can be click previewed with the help of a third party; Problem Description: In the same screen, the webpage contains the video and img tags. First click the video to play, […]

  • The CMD tree command lists files in tree format

    Time:2020-12-16

    When you show others the contents of your own CD-ROM, or list the information in a directory on your hard disk, the tree command is quite convenient, and can let you display the content in a clear and orderly way. Don’t say anything, picture above. By the way, review the CD command.Of course, you may […]

  • Method of transforming flat data into tree data in JS front end

    Time:2020-12-4

    1. JS front-end method to convert flat data into tree data The measurement is successful https://segmentfault.com/a/1190000022444269 //Convert peer data into tree structure listToTree(dataSource) { //Datasource is the same level data source return dataSource.filter(e => { const pid = e.parentId const resultArr = dataSource.filter(ele => { if (ele.menuId === pid) { if (!ele.children) { ele.children = […]

  • Oracle SQL tree structure query

    Time:2020-11-15

    The select statement in Oracle can use start with… Connect by prior clause to realize recursive query. Connect by is used in structured query, and its basic syntax is as follows: Copy codeThe code is as follows: select * from tablename start with cond1 connect by cond2 where cond3; In short, a tree structure is […]