• [share] IOS development – how to empty the array correctly


    In Object-C, two kinds of arrays are often used, nsarray and nsmutablearrayIn daily development, we often encounter the need to empty the array. Many novices subconsciously think of nil, which is not advocated here. Because if array = = nil is used; In this way, not only the array is cleared, but also the memory […]

  • Urlparameter configuration principle of Spartacus UI of SAP e-commerce cloud


    A colleague asked me the following questions: When Spartacus is started locally, open localhost: 4200, redirect to base site by default, and the URL is automatically changed to:http://localhost:4200/electro… How to avoid displaying electronics spa / en / USD / after localhost: 4200? In the file projects \ storefrontapp \ SRC \ app \ Spartacus \ […]

  • The scratch effect is so simple


    1. The core API of scraping (eraser) effect ctx.globalCompositeOperation = type; Sets the type of compositing operation to apply when drawing a new shape.The type we need to use here isdestination-outDetails of this property:MDN document 2. Basic version scratch function Canvs overlay on picture <style>     body {       margin: 0;     }     img {       width: 400px;       height: 300px;       left: 200px;       position: absolute;       z-index: -1;     } […]

  • JQuery source code series (XV) DOM operation


    WelcomeMy columnView a series of articles. You may find the name strange. Why is it called dommanip, the so-called DOM micro operation. In fact, there are many important DOM operations in jQuery, which are used very frequently. However, these operations generally have a feature that they need to be fine tuned, such as converting a […]

  • Wechat applet realizes history search function (H5 similarly)


    1. Achieve results 2. Implementation principle Store data in storage. wx.setStorageSync(‘search_history’, JSON.stringify(this.data.list)) Take the first 15 items of the array. if (wx.getStorageSync(‘search_history’) ){ this.setData({ list:JSON.parse(wx.getStorageSync(‘search_history’) ).slice(0, 15) }) } And move the data selected each time to the first item of the array. this.data.list.unshift(data); Clear all history. clearHistory() { this.setData({ list:[] }) wx.removeStorageSync(‘search_history’) }, 3. […]

  • Error creating bean with name ‘sessionFactory’ defined


    Error creating bean with name ‘sessionFactory’ defined in class path resource [spring/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: entity class not found: com.zking.ssh.book.entity.Module Using SSH development project, this error is reported when starting the service with Tomcat. After carefully verifying the corresponding package and class mapping, the startup is still an error. […]

  • C + + address book management system (add contact, display contact, delete contact, find contact, modify contact, empty contact, exit address book)


    1 /** 2 * projectnmae: address book management system 3 * function: 4 * add contact: add a new person to the address book 5 * display contact: displays all contact information in the address book 6 * delete contact: delete the specified contact by name 7 * Find Contact: view the specified contact information […]

  • Espnet / espnetv2: empty convolution pyramid | lightweight network


    The core of espnet series lies in the cavity convolution pyramid. Each layer has different division rates. It can integrate multi-scale features without increasing the amount of parameters. Compared with the depth separable convolution, the depth separable cavity convolution pyramid has higher cost performance. In addition, the multi-scale feature fusion method of HFF is also […]

  • Differences between installing MySQL in different versions of Ubuntu


    Installing MySQL on Ubuntu is simple: apt-get install mysql-server Please update before installation: apt-get update apt-get upgrade Ali’s image library is recommended for updating (modify the file / etc / apt / sources. List) cp /etc/apt/sources.list /etc/apt/sources.list.backup sed -i ‘s/us.archive.ubuntu.com/mirrors.aliyun.com/g’ But when actually installing, I still encountered a pit: the previous Ubuntu 14.04 lts version […]

  • [finishing] tips for using Windows


    1、 Desktop, windows and shortcuts 1.1. The default opening method corresponding to hkey-classes-root cannot be effective; In regedit, in hkey-current-user \ software \ Microsoft \ windows \ CurrentVersion \ Explorer \ fileexts, Find the file suffix to cancel and delete the redundant information.   1.2. Add application from the right-click menu; For example, the notepad3 […]

  • NPM install reports an error (NPM err! Code integrity)


    The specific error information is as follows: npm ERR! code EINTEGRITY npm ERR! Verification failed while extracting @[email protected]^1.2.0: npm ERR! Verification failed while extracting @[email protected]^1.2.0: npm ERR! sha512-lQ…HA== integrity checksum failed when using sha512: wanted sha512-lQ…HA== but got sha512-nH…ow==. (4835509 bytes) terms of settlement 1. Delete the local package-lock.json file2. Update your own NPM Version […]

  • About using runloop to avoid application flashback


    Runloop is the most basic knowledge point in OC. This paper mainly describes how to avoid application flicker caused by program exceptions during application operation from the perspective of use. Application flash back is a nightmare for many companies. Application flash back will lead to a large loss of users, so controlling the stability of […]