• 2D pictures in the middle of the screen (spriterenderer)


    As shown in the figure: C# Code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpriteRendererTest : MonoBehaviour { List list = new list(); // stores the child object of the parent object List renderwidthlist = new list(); // stores the width of child objects Private vector3 centerpos = vector3.zero; // center position Private float […]

  • The evolution of big data storage format


    This article is from oppo Internet technology team. Please note the author for reprint. At the same time, welcome to pay attention to our public address: OPPO_tech, share with you OPPO frontier Internet technology and activities. Since 2003, the troika of big data has been coming, and comrades have the distributed computing storage capacity for […]

  • PHP generates text watermark and image watermark


    /* *Make image watermark *@ param string $old_img original image address *@ param string $water watermark address *@ param int $offset_x horizontal offset *@ param int $offset y vertical offset *@ return string new image address * @author zhao <2019-11-4> */ private function makeImgWater($ori_img, $water_img, $offset_x, $offset_y) { $original = getimagesize ($ori_img); // get the […]

  • Kafka operation of spring boot series


    Kafka operation of spring boot series Kafka introduction Apache Kafka ® is a distributed streaming platform. There are three key functions: Publish and subscribe record flows, similar to message queuing or enterprise messaging systems. Stores the record stream in a fault-tolerant, persistent manner. Process flow when records occur. Kafka is commonly used in two broad […]

  • Solve the problem of using canvas to generate invitation posters with wechat avatars without wechat avatars


    Recently, I made a H5 page visited in wechat, long press the sharing picture to send the poster invited by friends, search the information on the Internet, come up with the solution, and use canvas to draw the page to generate pictures, Problem: Canvas images cross domain. Solution process (pit filling process): 1. From the […]

  • General IO model of [golang system programming]


    All system calls that perform I / O operations use a non negative integer (file descriptor) to describe open files (files, pipes, sockets, terminals, devices). Three common file descriptors: File descriptor purpose POSIX name Stdio flow 0 Standard input STDIN_FILENO stdin 1 standard output STDOUT_FILENO stdout 2 Standard error STDERR_FILENO stderr Four system calls of […]

  • JQuery obtains summary of various width heights and page width heights of elements


    window.onload=function(){Var a = $(“ාdiv”). Width(), / / width() returns the width and height of the element, excluding padding / border / marginB = $(“ාdiv”). Innerwidth(), / / innerwidth() returns the width and height of the element + paddingC = $(“#div”). Outerwidth(), / / outerwidth() returns the width and height of the element + padding + […]

  • Kafka offset management


    0. Offset management Offset is a long value, which only corresponds to a message. The consumer submits the offset to this special topic of the consumer offset. For specific group consumption, record which partition of this topic. The calculation formula is as follows: brokerId = Math.abs(groupId.hashCode()) % partitionCount //Partitioncount is the number of partitions of […]

  • Let’s meet Kafka consumer


    We have introduced the overall framework of Kafka. Where is the final flow of Kafka producers’ messages? Of course, we need to consume. If we compare Kafka to a restaurant, then the producer is the chef, the consumer is the guest, and the chef is the only one, so it’s meaningless that no one eats […]

  • How to realize the paging effect of IOS?


    Let’s take a look at a GIF chart to see the effect (a little bit of the card recorded by licecap, just like it is) It’s like a card. Connect a video demonstration link: https://m.weibo.cn/1990517135/4398431764047996 Let’s first analyze the page structure, and then analyze the specific animation implementation.   Page structure: you can reuse the […]

  • Memorandum of Common Database Command (Continuous Incremental Updates)


    Modify column names in tables alter table <tablename> change [column] <old column name> <new column name> <column definition> alter table test change name account varchar(30); How to get specific rows when querying data tables If you need to achieve the specific content of the first or last rows of the data table, you need to […]

  • A Brief Analysis of the Low Performance Caused by LIMIT’s Large offset in MySQL Query


    Preface As we all know, MySQL queries use select command, with limit, offset parameters can read records in a specified range, but offset greatly affects the performance of queries and optimization methods Paging is an unavoidable requirement in business systems. When you think of paging, you will definitely think of using LIMIT in SQL to […]