Posts by Emerson Rocha • 3,710 points
77 posts
-
3
votes3
answers263
viewsA: Intellisense disappears when the list of arguments is large
Not at first. A possible solution would be to test whether Visual Studio 2013. This is a type of error that if it was possible to solve without asking the user, they should do by default. The…
-
0
votes5
answers620
viewsA: How to select records that have a relationship with all values in a list?
Well, as it has an n-m table (many to many) in general the difference is that its field WHERE will have to be filtered by a subquery or a complex JOIN. Joins tend to be more performative than…
-
13
votes2
answers11900
viewsA: How to make a JOIN between two tables of two different databases?
Federated tables, is a good option, but if for your case it fails by some limitation, you have at least three more options Application close to a database directly access the other database One…
-
1
votes3
answers2188
viewsA: Use symbol in input text, and disappear when typed
Besides background-image, when what you want to appear is text and you are interested that the content is read by screen readers, it is interesting to use placeholder. The text of placeholder will…
-
9
votes5
answers436
viewsA: Refactoring: When is a method "too big"?
This question is very relative. There are authors who recommend 20 lines, but tolerate up to 100. Others claim that some methods can indeed consume up to 100~200 lines and yet they are as easily…
-
1
votes2
answers1118
viewsA: How to reuse and share an SSH private key between Mac OS X and Linux?
Just like J Bruni said, it’s a matter of copying the key to the other computer that wants to use it. For the problem you mentioned about copying the key to another Mac and asking for password, I…
-
10
votes3
answers70810
viewsA: What are the appropriate data types for columns like address, email, phone and mobile phone for SQL database?
One pattern I usually use is listed below. It can be seen on my website. In some cases I have listed more than one example. The types and sizes are for Mysql/Mariadb. In the case of values that…
-
1
votes1
answer2070
viewsQ: Recover super user administrative access Joomla that due to poor configuration in the ACL is no longer administrator?
Joomla, since version 1.6, allows a complex user access level, and, unlike previous versions where it was possible to set only by a user role (super administrator, manager, author...) has allowed…
joomlaasked Emerson Rocha 3,710 -
2
votes1
answer2070
viewsA: Recover super user administrative access Joomla that due to poor configuration in the ACL is no longer administrator?
There is a way to make a common user into a temporary super administrator, as well as become a former super administrator. It requires FTP access to your server. This same mode can also serve if you…
joomlaanswered Emerson Rocha 3,710 -
1
votes1
answer224
viewsQ: How to use Phantomjs to access a JSON responsive API
How to use PhantomJS to access an API whose response is JSON and not HTML and process the result? I would like the example to use the Stackoverflow API itself in English, so that the script returns…
-
1
votes1
answer224
viewsA: How to use Phantomjs to access a JSON responsive API
To do this, go to the API interface and find out which URL to use. For this specific case, this is the direct link…
-
3
votes2
answers1219
viewsA: How to insert Javascript code into the database?
The answer to that depends. Whether secure for your database, or secure for your application. Database: main SQL Injection attack If you escape characters and remove codes that could cause a SQL…
-
8
votes5
answers10236
viewsA: echo or print, what really is the best option?
One is practically nickname for the other. The print also exists in C, a language that PHP relied heavily on, so some books or initial PHP courses, or even teachers more accustomed to C, can use…
phpanswered Emerson Rocha 3,710 -
4
votes3
answers2718
viewsQ: Javascript/Nodejs setInterval with programmed start, simple cron style
For Javascript and Nodejs, there are n robust Cron style libraries, such as Node-cron. But they are complex too much for simple situations, are heavy to download in the browser or require an…
-
2
votes2
answers2590
viewsA: How to force a page to open always horizontally?
An addition to J. Bruni’s solution, which is certain is that there is a problem that always occurs with listeners in resize is that it can be fired many times per second and this can lock the screen…
-
15
votes7
answers78990
viewsA: How does this if/Else work with "?" and ":"?
That’s a ternary operator. See official documentation on MDN While it can complicate code readability, in some situations it is extremely useful and succinct. Example: // Pseudo código condicao ?…
-
21
votes3
answers1400
viewsA: What are the ways to apply Eval in Javascript
I’ll show you eight different types that transform strings into a code that can be executed immediately. In this case, I am using only pure javascript, but libraries like jQuery have methods that…
-
1
votes3
answers1676
viewsA: How to set a max-width to a div that increases and decreases proportionally?
The best way to do so is to use CSS media queries, not javascript. Please avoid suggesting doing javascript something that can be done in pure CSS. Javascript adds additional complexity and should…
-
2
votes4
answers2213
viewsA: Randomize the position of the images
One way to do this, using pure javascript and without jQuery is listed below /** * Shuffle Fisher-Yates algorithm * * @see…
-
0
votes3
answers5281
viewsA: Navigation without a refresh!
Instead of answering how to make a simple feature, if you really want to do this, you’d better invest in specialized libraries. Would indicate Angularjs, Backbonejs, Canjs and Ember. In a way…
-
1
votes2
answers960
viewsQ: How to make Nginx display error messages on screen in the same way as Apache does instead of '502 bad gateway'
Nginx and Apache present errors differently when there is a problem running a PHP script. Apache, when configured to display on screen, displays exactly the error, with file and line where it…
-
6
votes1
answer130
viewsQ: How to document in code a hack, Hotfix and any potentially problematic outline situation
Hacks, emergency fixes and any potentially problematic contouring situation are a necessary evil. Although it can be considered personal opinion, when working in a team, a minimum of care is assumed…
-
1
votes1
answer4691
viewsQ: GIT/Github Versioning Conflict for the same branch and only one commiting user
I am harduser and experienced programmer, but a problem has occurred: to a private repository on Github, with only one user committing, eventually when sending code I receive notice that it has been…
-
3
votes4
answers640
viewsA: Installable PHP application architecture
From a conceptual point of view, you can reduce your problem to two points: an executable file, and another file containing the others, for example, a zip file. I will assume that you will use PHP.…
-
1
votes1
answer201
viewsA: Visual to zoom in/out using Google Maps API v3
If this effect is not available in the API, and you are sure you have checked even in the latest versions to see if it is some new functionality, I will explain a way to do this. Add an event that…
-
3
votes4
answers556
viewsA: What is the fastest, most memory-saving type?
In this case, it’s not the question of faster, but the question of which kind makes the most sense. In general, working with integers will always be more efficient than working with letters, but…
-
4
votes4
answers4278
viewsA: Mysql performance with Innodb in large data mass table
Short explanation Tune Innodb to allow the table to be in memory Tune Innodb to sync changes every 1 second instead of all the time Rephrase your table. Remove unnecessary indexes, or add new ones…