Posts by Emerson Rocha • 3,710 points
77 posts
-
1
votes2
answers122
viewsA: Does it make sense to use an api to access another api? (bematec one in this case)
Yes. Creating an abstraction interface for legacy systems to access new services is something common, if not more recommendable, when: The cost of changing legacy systems is very significant The…
-
1
votes1
answer381
viewsA: How to make CRUD in Joomla
To create a component using CMS Joomla, you can follow the official documentation available at https://docs.joomla.org/J3.x:Developing_an_MVC_Component. There are some documentations even in…
-
1
votes2
answers521
viewsA: How to serve files with access control in Django?
I have two suggestions. The first uses more server features and ensures more privacy, and the second, which is used by Facebook to store images, performs better, but uses aloe URL pattern. CASE 1:…
-
0
votes2
answers3391
viewsA: Webbrowser/Java Browser
That doesn’t answer the question, is an additional answer for anyone looking for something to use javascript but how many people will find this on Google is looking for a way to automate by command…
javaanswered Emerson Rocha 3,710 -
2
votes1
answer368
viewsA: Portuguese Language for Date in Joomla, PHP
There is more than one way to do this. One of them would be to directly change the code you are pointing to, another is to override language. Go to Joomla > Administrator > Extensions ->…
-
5
votes1
answer399
viewsA: Is it a good idea to insert SVG inline files?
Cases where strongly NOT performing well do this The site already uses an Sprite, where many small images are loaded at once The logo is a text source (similar to what occurs with Sprite Your image…
-
1
votes1
answer918
viewsA: Multiple apps on the same Nginx domain
On the line try_files $uri $uri/ /index.php?$args; you are sending all the requisitions that give error in dominio.com.br/antigo/* for dominio.com.br/index.php from your other application. This is…
-
6
votes2
answers532
viewsQ: Advanced image optimization and compression on web servers without using external services
How to do even more optimized compression than you can achieve with tools like ImageMagick and libgd (GD) without generating WEBP image? Some services such as https://tinypng.com/ and…
-
1
votes2
answers2818
viewsA: Block javascript and sql-Injection attack on the same string
Protecting against XSS and SQL Injection at the same time can be a very complicated task and potentially with many mouse grabs that only someone with DOM and SQL expertise can have idea of the risk.…
-
16
votes2
answers2178
viewsQ: Concept of Man-in-the-Middle attack
Conceptually speaking, what is an attack Man in the middle, more commonly known as man-in-the-Middle Attack?
-
2
votes1
answer2382
viewsQ: Remove old key from known_hosts (Warning: Possible DNS Spoofing Detected)
When accessing via Linux/Macos command line, an error like the following may appear @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @…
sshasked Emerson Rocha 3,710 -
2
votes1
answer2382
viewsA: Remove old key from known_hosts (Warning: Possible DNS Spoofing Detected)
In your terminal, enter the command: ssh-keygen -R dominio.com.br This error occurs because at some point in the past the local machine has accessed the remote server and written to…
sshanswered Emerson Rocha 3,710 -
2
votes5
answers708
viewsA: At what point in a project should the platform be chosen?
When should the platform be chosen? At the beginning. Can it change in the middle of the project? Yes, can if the development cost and time is less than continuing with the initial strategy. To make…
-
3
votes2
answers132
viewsA: Hybrid Android Apps. Is the performance loss that big?
It depends. The answer may be yes, there is significant performance reduction, or no, it makes no difference. Situations where a Hybrid App performs similar to the standard app Native app equivalent…
-
9
votes12
answers208289
viewsA: How to format date in Javascript?
("0" + date.getDate()). substr(-2) // Ensures there will be zero if < 9 In your case, it would be var data = new Date(); var dataFormatada = ("0" + data.getDate()).substr(-2) + "/" + ("0" +…
-
1
votes1
answer358
viewsA: Contact form and newsletter Ideal
A extremely simple solution, that even a lay person can implement is to use a Google form. A Google form can receive email and other information, save in a spreadsheet, and this can then be imported…
-
6
votes2
answers1209
viewsA: Use <Section> tag inside a <aside>
You could yes use <section> inside <aside>, the point is you have to see if it makes sense. Eventually, you can sweat up more tags <aside> instead make your proposal. From now on,…
-
4
votes5
answers213
viewsA: CSS Child selectors on IE8?
Yes, there is a way to emulate only with CSS and without javascript, points that are question requirements, Nth-Child only with CSS. It’s a little more work, but it’s viable. Syntax of Adjacent…
-
11
votes2
answers8587
viewsA: Hosting Windows Azure website for free?
Like Frequently Asked Questions about Purchasing Windows Azure: Yes. With our new Spending Limit feature, customers who sign up for the 90-Day Free Trial, MSDN, or Cloud Essentials offer will be…
windows-azureanswered Emerson Rocha 3,710 -
5
votes3
answers2825
viewsA: Check whether a date and time (timestamp) represents the current day
The alternative to doing this with pure SQL, without preparing the date before executing the querie is WHERE DATE(dh.envio) = DATE(NOW()) But don’t do it. This automatic alternative has worse…
-
4
votes1
answer127
viewsQ: Micro Ddos mitigation and sudden high access number in resource-limited web applications
It is extensive documentation of how to mitigate (proactively reduce impact while it occurs) denial of service attacks in web applications. People usually cite services like Cloudflare or else as…
-
14
votes4
answers9017
viewsA: How to declare a constant in Javascript?
Use the const. Documentation on const MDN. Syntax const name1 = value1 [, name2 = value2 [, name3 = value3 [, ... [, Namen = valueN]]]]; Example const a = 7; console.log("a is " + a + "."); // a is…
javascriptanswered Emerson Rocha 3,710 -
1
votes2
answers1761
viewsA: Exchange impact - Myisam for Innodb
It has two types of impact, the during migration and the after during use. Impact during use Pretty much everything Myisam does, Innodb does, especially if you use newer versions of Mysql or…
-
22
votes5
answers2395
viewsQ: Strategy to find out if your web application is being partially or fully censored by an ISP
Question Like, conceptually speaking,it is possible to detect that a web application has been partially or totally blocked by an internet provider? Two situations that I believe could allow this…
-
9
votes9
answers30430
viewsA: How to debug code in PHP?
In PHP, the direct equivalent of console.log would be print_r, var_dump and the var_export. If you have the xdebug enabled, can also use the xdebug_var_dump which displays the output mode also…
-
3
votes2
answers1118
viewsA: Options to generate javascript library documentation
There are some other libraries that generate documentation from javascript code other than jsdoc3, but most will require you to configure the environment to make it work. Take into account that in…
-
10
votes4
answers1358
viewsQ: Conceptual database and file backup strategy
This is a conceptual question that fits into two on-topic themes of Software architecture and engineering. Concepts and practice and database question involving SQL on server. As this type of…
-
3
votes1
answer990
viewsQ: Generate securely random string in Nodejs
How, using the Javascript language on the Nodejs platform, generate a string, preferably with configurable size, random enough to be used in routines dealing with cryptography and that for safety…
-
5
votes4
answers4937
viewsQ: Generate string securely random in PHP
How, using the PHP language, generate a string, preferably with configurable size, random enough to be used in routines dealing with cryptography and that for safety reasons cannot be insufficiently…
-
6
votes3
answers8084
viewsA: CORS on Nodejs without the use of Frameworks
In addition to @mgibsonbr, about response.setHeader("Access-Control-Allow-Origin", "*"); and the Access-Control-Allow-Credentials, if you make requests in addition to GET, such as POST, PUT, DELETE…
-
-1
votes2
answers2133
viewsA: Metadata OGP.ME What is the ideal image size for social networks
According to https://stackoverflow.com/a/15898292/894546, there is a recommendation next to what I would say: Use a square image (no consensus, but using square will work) Try using multiple values…
-
2
votes4
answers3248
viewsA: How to implement a textarea responsibly?
This error occurs because, when using a CSS framwork such as Twitter boostrap, such a framework specifies the width and height of elements such as text and textarea. In this case, after applying…
-
1
votes1
answer160
viewsA: How to generate columns with SUSY?
Yes, Suzy can automatically create Grids. He was made for it. It may take a few days to learn this, but it works well. One thing you should be prepared on is that Suzy will be easier to understand…
-
5
votes1
answer2288
viewsA: Mysql falling due to lack of memory
Check the maximum amount of memory your server could theoretically use Use the script MySQLTuner, available in https://github.com/major/MySQLTuner-perl, and follow his recommendations. He will at…
-
8
votes5
answers462
viewsA: Internet Explorer, should I still be worried about him?
The answer is not yes or no because that is not the right question. It involves technical issues and issues of drawdown. I quote below three main topics that should be taken into account when making…
-
1
votes1
answer138
viewsA: Is Facebook Embedded Post only allowed for profiles that allow Public Followers?
If your question is a configuration in the code to be put on an external site to force upload content, it does not exist. Otherwise there would be no reason for something that people would always go…
-
2
votes3
answers1015
viewsA: Send e-mail on behalf of the client
First of all, your server needs to be well configured or be considered as spammer until you are. This is because of Sender Policy Framework (SPF). This should be done at server level. There are…
-
4
votes3
answers304
viewsA: Crawler that detects changes on a page and saves screenshots
phantomjs is perfect for this. It is not in python, but it is relatively trivial for tasks like these and only requires you to know javascript. One of the main advantages is that it has advanced…
pythonanswered Emerson Rocha 3,710 -
4
votes4
answers1480
viewsA: What is the correct way to simulate a <script> with a new language?
That’s the principle of interpreters LESS and others who use a type that does not exist and is then ignored by the browser. Here the step by step Use <script> with a type that doesn’t exist…
-
6
votes4
answers4295
viewsA: Way to make a comparison between three variables
It’s like you did, but you have to test one thing at a time and use the operator equivalent to E/AND. // Nota: bloco de código alterado. Espero que da próxima vez os colegas // estejam mais…
-
9
votes1
answer4824
viewsQ: Javascript code documentation standard and automatic documentation generation on Ides and exportable
Java has the Javadoc, PHP has Phpdoc and other languages, has documentation standards. Which standard most used to document javascript, already integrated with Ides, so that when using functions, it…
-
15
votes1
answer4824
viewsA: Javascript code documentation standard and automatic documentation generation on Ides and exportable
To document Javascript, I recommend the use of the pad described in Jsdoc, whose page with explanatory documentation is http://usejsdoc.org/. In addition to telling in detail a pattern that Ides…
-
8
votes4
answers51666
viewsA: Responsive font-size depending on screen size
Automatically with screen size Access this documentation from MDN on CSS media queries. Since he did not precisely detail the cut points, it is difficult to give a practical and generic example. But…
-
0
votes3
answers2718
viewsA: Javascript/Nodejs setInterval with programmed start, simple cron style
follows a base solution that solves part of the simplest example. You can take as a basis to answer your questions. At the time of this posting it has not been fully tested and only has not…
-
14
votes6
answers42802
viewsA: What is the difference between . on("click", Function() {}) and . click(Function() {})?
$('seletor').click(function (){}); is a shortcut to $('seletor').on('click', function(){});. They are both equivalent. but the first case has another use that is quite different (the click), while…
jqueryanswered Emerson Rocha 3,710 -
2
votes2
answers3652
viewsA: How to make the container reach the footer? (even with little content)
In that case, put the background not in the container that has the text, but in a container that would be at the bottom of it. If the HTML of your site is simple and there is nothing special in the…
-
2
votes2
answers645
viewsA: Facebook does not allow the presentation of posts in iframes?
This is because when accessing the HTML page, you have the following header x-frame-options:DENY This explicitly tells the browser that it does not want the site to be viewed within an Iframe. It is…
-
3
votes4
answers8200
viewsA: How to send text to the printer with PHP and Javascript?
To print the current page, whose CSS does not explain that certain parts should not be printed, use javascript print. Documentation on print MDN. window.print(); To control with CSS what on the…
-
1
votes2
answers793
viewsA: How to place variables in email with phpmailer?
Your error is in the query. This is not how you calculate dates in Mysql/Mariadb. Note that you are adding an integer, but do not say what that integer is. The database in this case has a syntax…
-
1
votes2
answers1924
viewsA: Web Service Nusoap Return Error
http://sourceforge.net/projects/nusoap/files/nusoap/ Last Update: 2011-01-13 That doesn’t exactly answer your question, but it will solve your mistake. In the past, when I had to work with…