Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
0
votes1
answer162
viewsA: Run Process in Window with PHP
I’m not sure what you want to run but I’ll let you know some suggestions, on the gnu/linux terminals you can use > /dev/null & (or > /dev/null 2>&1 &) to execute a command in…
-
7
votes1
answer623
viewsA: Is there any way to do an PSA unit test?
The classic ASP (Active Server Pages), just to be clear, is not a programming language, the language is VB or Jscript. There is a framework called aspunit based on junit, aspunit is a Vbscript…
-
7
votes2
answers2809
viewsQ: What is Copyright really?
I use the MIT license and it has this format as an example in https://opensource.org/licenses/MIT: The MIT License (MIT) Copyright (c) <year> <copyright holders> Permission is ... I also…
-
2
votes2
answers1696
viewsA: Function Onunload Javascript
The onunload is not well to shoot alert(); is to trigger events like clear cookies or things like that, what you want is the onbeforeunload, do so: <script> window.onbeforeunload = function ()…
javascriptanswered Guilherme Nascimento 98,651 -
13
votes2
answers581
viewsA: What code and language does the input tag do what it does?
Input is not part of a specific programming language, it is part of something we call interface (https://www.w3.org/TR/html-markup/input.file.html#input.file-interface), each browser has its own…
htmlanswered Guilherme Nascimento 98,651 -
8
votes1
answer594
viewsQ: What is PJAX and how to detect a PJAX call in the back end?
I’ve been reading about PJAX, but it is a little confusing its operation independent of frameworks, I saw articles but all turned to YUI or plugins for jQuery, really it was not very clear its…
-
3
votes1
answer860
viewsA: How to solve the problem of accentuation in the terminal?
Maybe std::wcout (wchar_t) solve your problem #include <iostream> int main() { std::wcout << L"república" << std::endl; return 0; } In windows to work like this reply on Soen it is…
-
3
votes3
answers1106
viewsA: Button diagonally only the left side
You can use the combination of position: relative with position: absolute together with a pseudo element such as :before or :after, similar to the one I answered How to Make Tilt Button? In this…
-
2
votes1
answer237
viewsA: Using standard input and output on Android
According to the Soen a way to grab the console data would be: // Create a stream to hold the output ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos);…
-
1
votes2
answers322
viewsA: Redirect parameters . htaccess
What you want is even redirect, which is different from rewriting, the way you did . htaccess it only serves for when accessing: http://exemplo/wp-login.php?teste=1 Will display the content of:…
-
1
votes2
answers6901
viewsA: Codeblocks -> "It seems that this project has not been built yet. Do you want to build it now?" - How do I fix this?
The problem was the folder with accentuation and/or spaces, Maybe Codeblocks IDE cannot work properly to pass the data to the compiler: /home/ehecatl/Área de Trabalho/programacao-c/ Suggested to the…
-
0
votes1
answer67
viewsA: Parameters Action Mailer with Bluehost Brazil
According to the http://kb.br.bluehost.com/configuracao-de-cliente-de-e-mail-popimap/ if you use If your service is: For Free Email Services / Email Hosting Plans POP pop.o-seu-nome-de-domínio (ex:…
-
1
votes1
answer789
viewsA: How to make requests with Http Guzzle pretending to be "AJAX"?
In fact there is no way to detect if it is real ajax (and this is what helps us), what we do is a send a header which uses the prefix x-, generally in HTTP the use of this prefix means experimental.…
-
7
votes1
answer432
viewsA: Doubt About Cache
Your code is working perfectly, the problem is that you can not set external file cache, in case the links that do not have a good cache are these: https://i.ytimg.com/vi/iSxbI3d0064/hqdefault.jpg…
-
9
votes1
answer1510
viewsA: Is there any way to test a route using PHP Unit in Laravel?
In Laravel specifically you can use the namespace/package classes Illuminate\Foundation\Testing\ (source: https://laravel.com/docs/5.2/testing) Note that the example here is for Laravel5.2 Inside…
-
4
votes2
answers2528
viewsA: To undo the mouse scroll (zoom) action on a google map Iframe
You can try applying pointer-events:none;, thus: <iframe…
-
9
votes1
answer1084
viewsQ: How to calculate the ratio of text to "HTML" ("HTML ratio")?
The text of an "HTML ratio" refers to the amount of text on a page against the code of the same page. How to do this calculation, I know I should probably take the DOM, but the part exactly what…
-
2
votes2
answers369
viewsA: Background-color does not track content
I’ll explain the first problems, first vertical-align is used for siblings element and which are inline or inline-* (text type), div by default are block which is different from "text type". In…
-
1
votes3
answers1218
viewsA: How does Laravel "guard" the routes?
I don’t quite understand the question, but I suppose they do $_SERVER['PATH_INFO'] or $_SERVER['REQUEST_URI'], no. htaccess of Laravel/Symfony should not use PATH_INFO because it is so: RewriteRule…
-
6
votes1
answer11573
viewsA: What is the difference between normal dump-autoload and optimized dump-autoload in Composer?
The -o or --optimize converts the PSR-0/4 to the classmap to be able to get the classes faster in the autoloader. This is highly recommended mainly in production servers, optimization may take some…
commiserateanswered Guilherme Nascimento 98,651 -
29
votes3
answers1826
viewsA: Why use getElementById if id is in the window?
Before there were standards for HTML, CSS and javascript who defined this were the browsers, ie each browser had its own way of doing things, as for example each had a way of catching elements of…
-
8
votes1
answer88
viewsQ: Array.map with parseint returns unexpected result
I was seeing a comment from jbueno in chat and decided to test in the browsers IE, Firefox and Chrome, while running on the consoles this command: ['10', '10', '10'].map(parseInt); He returned this…
javascriptasked Guilherme Nascimento 98,651 -
4
votes1
answer297
viewsA: How to prevent the contents of an element from being copied after Ctrl+A and Ctrl+C?
After a few tests, I found solutions with :before {} and content: ""; CSS, but this only works for simple text, so I decided to test the event oncopy javascript. I got it this way, using the events…
-
6
votes1
answer297
viewsQ: How to prevent the contents of an element from being copied after Ctrl+A and Ctrl+C?
I have a page and want to allow the copy normally, but I wish specific elements were not copied after using Ctrl+To and Ctrl+C, for example forms, navigation menus and advertising banners. This is…
-
3
votes3
answers682
viewsA: Error using Bootstrap Glyphicons
The font file was probably placed in a wrong folder. First let’s solve some errors, the order you used of CSS is wrong: <link href="css/bootstrap-theme.min.css" rel="stylesheet"…
-
1
votes1
answer770
viewsA: Send form data by Ajax in MVC project
Keep in mind that MVC is not a technology, it is just a way of doing things, your problem seems with the route. So Ajax is nothing more than a request in "background" running over a Javascript API,…
-
5
votes2
answers149
viewsA: Why don’t these Ivs line up?
There are elements block and inline, when using display: inline-block you create a block that sits on a line, so "text" effects like spacing and alignments will affect Divs. Being "inline" you can…
-
4
votes4
answers1442
viewsA: Document.writeln() is in disuse javascript
Not the document.write or document.writeln are not in disuse, I tested the script and it does nothing and also does not present any error. So I did so: html: <!DOCTYPE html PUBLIC "-//W3C//DTD…
javascriptanswered Guilherme Nascimento 98,651 -
2
votes2
answers1318
viewsA: Parameters in form action are not sent by GET method
When you use GET in forms you need to pass the values to inputs, like this: <?php $acao = $_GET['inst']; $acao2 = $_GET['sala']; $acao3 = $_GET['ano']; $acao4 = $_GET['mes']; $acao5 =…
-
2
votes2
answers78
viewsA: Hide controls for flash (swf)?
You can make it by putting AS like this: var meuMenu:ContextMenu = new ContextMenu(); meuMenu.hideBuiltInItems(); stage.contextMenu = meuMenu; In addition to hiding the controls you can try to use…
-
4
votes1
answer236
viewsA: What is the difference between __CLASS__ and get_called_class?
Doing the tests after seeing this answer on Soen, they have different effects in situations when we extend a class: get_called_class returns the name of the current class and not where it was…
-
19
votes3
answers5987
viewsA: Save browser cache or not?
Not much use this metatag, it usually only works for HTML, which the Pagespeed Insights suggests is to cache files called via <script>, <link>, <img>, <video>,…
-
4
votes2
answers857
viewsA: How to check if a website is registered?
Maybe what you need is a WHOIS query. There is a library called https://github.com/regru/php-whois using a range of services for consultation…
-
4
votes3
answers434
viewsA: Is it correct to omit the html start tag in HTML5?
The example you quoted seems more like a flaw, can even be the case of a dynamic page with some BUG and all sites you found use the same technology and have the same BUG (despite going through the…
html5answered Guilherme Nascimento 98,651 -
5
votes1
answer554
viewsA: What are the existing attributes in the html tag?
W3C != W3schools First I would like to mention that it is a very common thing for those who begin to study and ask questions on google, W3schools has no connection with W3C or W3.org, they only use…
html5answered Guilherme Nascimento 98,651 -
3
votes1
answer171
viewsA: Should prefixes be used in HTML5 elements?
The use of this is totally optional, basically there are patterns and they can be "extensible", but it does not mean that you are obliged or not to use something. We usually use it when we merge…
-
0
votes1
answer974
viewsA: Format data and save to txt with php
I don’t understand your use of fwrite, in accordance with documentation the use is this: int fwrite ( resource $handle , string $string [, int $length ] ) The third parameter is expected an integer…
-
2
votes3
answers2318
viewsA: How do I zoom into a css or javascript page?
If in CSS you have the following properties: zoom: body { zoom: 67%; } Transform: body { transform: scale(0.67); /*0.67 equivale ao 67%*/ } Note that if you are developing a mobile page and this is…
-
2
votes2
answers1284
viewsA: How do I check whether the php_fileinfo.dll extension is active or not via php code?
Beyond the extension_loaded quoted you can use function_exits to check if the function is available (it would be like a "Feature Detection"), you can do so in the script: if…
-
1
votes1
answer88
viewsA: Use of Itemid and itemref attributes in HTML5 elements?
As already explained here What is the "application/Ld+json" type for in a <script tag>? this is the foundation of Microdata, Rdfa and JSON-LD, they serve to facilitate crawlers to extract the…
html5answered Guilherme Nascimento 98,651 -
18
votes2
answers11304
viewsA: What are the differences between the values "en" and "en-BR" of the lang attribute?
I’ll sum it up nicely, pt indicates Portuguese, regardless of country/region as: Source: Which countries and Regions Speak English? Brazil Portugal Sao Tome and Principe Angola Mozambique Cape Verde…
-
8
votes2
answers1007
viewsA: How does a method that can receive multiple parameters work?
As stated in Soen you must use the modifier params, in this way: public static int AddUp(params int[] values) { int sum = 0; foreach (int value in values) { sum += value; } return sum; } The call…
-
1
votes1
answer381
viewsA: When to use the draggable attribute in the html element (tag)?
This attribute allows creating a ghost of the element that will drag and with Javascript it can be moved to other elements, as in this example: Drag the orange div pro first div with gray outline…
html5answered Guilherme Nascimento 98,651 -
3
votes1
answer586
viewsA: How to validate the origin of the form?
There are different ways to do, the first and perhaps the most to use is the "anti-CRSF" (if you can call it that): authenticate.php: <?php session_start(); if (isset($_POST['token'],…
-
2
votes1
answer178
viewsA: Utility of the new global attribute Dropzone in HTML5?
First I want to make it clear that the attribute dropzone="" is not yet supported by any browser, so as much as try to use it will not work and it is still experimental, ie it may become standard as…
html5answered Guilherme Nascimento 98,651 -
2
votes2
answers1493
viewsA: How to Validate Only Jpeg as File Upload Extension?
The validation by file extension is not safe, this link does not contain the answer to "Laravel" (although it may work) but it explains the problem that validations by extension can cause: Compare…
-
0
votes1
answer43
viewsA: Improve css code
I do not understand what you mean by "semantics", its code is minimal and presents something simple, the only modification I would do is that if .acaoBaixar and .acaoView has the same CSS effect, so…
-
1
votes3
answers355
viewsA: Gmail displaying source host on recipient when using PHP mail()
A possible solution to remove this would be to use Phpmailer to upload. First download via Poser in your project folder (your use Composer): composer require phpmailer/phpmailer Or download the…
-
1
votes1
answer29
viewsA: AJAX overwrites variable
Ajax is asynchronous and non-synchronous, which rotates within (is a callback): function(data){ registroJson = data; //copiando para variavel registroJson o resutado 'data' // já tentei…
-
3
votes1
answer390
viewsA: Installing Qt in Visual Studio
Only QT5.6 supports the VS2015, but it is still in RC version (Release Candidate), you can try, but RC versions are subject to Bugs, even being close to release, follow the downloads:…