• 24 suggestions for front end performance optimization (2020)


    Please do not reprint without permission Performance optimization is a double-edged sword, which has both good and bad sides. The good side is that it can improve the performance of the website, and the bad side is that the configuration is troublesome or there are too many rules to follow. In addition, some performance optimization […]

  • JS Baidu map road book — dynamic route


    JS Baidu map road book — dynamic route CanvasLayer body, html,#container {width: 100%;height: 100%;overflow: hidden; margin:0;font-family “Microsoft YaHei”;} //Baidu map API function var SMSS={MAP:{}}; var map = new BMap.Map(“container”); var point = new BMap.Point(113.290512, 23.161744); map.centerAndZoom(point, 15); map.enableScrollWheelZoom(); map.enableKeyboard(); map.enableDragging(); map.setMapStyleV2({styleJson: eval(“mapStyleBrown”)}); // var bmap = document.getElementById(‘map’); // var map = new BMap.Map(“map”); map.enableScrollWheelZoom (true); […]

  • Talking about the process of picture upload and canvas compression


    We usually encounter this situation when we upload images. First, the back-end interface limits the size of uploaded images, or even if the back-end does not limit the size, because the image is too large, rendering in the front-end is too slow, resulting in poor page loading experience. Therefore, it is necessary for us to […]

  • Multi image upload (compatible with wechat applet, only single image upload) – problems encountered in developing uniapp project (main H5, wechat applet)


    Demo:uni-app template GitHub Address problem In demand, multiple images need to be uploaded, but wechat applet can only upload single image, and multi image upload only supports app and H5. If you can only upload pictures one by one, the user experience is quite poor. I believe that the users who upload will be crazy […]

  • Wechat applet sharing and forwarding events


    “Sharing and forwarding” function of wechat applet1. On page custom sharing2. “…” in the upper right corner of the page Sharing behavior When the event “onshareappmessage” is not added to the page JS, the upper right corner “…” No forward events will occur.If there is an event, but the event content is not defined, the […]

  • Summary of IOS tips, absolutely what you want (continuous update)


    Recently, I summarize some tips in IOS development, which can greatly facilitate our development. Group style top blank handling of uitableview //Group list header blank processing UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0.1)]; self.tableView.tableHeaderView = view; In the plain style of uitableview, cancel the stagnation effect of the header – (void)scrollViewDidScroll:(UIScrollView *)scrollView { […]

  • How to set up dynamic desktop in win8 system — win10 Professional Edition


    Some friends who often use computers reflect to me the problem of setting dynamic desktop in win8 system. According to Xiaobian’s understanding, not all users will solve the problem of setting dynamic desktop in win8 system. Therefore, Xiaobian collects and arranges some processing steps of setting dynamic desktop in win8 system on the Internet. You […]

  • Picture sending and display in instant messaging


    When doing instant messaging projects, in addition to sending necessary text messages, there are also various message types such as voice, picture, map positioning, etc., among which the others are relatively easy to handle. However, when dealing with images, there are multiple images sent at the same time and single image sent. The following problems […]

  • Tensorflow tfrecords write and read


    1、 Pictures and picture tags written to tfrecords1. Create file storage writer = tf.io.TFRecordWriter(‘./data/tfrecords/cifar.tfrecords’) 2. The for loop stores the read data in the export example into tfrecords #Each batch stores ten picture data for i in range(10) image=image_batch[i].eval().tostring() lable=label_batch[i].eval()[0] tf.train.Example( features=tf.train.Features( feature={ ‘image’:tf.train.Feature(bytes_list=tf.train.BytesList(value=[image])), “label”:tf.train.Feature(int64_list=tf.train.Int64List(value=[label])) })) writer.write(example.SerializeToString()) writer.close() 2、 Read tfrecords1. Build file queue queue_list=tf.train.string_input_producer([‘./data/tfrecords/cifar.tfrecords’]) […]

  • Using nodejs to develop its own map bed application


    preface In this paper, the author’s main replynodeJSThrough an online actual combat case to summarizenodeEcological common technology points and best practices. After that, it will take about a month to output 3 articles focusing on actual combatnodeJsProject, this article is the first one, mainly introduces how to usenodeJsDevelop a map bed application. This project is […]

  • Lazy loading and preloading — Web Image Optimization


    1、 Lazy loading of pictures 1. Concept Lazy loading, also known as delayed loading, refers to the delayed loading of images in long web pages, which is a good way to optimize the performance of web pages. ==Images outside the visual area will not be loaded until the user scrolls to them = =. In […]

  • WPF: (5-2) photo viewerdemo image library query edit


    Source project address: https://github.com/Microsoft/…The following is a brief description of the example, and gives the actual operation effect and key code analysis: Photo viewerdemo image information finder The main functions are as follows:1. Automatically load pictures or thumbnails according to the selected directory, and display the element information of the selected pictures2 select the picture […]