• contentEditable


    function getDivContent(wrapper){ var textareaText = ”; for (var i = 0; i < wrapper.childNodes.length; i++) { if (wrapper.childNodes[i].nodeName !== ‘#text’) { if (wrapper.childNodes[i].innerHTML == ”) { textareaText += wrapper.childNodes[i].innerHTML } else { textareaText += wrapper.childNodes[i].innerText.replace(/\n$/,”) + ((i == wrapper.childNodes.length – 1|| wrapper.childNodes[i].innerText==’\n’) ? ” : ”) } } else { textareaText += wrapper.childNodes[i].nodeValue + ((i […]

  • Who says C language is very simple? These 14 C language puzzles are hard to cry


    This article shows 14 C language puzzles and answers. The code should be clear enough, and there are quite a few examples that we may meet in our daily work. Through these puzzles, I hope you can understand C language better. If you don’t look at the answers, do you know if you are sure […]

  • [interview]: you may not know the subtle difference between ‘return await promise’ and ‘return promise’?


    Author: Dmitri pavlutinTranslator: front end XiaozhiSource: Dmitri pavlutin Dream, dry goods, wechat search[move to the world]Pay attention to this dish washing wisdom who is still washing dishes in the early morning. This article GitHubhttps://github.com/qq449245884/xiaozhiIt has been included. There are complete test sites, materials and my series of articles for the interview of front-line large factories. […]

  • Python technique 1: sequence splitting


    Any sequence (iteratable object) in Python can be split by assignment, including but not limited to tuples, lists, strings, files, iterators, generators, etc. Tuple splitting Tuple splitting is the most common splitting. Examples are as follows: p = (4, 5) x, y = p print(x, y) # 4 5 If written x, y, z = […]

  • Perfect ant design dynamic skin changing scheme


    preface Preview address:Ant Design Theme const App = () => { return ( <ThemeProvider theme={{ name: ‘dark’, variables: { ‘primary-color’: ‘#00ff00’ }, }} > <Button type=”primary”>Primary Button</Button> </ThemeProvider> ); }; Out of the boxantd-themeWelcome, star ❤ Defects of existing schemes CSS variables Complex expressions cannot be supportedmix(var(–primary-color), #fff, 20%) Limited browser compatibility Multiple sets of […]

  • Windows11 3D emoj to 2D? Microsoft responded: the wrong picture was used


    On October 15, Microsoft released windows 11 build 22478 to windows 11 insider users on dev channel. Microsoft introduced a new Emoji fluent Emoji into this version. As early as July, the Microsoft design team announced that the refreshed and new fluent fluent fluent Emoji emoticon will be launched in all Microsoft 365, including windows. […]

  • Thymeleaf


    Spring integrates thymeleaf template engine, which is introduced in this article dialect Thymeleaf provides a flexible interface that allows users to customize their own dialects. Therefore, it is necessary to understand the standard dialect before customizing the dialect. Standard expression ${…}: variable expression Variable Variable expressions are usually ognl ${session.user.name} Thymeleaf <span th:text=”${book.author.name}”> Equivalent to […]

  • Stack based on actual PHP data structure


    Stack and queue Stacks and queues are the same as beforeDouble linked list based on actual PHP data structureThe same is a linear structure. What are the characteristics of stack The stack follows the last in first out principle (LIFO). This means that the stack has only one exit to push in and pop out […]

  • What is your understanding of media inquiry? What’s your understanding of media queries ?


    What is your understanding of media inquiry? Brief concept Media query consists of an optional media type andZeroorMultipleExpressions that use media features to limit the scope of the style sheet, such as width, height, and color. Media query, add fromCSS3, it is very suitable to allow the presentation of content to be tailored to a […]

  • Mongo syntax summary


    Filter first and then group1. Example: db.getCollection(‘UpMsgItem’).aggregate( [ {$match : { createTime : {$gt : 1513568964539, $lte : 1516160964542 }, wxAppId : “wx8bd8a617c9ae66ed” }}, {$group : {_id : “$wxOpenId”}} ]) 2. Explanation:Match for filtering. Here, the createtime and wxappid fields are used for filtering. Filtered data, according to_ Group by ID$ The value corresponding to […]

  • Oracle order by handles null values


    Problem point: by default, Oracle considers null as the maximum value when processing order by, so if ASC is in ascending order, it will be ranked last, and desc is in descending order, it will be ranked first Solution:Use the nulls first or nulls last syntaxNulls first and nulls last are syntax supported by Oracle […]

  • Python practical case, python script implementation play Emoji, I micro and “secretly” update this expression!


    preface Today, let’s use Python script to realize weather query application. Direct opening and adjustment~ Effect display Coding of Emoji Emoji characters are part of the Unicode character set. That is, the Emoji symbol is a text that is rendered as a graphic. The range of common Emoji expressions in the Unicode character set and […]