• Using rust to write the actual combat of streaming media server — RTMP chunk stepping on the pit record


    Using rust to write the actual combat of streaming media server — RTMP chunk stepping on the pit record In recent months, I’ve stopped working and focused on a new open source project, a streaming media service written in trustxiu。In the process of implementation, I stepped on many pits. Today, let’s talk about the chunk […]

  • Java object-oriented static keyword


    Static keyword explanation   Java static keyword: Static methods can be called directly in the current class or through “class name. Method name” Non static methods need to be called by instantiating objects Non static methods can call static methods example: package oop.demo11; /** *Static keyword explanation *Static methods can be called directly in the […]

  • Location object and history object in BOM


    Location object The location object is an attribute under the window object. You can omit the window object when using it Location can obtain or set the URL of the browsing address bar var btn = document.getElementById(“btn”); var txt = document.getElementById(“‘txt”); btn.onclick = function(){ //Output URL address txt.innerHTML = location.href; //Re assignment, you can jump […]

  • Enter a mathematical formula in markdown (mathjax)


    Enter a mathematical formula in markdown (mathjax) 1 basic grammar 1.1 presentation location Latex formula in the text$…$definition Statement is$\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$ Show $\ sum in current line_{ i=0}^N\int_{ a}^{b}g(t,i)\text{d}t$ For latex formula with separate display$$…$$Definition, the formula is centered and zoomed in Statement is$$\sum_{i=0}N\int_{a}{b}g(t,i)\text{d}t$$ Display as $$ \sum_{i=0}N\int_{a}{b}g(t,i)\text{d}t $$ The following description statements are omitted unless […]

  • Letter and symbol before golang import package


    Letter and symbol before golang import package prefix explain example cb Alias of the package to be referenced later (conflict prevention) cb “github.com/hyperledger/fabric/protos/common” _ Only call the init function in the package. Cannot call another function in the package. _ “github.com/hyperledger/fabric/protos/common” . You can omit the package name when calling a function This work adoptsCC […]

  • CSS realizes “expand and collapse” of multi line text


    Multi line text expansion and collapse is a very common interaction, as shown in the following figure The main difficulties in realizing this kind of layout and interaction are as follows Expand and collapse button in the lower right corner of multiline text Switching between “expand” and “stow” When the text does not exceed the […]

  • PHP filters null values in arrays


    array_ The filter () function filters the values in the array according to the callback function. If the callback function is omitted, the null value is filtered by default. Syntax: array_filter( array[, function] )example: $array = [ ‘IMIS project’, ”, ‘July 6, 2021’, ”, ”, ‘filter null values’ ]; //Output filtering results print_r(array_filter($array)); Array( ‘IMIS […]

  • Order by field of MySQL


    Series articles: Order by field of MySQL Using MySQL When we do business, we cannot avoid the sorting function. Sorting is generally usedMySQLYesORDER BYTo achieve.Order by syntax: SELECT column1, column2,… FROM tbl ORDER BY column1 [ASC|DESC], column2 [ASC|DESC],… Our usual implementations are: –ID is in ascending order. In this case, ASC can be omitted select […]

  • Accelerate laravel with swoole (in a formal environment)


    1. Where is the speed bottleneck of laravel? 1.1 some existing optimization methods 1.1.1 laavel officially provides some optimization methods to optimize laavel php artisan optimize php artisan config:cache php artisan route:cache 1.1.2 using opcache acceleration, PHP is an interpreted language. When executing, you must first read the program and compile it into opcode by […]

  • Android serialization 36 – query data, use of native SQL and use of transactions


    1、 Query data Android’s query database operation is very complex. Sqlitedatabase uses the query method to find data, which contains many parameters. Let’s take a look Query() method parameters Corresponding SQL part describe table from table_name Table name colums select colum1,colum2 Column name to query selection where column = value constraint condition selectionArgs – Provide […]

  • Eureka error resolution


    Eureka error resolution The security.basic.enabled configuration is obsolete or unavailable By default:User name: userPassword: the startup application will output in the console, as shown in the following figure: It can also be configured through the following properties:spring.security.user.namespring.security.user.passwordIf you want to turn off validation: Simple and crude method:Move the security package out of POM. XMLMore scientific:Add […]

  • The springboot get request receives a date type parameter


    The front-end transfers the time directly. If the back-end receives the parameter directly without processing, an exception will appear. Use the annotation @ datetimeformat to solve the problem problem @RequestMapping(value=”/fetch” , method=RequestMethod.GET) public @ResponseBody String fetchResult(@RequestParam(“from”) Date fromDate) { //Content goes here } Treatment method @RequestMapping(value=”/fetch” , method=RequestMethod.GET) public @ResponseBody String fetchResult(@RequestParam(“from”) @DateTimeFormat(pattern=”yyyy-MM-dd”) Date fromDate) […]