Tag Archives:

Easygbs runs with an error of too many open files and cannot play the video stream. How to adjust?

Easygbs, the national standard gb28181 protocol video intelligent analysis platform developed by tsingsee Qingxi video, is compatible with the content processing of four modules: acquisition, storage, display and alarm, and can provide video capability support for the construction of big data platform. Easygbs does not depend on a specific big data platform. It can flexibly access different big data platforms and support the third-party system to consume data directly from the message queue for further secondary system development.

Some users may get stuck or cannot play when using easygbs. This situation is mostly due to the problem of setting. After adjustment, this problem can be avoided. Of course, different problems need to be investigated according to the actual situation, and the solutions are also different. Some users have too many open files when easygbs is running, which makes the live video stream unable to play. In this article, we share the solution to this problem.

Actually, this problem is caused by the Linux system. You can use ulimit – A to check the number of open files:

If the program needs to use more, you need to enter the temporary command (root permission) ulimit – N quantity (10240)

After checking, you will find that the open files has increased from 1024 to 10240. Restart the easygbs service again to find that the video stream is playing normally, and the too many open files error will not be reported.


How to solve the infinite loop of react. Useeffect()?

It can be solved by dependency

Infinite loops can be fixed by properly managing useeffect (callback, dependencies) dependency parameters.

Because we want count to increase when the value changes, we can simply use value as a dependency for side effects.

import { useEffect, useState } from 'react';

