Posts by Renan Cavalieri • 2,748 points
64 posts
-
1
votes1
answer71
viewsQ: Is it possible to use Ecmascript 6 without Babel or Webpack?
As in the old days, it would be possible to simply include an Ecmascript 6 file in the browser and use its functionalities without the need to "transpose" these codes?
-
3
votes1
answer55
viewsQ: Is there anything equivalent to Mysql’s "FOR UPDATE" in Sqlite?
As the title itself says, there is something equivalent to FOR UPDATE Mysql in Sqlite? Example: SELECT id FROM minha_tabela WHERE id=1 FOR UPDATE I own a query that uses a unique line lock within a…
-
6
votes1
answer958
viewsQ: How to clear a 301 redirect that has already been stored in the browser cache?
To make it easy to understand the problem, I will call the site that had the redirect "A" and the destination "B" A 301 redirect (instead of 302) was carried out from site A to site B without any…
htaccessasked Renan Cavalieri 2,748 -
4
votes1
answer61
viewsQ: Is it possible to use the DOUBLE data type on 32-bit systems?
The type of data DOUBLE is a 64-bit floating point, but can be used on 32-bit systems without any problem?
-
1
votes1
answer129
viewsQ: How to handle a rendering Exception in WPF (Windows Presentation Framework)
Randomly my system causes this Exception (which I only see because of the logs left in Windows events). It’s an app that runs around 24 hours a day every day. When error occurs, the screen freezes…
-
8
votes4
answers8025
viewsQ: Check if int is "null" in C#
Cannot assign on C# null at an integer value (int, nay int?). However, how can I know if an integer value (int) has not yet had an assigned value (being of the type int)? int? valor; if (valor ==…
-
0
votes2
answers199
viewsA: How to popular a model from a Datareader in C#?
As the LINQ user answered, directly is not possible. However using Aline’s suggestion to use a found ORM, the package "Dapper" and "Dapper.Contrib", which are extremely simple and do not require…
-
6
votes2
answers199
viewsQ: How to popular a model from a Datareader in C#?
I’m sorry I was so ignorant about that question. In PHP there was the possibility of using the "Fetchclass" of PDO that took all the results of a table and threw them in an object of a certain…
-
1
votes1
answer41
viewsQ: Is it possible to instantiate a database connection manually using the Entity Framework?
I would like to manage my connections manually so that users can inform the server address, but Entity creates the connection string directly in the config file, the only way would be to change that…
-
0
votes1
answer93
viewsQ: Which Apache2 Cipher Suite is compatible with Chrome 49 on Windows XP?
I need a website to be accessible on Windows XP using HTTPS, but what I get are Handshake errors. My Apache2 settings are as follows. SSLEngine on SSLProtocol ALL -SSLv2 -SSLv3 SSLHonorCipherOrder…
-
2
votes1
answer722
viewsA: Close modal window when user click anywhere outside modal
The code is correct, just missing assign the event you want to run, which in this case is the "click". Change line 29 of your code in the fiddle: self.$target.on('', function(e) { self.hide(e) });…
-
1
votes1
answer908
viewsQ: How do I test POST requests in "Postman" in places that need to use session authentication?
Postman is the built-in Google Chrome browser app I use to test my POST requests. https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop But the area I want to access is…
-
0
votes2
answers514
viewsA: How to block double character input in "onkeydown" event
I don’t know if this will help you, but if you just need to sanitize (and not prevent being typed), you can use another way to do this. First switch from keydown to keyup, so the function will be…
javascriptanswered Renan Cavalieri 2,748 -
9
votes2
answers662
viewsQ: What is Timing-Attack and where does it apply?
I have received a somewhat interesting reply to this question: What is the possibility of finding a given string of 192 characters in 10 minutes? But I didn’t understand what the timing-Attack.…
security-guardasked Renan Cavalieri 2,748 -
4
votes1
answer156
viewsQ: What is the possibility of finding a particular 192-character string in 10 minutes?
I’m reinforcing an authentication system, where in the password recovery part, I implemented it as follows. The user informs the e-mail address. If it exists, the e-mail is sent (see example below).…
-
0
votes1
answer92
viewsA: Submit only runs once
From the description you gave me in your question, the code is running, but you forgot to show again the Divs you hid. I believe that solves your problem: $(document).ready(function() {…
javascriptanswered Renan Cavalieri 2,748 -
4
votes1
answer39
viewsQ: Do search engines prioritize file names or "alt" attributes in images?
For example, an image named "xicara-de-cafe.jpg" without the attribute alt, has more weight than a file called "5ecaac15bb162ea847e1f4771a214b74.jpg" with the attribute alt="Xícara de café"?…
-
2
votes1
answer46
viewsQ: Compile to a lower platform using the latest API?
I am using Cordova in Visual Studio 2017, and installed the Android SDK (API level 23), but I wonder if when compiling using this API, the application will be compatible with previous versions, such…
-
6
votes4
answers1233
viewsQ: What is the correct order to use the PHP header and ob_start functions?
Before starting the ob_start function(); header('Content-Type: text/html; charset=utf-8'); ob_start(); .... ob_end_flush(); After starting the ob_start function(); ob_start(); header('Content-Type:…
-
4
votes4
answers388
viewsQ: Regex to capture infinite groups in a URL by separating them by the bar
I wonder how I could do a regex to capture several groups as shown in the string below: /Controller/Action/Param1/Param2/Param3/... I want to capture "Controller", "Action", "Param1", "Param2",…
-
14
votes1
answer678
viewsQ: Is . NET Core stable enough for production?
The . NET Core is already stable and reliable to the point of being used in production environments for commercial websites?
-
4
votes3
answers34005
viewsQ: Is there an iOS emulator to test an application developed in Xamarin?
There is nothing like testing on the actual device, but in some cases emulators are extremely necessary. For Android I use Genymotion, but at the moment I need some iOS emulator that so I can test…
-
0
votes1
answer994
viewsA: Error when installing theme in Wordpress
Usually this error occurs because the extension php_curlis disabled on the webserver. To be able to perform the installation, simply activate it, but when performing a quick search, it seems that…
wordpressanswered Renan Cavalieri 2,748 -
3
votes2
answers58
viewsQ: Are there any components that replace Windows Forms Spinedit in WPF?
I prefer open source components, or if possible a form of adaptation, because I did not find any Spinedit or similar in WPF.
-
2
votes1
answer361
viewsQ: WPF using MVVM - Whose responsibility is it to open a new window?
In MVVM we have Views, Viewmodels and Models. All the business logic of my application is in models, where I use the viewModels to manage them, in addition to Binds and commands that are sent from…
-
1
votes1
answer230
viewsQ: Is using an absolute path in a require() function enough to prevent attacks?
The use of the function dirname(__FILE__) or the magic constant __DIR__ is appropriately safe to prevent a local file inclusion or a remote file inclusion in a require() receiving parameters per…
phpasked Renan Cavalieri 2,748 -
2
votes0
answers140
viewsQ: What standard is used to treat SQLSTATE in Pdoexception?
I don’t know if I’m the one who didn’t understand how the SQLSTATE, however in MySQL many errors do not have a SQLSTATE, and when I take the Exception of PDO, the code that is returned to me is the…
phpasked Renan Cavalieri 2,748 -
2
votes1
answer4421
viewsQ: Tag thead pinned at the top and tbody with scroll bar in table in HTML
I want a table with the tag thead fixed at the top and tbody with a scroll vertically, I found some solutions that use only CSS, but use the property display, removing the default behavior from the…
-
0
votes1
answer626
viewsQ: How to pick up errors in AJAX requests?
I need to pick up errors in sending the request and treat them in the application, in summary form the function works this way. https://jsfiddle.net/n1p4k9jb/ I didn’t put the same one that is in my…
javascriptasked Renan Cavalieri 2,748 -
1
votes1
answer99
viewsQ: What is the name and differences between the following ways of working with Javascript objects
I wrote the same code in many ways, but I don’t know how to describe each of them, their correct name and differences. The codes are as follows:: // Código 1 function Pessoa(nome) { this.nome =…
javascriptasked Renan Cavalieri 2,748 -
1
votes2
answers205
viewsQ: Javascript function becomes "Undefined" in addeventlistener
Reformulated question: I’m trying to create a dialog for the user, but I’m having an error described as Uncaught TypeError: Cannot read property 'style' of undefined when I click the button Close…
javascriptasked Renan Cavalieri 2,748 -
2
votes2
answers366
viewsQ: Are product box bar codes suitable for primary keys?
Situation In a system where products will be stored in the database, and the barcode is a unique field, I would like to know if the barcodes that come in the product boxes have the possibility to…
-
4
votes2
answers384
viewsQ: "Text" type input similar to the Stack Overflow tag system
How to make a input of the kind text to use in a form I need to add tags, just as in Stack Overflow? Observing To whom to answer, the answer can be extremely large if you quote the server-side…
-
14
votes2
answers867
viewsQ: What is the difference between the terms "extension" and "component"?
I received a commenting in one of my questions and found the theme interesting, because I do not know how to differentiate a componente of a extensão in a system. What are components and what are…
terminologyasked Renan Cavalieri 2,748 -
1
votes1
answer39
viewsQ: Move variables out of a PHP array
I have a controller that will pass display information to a view, this information will be objects, and they will be passed in array. namespace app\controllers\conteudo; class index { public…
phpasked Renan Cavalieri 2,748 -
6
votes2
answers192
viewsQ: In MVC, if I have utility classes, will they be part of the models?
For example, let’s assume I have a string manipulation class called strman which I will use to store operations to work with strings, already in the models folder I own usuario and usuarioDAO, in…
mvcasked Renan Cavalieri 2,748 -
2
votes2
answers1859
viewsA: Is there a maximum size limit for an HTML page?
No limits imposed by default, however limits exist, either on the server or client side. You can use a loop loop to generate something very large and complex for the browser to render, in addition…
-
4
votes1
answer207
viewsQ: Is using HTTPS enough to protect a login area?
Considering a system in which you have the correct server-side treatments, validations and protected against SQL, XSS and brute force attacks, it would be sufficient just forward the login area to…
security-guardasked Renan Cavalieri 2,748 -
8
votes2
answers2250
viewsQ: ASP.NET needs a Windows server?
As usual for PHP I have always installed Debian and Apache, but I want to go deeper into web development and I intend to take a look at ASP.NET, out of curiosity I came to doubt if I will need a…
-
0
votes3
answers768
viewsA: Error installing PHP - "The program can’t start because MSVCR110.dll is Missing"
If you want to learn PHP, I suggest you don’t waste time trying to install PHP and the Apache server manually, use a tool that comes all ready, so you focus on developing and learning the language.…
phpanswered Renan Cavalieri 2,748 -
1
votes1
answer114
viewsA: Facebook comment form replaces wordpress form
You own the plugin Facebook Comments Notifier installed, here is his description: The Facebook Comments Notifier plugin adds the facebook comment system in place of the default Wordpress comments…
-
5
votes2
answers435
viewsA: Multiple regular expressions in a bar string
The following expression solves my problem: ^\/[a-z\-]+\/[0-9]+\/?+$ I found the solution using this site which was suggested through Sergio together with a little learning on the site Regexone I…
-
6
votes2
answers435
viewsQ: Multiple regular expressions in a bar string
I need a regular expression that matches the end of a URL in the following format: /somente-letras/somente-numeros[/] To match the part of somente-letras, I used ~^/[A-Z]+$~, but from the moment I…
-
0
votes1
answer470
viewsQ: Why does PHP accept to instantiate a class through a value of a variable, but not of an array?
Why does PHP accept that I create a class through a variable in this way: $MeuController = 'posts'; $controller = new \app\controllers\admin\$MeuController(); But not like this: $MeuController[0] =…
phpasked Renan Cavalieri 2,748 -
0
votes1
answer130
viewsQ: Are additional measures to prevent SQL injection attacks really necessary?
I was taking a look at some projects on the internet that involve security and came across the following code. All requests to the site were redirected to index.php for mod_rewrite, the connection…
-
15
votes4
answers332
viewsQ: In relation to object orientation, should queries have a class of their own or can they stay in a specific class?
What I have is this: a user class and a connection class with the bank. I need to insert a user into a database, the query "insert into usuarios values (..)" should be in my user class or in the…
-
23
votes2
answers27855
viewsQ: What do Rewritecond and Rewriterule mean in a . htaccess file?
I know they are used for many purposes, either internal or external redirection, but I never understood what each one does, whenever I need something I have to resort to ready scripts because I do…
-
4
votes3
answers1027
viewsA: $GLOBALS to store settings?
This can vary according to your project and will surely always generate a good discussion. If you are programming structurally, there are other ways to do it, such as constants or vectors in common…
-
2
votes1
answer137
viewsQ: Store PHP script output in "compressed" HTML
In a content manager, I usually generate static HTML pages each time they are visited, the script redoes the HTML when there is some change on this page, simply deleting the previously generated…
phpasked Renan Cavalieri 2,748 -
0
votes2
answers275
viewsA: Import PHP files through the URL instead of the disk path
You cannot do this simply because PHP is a server-side scripting language. You can use resources of a file in another URL, usually when it is passed by POST, this would be an API of some service, or…