• Data structure and algorithm (implemented by golang) (28) search algorithm AVL tree


    AVL tree The tree height of binary search tree affects the efficiency of search, so we need to reduce the height of the tree as much as possible. AVL tree is such a tree. 1、 AVL tree introduction AVL tree is a strictly self balanced binary search tree. It was invented in 1962Adelson-VelskyandLandisPublished a paper, […]

  • A solution of page deformation caused by mobile phone soft keyboard springing up


    Recently, we used uniapp (a third-party app development framework) to develop app. One page has more than ten input input input boxes. When we click input input, the soft keyboard pops up, causing the top and bottom buttons of the page to pop up on the page, and the layout is completely disrupted. Original look:After […]

  • Title Adaptive Mobile with background frame


    Fixed width, fixed height, to write the height of the background. So you can center it.  

  • Implementation of a new bitmap based on bitmap + text generation


       Note: the parameter content is the content of generating two-dimensional code bitmap. The two-dimensional code bitmap generates a new bitmap in combination with the text title   package info.ecloud.merchant.util; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.journeyapps.barcodescanner.BarcodeEncoder; import java.util.Hashtable; public class SaveImageUtils { private […]

  • IOS input method pop-up input box positioning disorder


    The pop-up input box will change the height of the viewport. After the pop-up input box, the height will be dynamically matched Here’s how to use JQ $(‘input’).on(‘blur’, function () { setTimeout(function () { var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0; window.scrollTo(0, Math.max(scrollHeight – 1, 0)); }, 100); });

  • Eight ways to fix the bottom of CSS page


    When we are writing a page, we often encounter that the content of the page is small, and the footer will be stuck in the middle of the page or what? It’s not displayed at the bottom anyway, but it’s ugly. The next layout is to solve how to make elements stick to the bottom […]

  • On the extension development of for editor and the experience of the syntax extension of marketjs


    aboutfor-editor Start contactfor-editorIt’s because I want to write a laptop PC application based on git that supports markdown. The common development framework is react. I chose the memory eating monster electron in the selection of development tools on the PC side, so I started to use it with the principle of no wheel or no […]

  • (57) C × WinForm custom control – conveyor belt (industry) – hzhcontrols


    Official website http://www.hzhcontrols.com premise It’s been 7 or 8 years since I started, I always want to make a set of beautiful custom controls, so I have this series of articles. GitHub:https://github.com/kwwwvagaa/NetWinformControl Code cloud: https://gitee.com/kwwwvagaa/net/winform/custom/control.git If you think it’s OK, please click star to support it Welcome to discuss: Penguins 568015492 Please click [recommend] below […]

  • 42. Connected to rainwater


    Given that n non negative integers represent the height map of each column with a width of 1, calculate how much rainwater can be received by columns arranged in this way after rain. Above is the height map represented by array [0,1,0,2,1,0,1,3,2,1,2,1], in this case, it can be connected to 6 units of rainwater (the […]

  • Line height and vertical align


    line-height font-size em-square The font attribute defines its own EM square and identifies the character drawing container. This square container is connected withfont-sizeRelevant. But not exactly. The marking of characters is also related to this (x-height, baseline, etc.) <p> <span class=”a”>Ba</span> <span class=”b”>Ba</span> <span class=”c”>Ba</span> </p> p { font-size: 100px } .a { font-family: Helvetica […]

  • How to realize Hanoi tower with Python


    Using animation to realize Hanoi Tower problem: import turtle class Stack: def __init__(self): self.items = [] def isEmpty(self): return len(self.items) == 0 def push(self, item): self.items.append(item) def pop(self): return self.items.pop() def peek(self): if not self.isEmpty(): return self.items[len(self.items) – 1] def size(self): return len(self.items) Def drawpole 3(): draw the poles of Hanoi Tower t = turtle.Turtle() […]

  • Wechat applet generating Poster Canvas text wrapping


    Sharing in wechat applets, the official website only provides the ability to share to friends and group chat, not the API to share to the circle of friends. Therefore, the common way to share the applet to the circle of friends is to generate a dynamic poster with canvas, paste a picture of the applet […]