Posts by LeonanCarvalho • 3,527 points
43 posts
-
3
votes4
answers696
viewsA: How to create hexadecimal colors randomly?
In the detail of the question is asked a solution in PHP, but usually PHP runs in web environments, starting from that pre-supposed you do not necessarily need to run it in PHP. In certain cases we…
-
2
votes1
answer1568
viewsA: Docker - Mysql + PHP error when connecting with mysql
Your mysql will not be accessible via localhost (127.0.0.1) because it is in another container, this container acts as a stand-alone isolation of services, environment and network. There are 2 ways…
-
1
votes3
answers1020
viewsA: How to send data from a form received from an ng-repeat with Angularjs
To submit a form post you must use the service $http or $Resources ngResource module, the latter which is a bit more advanced and also does http requests. You must implement your "moviments" in a…
-
15
votes2
answers2129
viewsQ: What does the "|=" operator mean in Python?
I was analyzing a code and came across the operator |=, would like to know what this means, and what is its practical application. Example: x |= y…
-
2
votes3
answers709
viewsQ: How to capture repetitions of a given group with regex?
I’m trying to capture a certain structured data, and I need it to capture a certain group as long as there are possibilities. The data format is as follows: foo01@chave1|valor1#chaveN|valorN Where…
regexasked LeonanCarvalho 3,527 -
44
votes1
answer19287
viewsA: How does PHP-FPM work?
PHP-FPM is a process manager to manage Fastcgi SAPI (Server API) in PHP. PHP-FPM is a service and not a module. This service runs completely idependent from the web server in a separate process and…
-
1
votes1
answer2870
viewsA: Better PHP-FPM configuration for 4gb ram?
php-fpm separates php processes into subprocesses, each of which is responsible for processing one php request at a time. Using a maximum process value php-fpm children is possible to know the…
-
2
votes1
answer324
viewsQ: How to expose UDP ports in the Docker-Compose configuration file?
I have the following file docker-compose.yml and would like to expose some of the doors as UDP. version: "3.0" services: myservice: image: "my/service" ports: - "40061:4061" - "40062:4062" -…
-
2
votes0
answers71
viewsQ: How does the database version align with the PHP application?
Work on a project that system versions are incremented manually on semantic model, usually after a sprint a new version is released when a work is merged with the main branch and passes through the…
-
5
votes3
answers10675
viewsA: What are Path Parameters in a URI?
The only way to interpret what is in an RFC is to go back to it and look for the specific definition by searching within its typology the meanings for each of the elements. Note section 3.3, which…
urianswered LeonanCarvalho 3,527 -
12
votes1
answer1203
viewsA: What is an opaque value?
In computer science, the concept of opaque is known in 2 moments, in the type of opaque data and in the opaque pointers. In RFC 3986 the term Opaque is cited 5 times within a phraseal context: 1:…
-
3
votes3
answers554
viewsA: Extract Array Data in Javascript
When giving a Return inside a for, it implicitly applies a break then its repeating structure described above will stop at the first interaction. It is very common to use this if you are looking for…
-
7
votes1
answer4713
viewsQ: What’s the practical difference between a git merge and a git pull?
In day-to-day developing I always use git pull to take the changes from the main branch, where the parallel developments are merged. But some Ides like Netbeans, implement the "git merge -ff origin…
gitasked LeonanCarvalho 3,527 -
0
votes1
answer107
viewsQ: Order of evaluation of the alternatives in a regular expression is always taken into account?
I was here developing a function that took a logical string of characters, let’s call "query", this query represents simple expressions separated by ;, expressions can contain any of these…
regexasked LeonanCarvalho 3,527 -
13
votes5
answers60507
viewsA: DISTINCT and GROUP BY, what is the difference between the two statements?
A little shorter answer: Distinct is used to filter unique records of records that meet the query criteria. SELECT DISTINCT cliente FROM Pedidos; The GROUP BYis used to group the data on which the…
-
5
votes3
answers439
viewsA: How to get a similar behavior between the Garbage Collection of a Single-Page Application and a Multiple-Page Application?
Refreshs after some programmable trigger. The big problem with the SPA is that it never actually updates the document, the changes are made in memory in a virtual way. It is common for programmers…
-
1
votes1
answer665
viewsA: Server-to-server Mysql Database Synchronization (VPS)
Mysql has some replication resource however it is necessary to understand the scope of your project to know which fits best. The Mysql Replication allows data from a Mysql database server (the…
-
4
votes2
answers2789
viewsA: Is SOA the same as REST?
If I understand correctly, the purpose of the author of this question is to relate the service to the real world, creating a metaphorical version of how to explain a service. For a technical…
-
4
votes2
answers907
viewsA: What is HTTP Response splitting?
According to the OWASP, the attack HTTP response splitting is a means to an end, not an end in itself - that is, it is a gap used to carry out other types of attack. At its root, the attack is…
-
6
votes3
answers235
viewsA: Why is it not possible to use comparison operators with Nan?
Nan are generated when arithmetic operations have as values: Undefined or unrepresentable. As values, they do not necessarily overflow conditions. Nan also results from the conversion attempt and…
-
9
votes3
answers235
viewsQ: Why is it not possible to use comparison operators with Nan?
Nan - The global property Nan is a special value meaning Not-A-Number (not a number). The curious thing is that it is not possible to perform operations of comparison with this almost mystical…
-
4
votes1
answer871
viewsA: How to instruct your browser to cache my Javascript and CSS via web.config
Static files such as CSS, JS, and even images can be cached on the client’s disk. However, it is important that the web server says that it should cache or not, and for how long. Many web servers…
-
7
votes4
answers147
viewsQ: I cannot use Boundary( b) to validate a word starting with "@"
In the case of / b@MYVAR b/i, I cannot use Boundary, See: https://regex101.com/r/4bFElA/1 I need to validate a string that contains a @MYVAR word (Example). Are there any restrictions on this…
regexasked LeonanCarvalho 3,527 -
3
votes1
answer118
viewsQ: How to create a function that validates if there is a Mysql function in a given string?
I am looking for a function that identifies (return true) if there is a Mysql function in a string. These would be some examples of possibility of input to function. <?php $randomstrings = […
-
6
votes2
answers1794
viewsA: How to Thread a class method
Maybe your question isn’t about threads themselves, but this question will be accessed by people looking for solutions about threads in php. First of all, it is important to understand the…
-
6
votes2
answers1708
viewsA: Get all the information from the file that came from the input file
HTML5 provides a standard format for interaction with local files by specifying the File API (link in English). As an example of its features, the file API can be used to create a thumbnail view of…
-
37
votes3
answers439
viewsQ: How to get a similar behavior between the Garbage Collection of a Single-Page Application and a Multiple-Page Application?
I’ve been doing a lot of research on the web and in stackoverflow communities, and I’m getting to the point of believing that Spas take almost no advantage of the GC algorithm of current browsers.…
-
2
votes1
answer815
viewsA: How to set the maximum disk size of a database?
Each database has its own way of limiting size, or not. MYSQL Mysql does not provide a system to limit the size of the database with Create Database as your example. One of the ways to solve this is…
-
1
votes2
answers937
viewsA: How to solve JSON.parse problem using Ionic and Angularjs
Its JSON format is incorrect, but there is also a large failure point there, if one of these calls to the function json_encode fail within your while loop, your program will generate an inconsistent…
-
8
votes1
answer3396
viewsA: How does authentication with digital certificate work?
Authentication with digital certificate works as follows: The server, with a valid certificate, needs to request a valid certificate based on a Pre-configured root certificate list on your web…
-
2
votes2
answers221
viewsA: Error trying to host app on itunes
Since June 2016, Apple has required apple store apps to support Ipv6-only, which is basically networks that don’t use Ipv4 tunneling or proxy. However, if your app utilizes Ipv4-specific Apis or…
-
1
votes5
answers4689
viewsA: How to change the content of an img src?
With HTML and CSS only, it is not possible to change the image src. If you do not replace the img tag with div tag, then you may be able to change the image that is set as the background as //Apenas…
-
2
votes1
answer1824
viewsA: How to request a digital certificate and use the public key to sign a string?
To apply for the certificate would be this as the extensive answer of that question: /a/195838/7130 About the signature, you have the function openssl_sign however to do it you need to have access…
-
7
votes1
answer2436
viewsA: What is the correct order of the ICP-Brazil certificate chain so that the certificate of an e-CPF and e-CNPJ is requested via TLS Handshake?
After some searches in several sites, I got the expected result. To complete the flow of SSL Handshake, the server needs to tell which certificates are accepted, so the browser will display the…
-
4
votes2
answers3654
viewsA: How to obtain the CPF/CNPJ number of a digital certificate type e-CPF/e-CNPJ on A1 and A3 models?
After obtaining a valid A1 and A3 certificate (and not those of tests that were used to make the question), it was possible to identify that in the field S_DN_CN the certificate contains the name…
-
10
votes2
answers11564
viewsA: Digital Certificate with PHP
In order for the CA certificate to be displayed at the prompt first the card reader must be properly configured and exporting the token certificate to the client’s certificate directory. To know if…
-
2
votes1
answer1850
viewsA: List network printers with PHP
The printer will only appear if it is configured on the server, I don’t know about printers using php alone (maybe some operating system command). As you are using windows, I will consider this…
-
4
votes2
answers3654
viewsQ: How to obtain the CPF/CNPJ number of a digital certificate type e-CPF/e-CNPJ on A1 and A3 models?
I am developing an alternative method to login via certificate, without needing java or a specific language, only http and php to process backend information (but that could be manipulated by any…
-
9
votes1
answer2436
viewsQ: What is the correct order of the ICP-Brazil certificate chain so that the certificate of an e-CPF and e-CNPJ is requested via TLS Handshake?
To authenticate a user using the digital certificate, and to obtain this certificate in the backend it is necessary to enable the "SSL/TSL Handshake" option on the web server with the option to…
-
10
votes3
answers10007
viewsA: A3 Digital Certificate, e-CPF, how to access information with Javascript
The form performed by the Certisign Login button is very limited, only JAVA and . NET are supported. Sites that use this technology are bound to have many problems, because it depends on customer…
-
1
votes1
answer77
viewsA: Problem with tr of table inserted via javascript
When using [type="Submit"] the browser will make a POST request to the URL or URI attribute "action" defined in the tag, if there is no action or form, the click on a [type="Submit"] will execute a…
-
2
votes4
answers536
viewsA: How to share the $Scope variable from one controller to another with parameters in Angularjs
A simple solution is to have a Factory that returns the value you need (an object for example): JS: // Inicializa a aplicação var myApp = angular.module('myApp', []); // Cria a factory para…
-
10
votes1
answer196
viewsA: How do I know when to use each of the execution functions?
In addition to the 3 you mentioned, there is still passthru and the system for path execution. pcntl_exec Creates a separate process from the main process with the executed command, yet allows to…
phpanswered LeonanCarvalho 3,527