Posts by RodrigoBorth • 4,475 points
58 posts
-
0
votes0
answers15
viewsQ: "Error enabling offline persistence" with angular and firebase during execution
I’m trying to convert a project to universal angular. When executing the command npm run dev:ssr it builds normally and shows the message Compiled successfully. ** Angular Universal Live Development…
-
11
votes4
answers277
viewsQ: How do the objects created following Singleton work?
I would like to understand how objects created work by following the Pattern Singleton javascript design. My main doubts refer to the methods and attributes of this object, where and how to create…
-
4
votes11
answers97880
viewsA: Center image vertically within a div
The simplest way I know and I’m sure it doesn’t fail is this #container { position: relative; width: 200px; height: 200px; } #container img { position: absolute; left: 0; right: 0; top: 0; bottom:…
-
1
votes5
answers409
viewsA: Today (06/30/2015) we will have a second more, what could be the consequences for our systems?
This extra second can cause several problems in the systems we develop and use, from a simple exception until the system is completely out of the air. This is because most systems are not prepared…
-
2
votes2
answers86
viewsQ: How to create custom ordering?
I’m looking for a way to create a custom computer. Let’s say I have the following: var array = [ 1=>'A', 2=>'B', 3=>'C', 4=>'D', 5=>'E', 6=>'F', ] Now instead of ordering by the…
logicasked RodrigoBorth 4,475 -
0
votes3
answers919
viewsA: String Suffix and Prefix. Take a piece that serves both
I don’t know how it looks in C#,but I’ll give you the answer in with logic and you can apply it in your case. var String = "abbabba"; var len = String.length; //Aqui você terá o tamanho da sua…
c#answered RodrigoBorth 4,475 -
3
votes12
answers5446
viewsA: How to remove accent in upload with php?
In that question, the alternative below was the most efficient, I believe the case is quite similar. function replaceChar($str){ $str = preg_replace('/[áàãâä]/ui', 'a', $str); $str =…
phpanswered RodrigoBorth 4,475 -
2
votes2
answers637
viewsA: Problem with table width
First, you shouldn’t use two tables to do this. Use one <thead></thead> to make the table header. And place the elements inside the first <tr></tr> within tags…
-
4
votes2
answers962
viewsQ: What is the difference between Encoding, Encryption and Hashing?
I’d like to understand the difference between Encoding, Encryption and Hashing and also examples of when using one or the other.
-
3
votes1
answer524
viewsQ: Call function without needing to instantiate the plugin again
I’m doing a drag and drop plugin with a colleague, but we’re having a problem. When we instantiate the plugin it runs normally, but if we want to call some function of this plugin in the variable in…
-
10
votes1
answer747
viewsQ: Why does Codeigniter do so well in benchmarks even if it doesn’t follow the language standards?
I see many people spitting on Codeigniter, saying that it is a framework junk that refuses to follow the "language patterns". But I find it strange to say this of the framework that has the best…
-
16
votes2
answers683
viewsA: What is the Declare keyword in PHP for?
Well, in the PHP manual we have The declare statement is used to define execution directives for a code block. Below is the following sentence The Directive section allows the behavior of the…
phpanswered RodrigoBorth 4,475 -
11
votes3
answers828
viewsQ: How do I generate a hash in the client-side?
I’m researching ways to create a login system with a secure encryption that doesn’t weigh down the server. Taking as an example that answer I am searching for a way to make client-side encryption,…
-
0
votes3
answers199
viewsQ: How to capture the result of an execution of doctrine2?
I am implementing Doctrine in a project, but I have a question about inserting, updating and removing data. When I run the following command for example: $companyName =…
-
12
votes1
answer7882
viewsQ: What are . phtml files and when should I use them?
Until recently, I had never heard of phtml, but recently I see that it is being used a lot, mainly by some frameworks (such as Zend2). Since I can normally put html content inside a file .php, I…
-
1
votes1
answer275
viewsQ: ORM Mapping error in Doctrine 2
I’m mapping the database with Doctrine and I’m having a problem. When I use the Annotations as follows it works perfectly: /** * @Entity *…
-
1
votes0
answers371
viewsQ: How do I use Doctrine’s Entity Generator?
I’m trying to use Doctrine on a project. however I am having difficulty in being able to use Entity Generator once the database is ready and would like Doctrine to create the entities from it.…
-
0
votes1
answer551
viewsQ: Select products in a certain range of discounted values?
I’m trying to make a value filter for a virtual store, I have a product table, a stock and another for promotions. products CREATE TABLE `produtos` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `codigo`…
-
2
votes3
answers10308
viewsA: How to calculate direct treasure custody fee
After several attempts and a lot of research, I came to a conclusion: It is impossible to reduce this to a single formula in excel. What to do then? To make your life easier, I suggest you leave the…
-
2
votes1
answer40
viewsA: Problems with . htaccess on Lampstack
Well, as it is with a specific server it is difficult to specify the problem, in a quick search on the web I found a similar case and the solution was the following Create a file called rewrite.conf…
htaccessanswered RodrigoBorth 4,475 -
51
votes3
answers3927
viewsQ: What is the difference between $(this) and $this and this?
I’ve always used the $(this) independent of the situation and always worked. Rarely have I had to use one of the others and on those occasions I did it for someone’s guidance and not for knowing…
-
8
votes2
answers2526
viewsQ: What is [QSA] and similar for in Rewriterule?
I have as an example the following RewriteRule ^(Home)?/?$ page/php/Home.php [NC,L] I know that the NC is Non-Case(Não diferencia maiúsculas e minusculas). L means that if a RewriteRule is true he…
-
7
votes4
answers1550
viewsQ: How to make an external login authentication?
I need to develop a system to be used by the user. The user will be registered in another system, where we will have the registration, contracted plans and financial control of the same... The idea…
-
33
votes2
answers1168
viewsQ: What defines a clean code?
I saw this term being employed several times, many people and companies want their codes to be "clean"... I also saw the book Clean Code Agile Software Practical Skills. But I wanted to know what…
-
8
votes1
answer10339
viewsQ: How does Rewritebase work on . htaccess?
I’ve always used the .htaccess for url's amigáveis no php, but recently when passing to a company X server, the . htaccess that always worked didn’t work on that server.... After researching I found…
-
13
votes3
answers317
viewsQ: What are the most common problems and dangers when enabling `register_globals` in php?
I recently asked the following question How the file receives the $_POST? Based on the comments and the answer I was interested to know the main problems and dangers of having this function enabled…
-
7
votes2
answers142
viewsQ: How does the file receive the $_POST?
Good morning guys, I have to do a maintenance on an old form and I’m trying to understand how it works... Below the form_proposta.php file <? $msg = "Mais informações de imóvel enviado em " .…
-
4
votes2
answers1410
viewsQ: How to effectively test and locate application security holes?
I am facing a serious problem with hackers and/ or crackers on the site developed for a city hall. I did tests with SQL MAP on every page of the website. I tested the ftp lock, searched for injected…
-
0
votes3
answers259
viewsA: Fix SRC Urls by HTACCESS
My recommendation is that you always specify the absolute path of the file, since PHP interprets based on the server path and the src and href in relation to the browser path... in such cases you…
-
6
votes4
answers34147
viewsA: SMTP connection error when sending email using Phpmailer
EDIT: Awaiting OP return after chat chat First the gmail port is 465 and not 587 To use PHP Mailer with gmail you must do it this way $mail= new PHPMailer; $mail->IsSMTP(); // Ativar SMTP…
-
62
votes3
answers12262
viewsA: What is the difference between architecture and software engineering?
Have you heard that Architecture of software is a concept used by Engineering of software? Well, basically that is, the software architecture is nothing more than a concept used by Engineering…
-
19
votes6
answers2856
viewsQ: Can not use "{ }" IF keys in PHP cause problems?
Usually for checks that modify only one line I have avoided the use of keys, because PHP accepts this method, but I rarely see codes from other programmers like this... Examples My method…
-
4
votes1
answer8146
viewsQ: How to create a mysql Trigger to take stock?
First I will present the database structure: Order table: id cliente data status Table Items: id produto tamanho = Estoque.id quantidade pedido = Pedidos.id Stock Table id tamanho quantidade chave =…
mysqlasked RodrigoBorth 4,475 -
1
votes2
answers918
viewsA: How to change the way php errors are displayed?
To do this you must install Xdebug. As it is full of dependencies we have to install some things first Step 1: Install the PEAR apt-get install php-Pear Step 2: Install PHP5-DEV apt-get install…
phpanswered RodrigoBorth 4,475 -
1
votes2
answers918
viewsQ: How to change the way php errors are displayed?
Since I formatted the server I can no longer change the way errors were displayed. Today errors are presented as follows and I would like it to be shown as in WAMP My php.ini file is configured as…
phpasked RodrigoBorth 4,475 -
1
votes2
answers949
viewsA: Return of the paid stopped being received suddenly
I found the problem, and a few more recommendations... 1 - Do not just set in the pagseguro the return url, the moment you send to the pagseguro the purchase you must set the return url too…
phpanswered RodrigoBorth 4,475 -
3
votes2
answers949
viewsQ: Return of the paid stopped being received suddenly
I have a problem on a site that I made a little while ago, in the first days, when a customer made a payment on Pagseguro I received the return normally with the updates of the purchase status,…
phpasked RodrigoBorth 4,475 -
0
votes1
answer814
viewsQ: Using template engine or working with pure PHP?
Currently here in the company we use the Smarty template engine, but it is difficult to find someone who knows how to work with it. I would like to know the pros and cons of using a template engine…
phpasked RodrigoBorth 4,475 -
1
votes1
answer274
viewsQ: how to pass an array with N arguments to a bind_param within a class?
I’m trying to develop a global class for pagination Follow the code: class Pager { private $Sql; private $Limit; private $ArgType; private $Page; private $Arguments; private $ArgNumber; private…
phpasked RodrigoBorth 4,475 -
0
votes2
answers1196
viewsQ: How to make an Animate up to the mouse position and after starting to follow the mouse?
I have the following code $(document).ready(function(){ var LeftInicial = $('.MarcadorMenu').css('left'); var WidthInicial = $('.MarcadorMenu').css('width'); $('.CorpoMenuHead').hover(function(){…
-
6
votes1
answer3804
viewsQ: How to select categories and count the number of products in each category?
I am trying to select the categories of the database and count in the same query the number of products registered in that category. So far so good, the problem is that I can not return to the…
-
1
votes2
answers384
viewsA: How to resolve problems in HTML file calling?
I solved this problem by creating a variable that stores the Project Directory, I do this by comparing the server path with the url and saving the similar folders, after that I just put the variable…
-
3
votes1
answer2633
viewsQ: It is possible to deny access to the directory and allow access to the file with . htaccess? how?
I’m trying to make one. htaccess to the user-friendly url’s but would like to make sure that people can’t see my directories and at the same time that the scripts can access the files... it is…
apacheasked RodrigoBorth 4,475 -
1
votes2
answers384
viewsQ: How to resolve problems in HTML file calling?
I have a folder structure where I have the following architecture page php arquivos.php tpl arquivos.tpl(html) style arquivos.css But I have a problem calling the files on the homework... when I use…
-
2
votes1
answer118
viewsQ: Mysql event to block user with x denunciations
I have a table of complaints where I record the information of users who reported and who they reported id | user | denunciado 1 | userx | userY 2 | userz | userY and so on, now I would like to do a…
-
2
votes3
answers261
viewsA: Capture click with Jquery and add css
You can do this in many ways one of them is of the form below: ineffective: $(document).ready(function(){ $( ".divTitulo" ).click(function() { $(".ulDisplayNone").toggle(); }); }) Slide-effect:…
-
1
votes4
answers9544
viewsQ: How to display parts of a page only after loading the entire content of the site?
I wanted to know how to make a JS, to display the content of certain parts of a site, just after all the content has been loaded, this includes, JS, Images, CSS and Some external data like the…
javascriptasked RodrigoBorth 4,475 -
7
votes4
answers515
viewsA: Error with simple calculation in javascript
You are by default the javascript concatenated, because in val() it takes a string, to perform the sum you need to convert to numbers, which can be float(numbers with ,) or int(integers only), num1…
javascriptanswered RodrigoBorth 4,475 -
1
votes1
answer153
viewsA: Add elements via Javascript from the database
You can do it otherwise without using the plugin My alternative to this would be to use a div with display None and overflow Hidden and at the time of the click give an Animate at her height...…
-
1
votes2
answers1564
viewsA: CSS/jQuery selector for a table column
The answer from @Miguel Angelo will solve your problem. However, since it is CSS3 http://www.w3schools.com/cssref/sel_nth-child.asp You will not be able to use in old browsers. You could use a class…