Tag:Number of articles

  • Mongoose The difference between save() / update() / findoneandupdate()

    Time:2022-5-6

    Advertising mongoose Chinese document translation recruitmenthttps://github.com/ssshooter/… . save() and update() Update is more efficient than save () after find, because it doesn’t need to read the whole document. Mongoose update is mongodb update, but mongoose save may be mongodb insert or update. As for save, mongoose will automatically diff the new document and only change […]

  • Mongoose operation notes

    Time:2022-4-21

    Using node JS, mongodb is often matched with it. Generally, we don’t write the native Mongo syntax. A commonly used Mongo library is mongoose. Because of my poor memory, I forget it after using it. Therefore, I record the commonly used addition, deletion, modification and query APIs Install mongodb Installation documentation:Mongodb installationI am a Mac […]

  • Method of realizing paging in JS front end

    Time:2022-4-17

    Using JS to realize the front-end pagination page number management can distinguish the page number display beautifully (this is also the pagination page display of most websites). It can have a good user experience. It is also written when there is a business need. It is still a novice and inexperienced. Welcome to point out […]

  • A very practical PHP database PDO operation class (curd operation class)

    Time:2022-3-7

    Operation file db.class.php <?php class DB_API { //Database table name protected $table; //Database primary key protected $primary = ‘id’; //Table prefix protected $prefix = ”; //Conditions after where and order assembly private $filter = array(); // PDO private $pdo; // PDOStatement private $Statement; //PDO linked database public function __construct($config){ class_exists(‘PDO’) or exit(“not found PDO”); try{ […]

  • Handwriting a simple Vue pager (1)

    Time:2022-2-20

    Let’s see the effect first Snipaste_2021-06-04_10-12-54.png Style analysis A pager first needs the previous page, the next page, the middle page number, and the total number of data The current page is highlighted, and there are buttons that cannot be clicked and buttons that can be clicked Static style pageination vue <template> <div> < button […]

  • Development and construction of foreign marriage and love website platform Chapter 11

    Time:2022-2-14

    ​This is the eleventh part of the development and construction of foreign marriage and love finding object website platform. It is also the background part. It is the same as the previous one. First take a screenshot first, so that you can know the functions you want to achieve more clearly. I hope it can […]

  • How to implement a mybaits paging plug-in

    Time:2022-2-1

    preface: Paging is often used in Java Web projects. Taking the commonly used persistence layer framework mybatis as an example, it does not provide the relevant interface of the original physical paging function. However, mybaits provides the corresponding plug-in function, which can facilitate us to make some corresponding extensions. Here, our database is selected as […]

  • 30 classes of custom ORM for handwritten spring core principles (Part 1) (6)

    Time:2022-1-16

    This article is excerpted from spring 5 core principles 1. Overview of implementation ideas 1.1 start with resultset When it comes to resultset, the “little partner” with java development experience is naturally the most familiar, but I believe it is also the “most familiar stranger” for most people. Everyone can get values from resultset, such […]

  • Java reads the contents of large files to elasticsearch analysis (teach you how to handle large CSV files in Java)

    Time:2022-1-15

    Now you need to quickly analyze a 2G CSV file; Based on the acquired knowledge, use java to read files by line and import data into elasticsearch in batches, Then use es powerful aggregation ability to analyze data, and finish it in an hour! package com.example.demo; import com.alibaba.fastjson.JSON; import com.example.demo.entity.Entity; import org.apache.commons.io.FileUtils; import org.apache.commons.io.LineIterator; import […]

  • semantic-ui angularjs pagination

    Time:2021-12-26

    <!DOCTYPE html> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>angular-semantic-pagination</title> <script></script> <script></script> <link href=”http://cdn.bootcss.com/semantic-ui/0.16.1/css/semantic.css” rel=”stylesheet” /> <script></script> <script> window.data = []; for (var i = 0; i < 300; i++) { data.push({ id: i, name: “item” + i, description: “description” + i, }); } </script> </head> <body data-ng-app=”app”> <table class=”ui table segment” data-ng-controller=”appController”> <thead> […]

  • EJS receives back-end data to realize local paging

    Time:2021-11-25

    Back end data var arr=[]; for(let i=0;i<77;i++){ arr.push({ index:i+1, head: ‘<h3>ccccccccc</h3>’, content: ‘<div>qqqqqqqq,qqqqqqqqqvvvvvvvv<p>cccccc,,cccccc</p></div>’ }) } router.get(‘/’, function(req, res, next) { res.render(‘index’, { News: JSON. Stringify (ARR), // the key is to convert strings }); }); Front desk HTML <div id=”content”> <% var newslist=JSON.parse(news);newslist.forEach(function(item,key){%> <%if(key<=9){%> <div style=”margin-bottom: 10px;”> <%- item.index%> <%-item.head%> <%- item.content%> </div> <%}%> <%})%> […]

  • Create a general, configurable and multi handle data reporting SDK

    Time:2021-11-12

    An app generally has many scenarios to upload data generated in the app, such as APM, buried point statistics, developer defined data, etc. So this article will talk about how to design a general, configurable and multi handle data reporting SDK. Pre description Because this article and APM are sister articles, there are some things […]