Tag:fragment

  • Operating system — memory management

    Time:2020-11-9

    1. Memory management The function of a computer is to execute a program, and a program is a collection of instructions and data. We must store it in a location, that is, memory. Just like the JVM virtual machine, it has its own memory allocation and recycling, and the computer’s memory also has a variety […]

  • JavaScript animation example: fireworks bloom to welcome the new year

    Time:2020-10-16

    First write an animation effect of fireworks bloom. When setting off fireworks, a fireworks can be divided into two stages: (1) the fireworks rise into the air; (2) the fireworks explode into pieces, and the exploded fragments slowly dissipate. Two object classes are abstracted: firework and particle. Firework is used to represent a fireworks object, […]

  • Pronto move shard — flash game created with database

    Time:2020-10-7

    Abstract: as a tribute to the era of junk games, Andreas streichardt created a flash game using the arangodb database to commemorate the era. Come and have a look! In July, Adobe announced that they planned to end flash around 2020. With the progress of HTML5, and due to the long-standing existence of key security […]

  • JVM memory model (text collation)

    Time:2020-10-4

    Four clock algorithm for GC Optimization:1. Reference counting (disadvantages waste technical space, and when infinite loops)2. Replication algorithm (waste a to area) applicable scenario: when the object survivability is low: new area3. Mark clearing algorithm: (two scans seriously waste time and lead to memory fragmentation) (no extra space required)4. Mark compression algorithm: (compression means scanning […]

  • Android fragment for static loading

    Time:2020-9-17

    The interface after static loading is as follows: two fragments are located on the left and right of an activity     On the left and on the right, there are two pieces, which just cover the whole activity. An activity can have multiple fragments. Fragmentation means that the interface can be divided into several […]

  • Android dynamic add fragment

    Time:2020-9-9

    We write an app that can dynamically replace fragments with buttons. First, the first fragment is displayed on the home page. After clicking the button, we can replace the second fragment or delete the second fragment that has been replaced. 1 MainActivity.java import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import android.os.Bundle; import android.util.Log; import android.view.View; import […]

  • Sharing common SQL statements in alicloud RDS database

    Time:2020-7-30

    In the process of daily work or study, some SQL statements are often used, which are not easy to remember. It is recommended that you keep a record of these commonly used SQL, so that the subsequent use will be more convenient. In the process of work and study, I have also sorted out the […]

  • Two lines of code to achieve image fragmentation loading

    Time:2020-7-7

    Today, let’s implement an image fragmentation loading effect. The effect is as follows: We implement it in three steps: Define HTML structure Split picture Write animation function Define HTML structure All you need is a canvas element. <html> <body> <canvas id=”myCanvas” width=”900″ height=”600″ style=”background-color: black;” ></canvas> </body> </html> Split picture In this example, we split […]

  • Android uses fragment to implement the bottom title bar (GitHub template open source)

    Time:2020-7-1

    Fragment features Fragment is similar to activity in that it has its own life cycle and layout. It is equivalent to a mini activity Fragments can be part of an activity, and an activity can have multiple fragments A fragment can be reused by multiple activities Fragments can be added, removed and exchanged dynamically when […]

  • StarUML III. Project of StarUML

    Time:2020-4-14

    1: Create an empty project To create an item, press Ctrl + n or select a menuFile| New, there will be an empty project structure by default when the StarUML installation is opened. 2: Create template project You can start a modeling project by selecting a template, which creates the project structure from the template. […]

  • Generation and processing of SQL index fragment.

    Time:2020-2-23

    Reference in this article https://www.cnblogs.com/CareySon/archive/2011/12/22/2297568.html https://www.jb51.net/softjc/126055.html https://docs.microsoft.com/zh-cn/sql/relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql?view=sql-server-ver15 This article needs to have some knowledge of “index” and “storage method” of data in MSSQL. Software often gets stuck for no reason after a period of use, which is caused by paging and fragmentation in the process of frequent database (MSSQL) insertion and update. Therefore, the fragments […]

  • General script for SQL server to rebuild database index and update database statistics

    Time:2020-2-21

    Rebuild full database index: exec sp_msforeachtable ‘DBCC DBREINDEX(”?”)’ Update database wide statistics: exec sp_updatestats Example feedback: In the actual project, it takes about 46 minutes to execute the stored procedures that have imported data, but only 6 minutes after updating the whole database statistics. Through simple processing, the performance of SQL server is improved quickly. […]