function CountInputChanges() {
  const [value, setValue] = useState('');
  const [count, setCount] = useState(-1);

 useEffect(() => setCount(count + 1), [value]);
  const onChange = ({ target }) => setValue(target.value);

  return (
 <input type="text" value={value} onChange={onChange} />
 <div>Number of changes: {count}</div>

Add [value] as the dependency of useeffect , so that the count status variable will be updated only when [value] changes. This solves the infinite loop.

What if Maven warehouse has a jar package or reports an error?

This usually occurs when jars cannot be downloaded automatically

1、 Download other files outside the jar package and put them in the corresponding path of the warehouse:


Click View all to download other files and put them in the warehouse


2、 In this way, the corresponding jar package files of the warehouse will be complete. If the error is still reported, please check whether one is missing_Remote.repositories file


No, just copy one under another jar file and modify it accordingly: fastdfs-client-java-1.27-release corresponds to your jar package name

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Sat Dec 22 16:08:05 CST 2018

maven21047; <23601;

How to deal with the prompt “dereferencing type punned pointer will break strict aliasing rules” when compiling C?

It’s about 35814; it’s about static writing and final writing! >>

1. For example:

char my_array[10];

*(int *)my_array = 0xaabbccdd;

2. Amendment is the most serious problem:

char my_array[10];

int tmp =0xaabbccdd;

memcpy(my_array, & tmp, sizeof(tmp));

What happened to CodeIgniter disallowed key characters?

Explain the function of static keyword and final keyword in Java in detail>>>

I believe that many people encounter the problem of disallowed key characters, even when visiting CSDN, because the part of the web page of CSDN is written in CI, the problem lies in the class of CI processing submission string. Even if it’s just a domain name. There are no special characters. The problem is still with us. Why

This is related to the design of the string processing class of CI. It is like this: the strings submitted through the get and post methods are handled by the system/core/input.php class. Many people ask why such an error is reported when there is no special symbol in the URL, because you omit the string transmitted by cookie and session, In other words, the data of get, post, cookie and session are all processed by this class, and the problems often appear on the cookie and session. Therefore, many people on the Internet provide the method of clearing the cache and cookie, which is really no problem, but there are problems again after a period of time, Because the newly generated cookie contains strings that are not matched, how can we solve this problem

Since the problem occurs in the input. PHP class, just modify it_ clean_ input_ Keys method

function_ clean_ input_ keys($str)


if(! preg_ match(“/^[a-z0-9:_\/-]+$/ i”,$str))







$str=$this-> uni-> clean_ string($str);




Change to:

function_ clean_ input_ keys($str)


/*if(! preg_ match(“/^[a-z0-9:_\/-]+$/ i”,$str))




$config=& get_ config(‘config’);

if(! emptyempty($config[‘permitted_ uri_ chars’]))


if(! preg_ match(“/^[“.$config[‘permitted_ uri_ chars’].”]+$/i”,rawurlencode($str)))








$str=$this-> uni-> clean_ string($str);




Then add the following in config/config.php:

$config[‘permitted_ uri_ chars’]=’a-z0-9~%.:_\-‘;

Change to:

$config[‘permitted_ uri_ chars’]=”;

That’s it

Since then, the problem has been solved, and those who don’t understand can understand the above code, hoping to help

GitHub prompts permission denied (public key). How can I solve this problem?

Why are there a series of technical challenges behind “OMG buy it”>>>

$ git clone [email protected]:gogo/protobuf.git
Cloning into 'protobuf'...
The authenticity of host 'github.com (' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?yes
Warning: Permanently added 'github.com,' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The settings SSH and GPG keys new SSH key in GitHub are shown in the figure below

Go back to the machine terminal where you need to download the source code

Type in the command and return all the way

#ssh-keygen -t rsa

Then go to the/root /. SSH/directory

Take out the public key, copy and paste it into the key in GitHub, and then save it

#cat id_ rsa.pub

Test, success

#ssh -T [email protected]
Hi kylePan! You’ve successfully authenticated, but GitHub does not provide shell access.

My command is as follows

[[email protected]_171_105_centos src]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
c8:b9:17:bf:e7:9b:8b:ba:9f:e1:23:0d:1c:6a:64:45 [email protected]_171_105_centos
The key's randomart image is:
+--[ RSA 2048]----+
|       .E        |
|        .        |
|       .         |
|     .oo.        |
|     o+oS.       |
|      o.oo       |
|     .. .oo      |
|       ...o=..   |
|        o=*+=o   |
[[email protected]_171_105_centos src]# ssh -T [email protected]
Permission denied (publickey).
[[email protected]_171_105_centos src]# cd /root/.ssh/
[[email protected]_171_105_centos .ssh]# ls
authorized_keys  id_rsa  id_rsa.pub  known_hosts
[[email protected]_171_105_centos .ssh]# cat id_rsa.pub 
ssh-rsa AAAAB3AAABIwAAAQEAzVPno/Cm5ApGGMP8YjituJGegOCq7TVKVECehWog9hTfC0Z5PMsf5OWkWvUZ85nFJBuwhMszxkjFSd7e6INYJ42WfGKxPXm7ZoOQxkBZAetUUaNvDhCKZCdLNHWGde8gaX84i39JKWgwYrzX9Y1T+bDI1cJiUuNN6Xr8x4ZkMm4e+LugYtVSKGZKz7zLcp1mXQszh9mWM08/yyRq/CdTEly1ghojUDUNFTzyk6VQz/rzMFoiVuwbYlQasqdR4xIzvnIjfBrtSP4z+qdD+wZFvSABnFClXH0nJEaaKX9EdJpi2ezvLvAblDg371J
[[email protected]_171_105_centos .ssh]# ssh -T [email protected]
Hi kylePan! You've successfully authenticated, but GitHub does not provide shell access.

Attributeerror: module ‘sys’ has no attribute’ setdefaultencoding ‘solution?

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

module ‘sys’ has no attribute’ setdefaultencoding ‘solution

Reference article:

(1) Attributeerror: module ‘sys’ has no attribute’ setdefaultencoding ‘solution

(2) https://www.cnblogs.com/testyao/p/5658354.html

Let’s make a note.

What are the recommendations for pdf editor? Try this convenient and easy to use editing software

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

Do you have any suggestions about pdf editor?Xiaobian thinks that everyone can try this convenient and easy-to-use editing software. When they are studying and working on weekdays, are they worried that they can’t edit PDF files when they use PDF files to view them?

In fact, if you want to view and edit PDF files, Xiaobian recommends a PDF Editor for you. This editing software is convenient and easy to use, friends can try oh“ The “quick PDF Editor” can operate the PDF file as a whole, such as merging, segmentation, compression, watermark, encryption, etc; In addition, you can also change the original PDF Text, re edit the original, typeset, add new graphics, shapes, links, notes, stamps, music, etc.

Having said that, are you looking forward to this PDF Editor?Next, let’s talk about the advantages of this pdf editor.

Clean interface

The color of the software page is mainly composed of black, gray, white and blue, and the color matching is simple and generous.

Clear picture

For different resolutions, the display effect is optimized.

Freedom of proportion

Support PDF file display scale adjustment.

Simple operation and higher efficiency. Click the corresponding function button, you can use the corresponding function in the PDF page, the interface layout is easy to understand, and the page operation is simple and efficient.

Content editing

Pdf files can be operated as a whole, such as merging, segmentation, compression, watermarking, encryption and so on. In addition, you can also change the original content of the PDF file, re edit the original content, typesetting, add new graphics, shapes, links, notes, stamps, music, etc.

Do you have any suggestions about pdf editor?Xiaobian thinks that everyone can try this convenient and easy-to-use editing software. After reading the above content, have you been planted by “quick PDF Editor”?This convenient and easy-to-use pdf editor has more functions, just waiting for the friends to explore and understand.

What’s the difference between die() and exit() in PHP?

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

What is the difference between die() and exit() functions in PHP

I think the two have the same function, but I wonder if there are some differences between the two… What is this

#1st floor

As mentioned earlier, the two commands produce the same parser token


One small difference is how long it takes for the parser to return the token

I haven’t studied the PHP parser yet, but if it’s a long string of functions that start with “d” and a short string of functions that start with “e”, it’s going to take some time to find the function name of the function that starts with “.” e “. There may be other differences due to the way the entire function name is checked

I doubt it will be measurable unless you have a “perfect” environment dedicated to parsing PHP and many requests with different parameters. But there must be a difference. After all, PHP is an interpretive language

#2nd floor

There’s no difference – they’re the same

PHP Exit Manual:

Note: this language construction is equivalent to die()

PHP die Manual:

This language construction is equivalent to exit()

#3rd floor

They are essentially the same, although there are other suggestions in this paper

#4th floor

They sound similar, but exit () also allows you to set the exit code for the PHP script

Usually, you don’t actually need this script, but when writing a console PHP script, you may need to check with bash that the script does everything in the right way

You can then use exit () and capture later. Die() is not supported

Die() always exists as code 0. So essentially, the die() command does the following:

echo "I am going to die";

Same as the following:

die("I am going to die");

#5th floor

Mold in PHP manual:

Die – equivalent to exit

You can even die and exit same - with or without brackets

The only advantage of choosing die() instead of exit() may be that it saves time typing extra letters; -)