Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
1
votes2
answers539
viewsA: HTML5 Drag and Drop
It is not necessary to import whole libs as jQuery and jQuery-UI, just check in the drop who is the element that is receiving the event dragover, thus: function drop(ev) { ev.preventDefault(); if…
-
1
votes1
answer188
viewsA: Curl script works on Windows, but not on Linux
Probably the file cookie.txt cannot be written, because linux requires permissions to write files: curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE,…
-
1
votes1
answer295
viewsA: Save $_POST with var_export after generating Variable again
The var_export does not have a reverse path, its purpose is to create a array valid for PHP, for example if you want to edit files .php dynamically configurative. A very simple example would be…
-
8
votes1
answer8796
viewsA: How to create "drawings" in Batch written files
This is known as ASCII ART (a common/common term), does not mean that it is an official term, the basic of it is you write even based on ASCII table characters to "simulate" a drawing, not quite a…
-
2
votes1
answer341
viewsA: Does Google change the language of my site in the indexing process?
The Google search by region, in case your probable region should return as Brazil then the results will be in Portuguese, so when browsing the results it is likely that will only return links with…
-
8
votes2
answers410
viewsA: How to validate the structure of a text file in PHP?
I tried in several ways to create something efficient, however no way was able to validate everything, which ended up making me have to opt for while even with fgets (or fgetcsv). This format you…
phpanswered Guilherme Nascimento 98,651 -
3
votes8
answers14487
viewsA: How to create a copy of an object in Javascript?
I believe the most modern way (that works in all modern browsers) would be to use Object.assign() that can make everything simpler and more efficient, rather than using loops or JSON.parse() much…
-
1
votes1
answer73
viewsA: Object.Reeze Javascript
The values of an object are "references", so you don’t freeze to "variable" in itself, but rather the object and by setting it into another variable you are actually not copying, but yes…
-
3
votes2
answers275
viewsA: PHP returns NULL when information has accents
This is because the JSON Encode only supports UTF-8 and probably your database is in latin1, you can exchange the encoding like this: //Salva o charset padrão (só é necessário se for usar a conexão…
-
2
votes1
answer1760
viewsA: Error "Using $this when not in Object context" in Slim framework
I believe that instead (::): $app->get('/', 'App\Controllers\HomeController::index'); You must do it (:): $app->get('/', 'App\Controllers\HomeController:index'); Because with the :: the Slim…
-
4
votes2
answers48
viewsA: What is the difference in the statement of these two options?
HTML classes inside the attribute class="" are delimited by spaces and in the CSS are delimited by point (.), a class in the CSS that contains .foo.bar or .bar.foo (independent of the order) will…
cssanswered Guilherme Nascimento 98,651 -
1
votes1
answer278
viewsA: Error in captcha
That’s a notice and not a good erro to know the difference see the link quoted by @Everson: What is the difference between "notice" and "Warning" in PHP? However, even though it is a notice the…
-
3
votes1
answer647
viewsA: Upload Images: More than one input file with the same name
The answer contains example with PHP and with Laravel because the author did not inform that he used Windows in the first version As in the doc…
-
3
votes2
answers690
viewsA: How do I convert PNG to JPG in C#?
According to the MSDN: https://msdn.microsoft.com/pt-br/library/twss4wb0(v=vs.90). aspx Upload the image: System.Drawing.Image image1 = System.Drawing.Image.FromFile(@"C:\imagem-especifica.png");…
-
3
votes1
answer1399
viewsA: Return an input that is inside a function
It would be something like: if menu() == "Sim": #chama o menu else: #fecha o programa ou outra Yet that would not be case-sensitve, then you can use .lower(), because if it is YES, yes, yes, Sim,…
python-3.xanswered Guilherme Nascimento 98,651 -
5
votes1
answer853
viewsA: How to add an external source in an SVG?
SVG has support for CSS, of course with some different properties for the elements, in case you can use @font-face and will achieve the desired, for example: <style> @import…
-
1
votes1
answer372
viewsA: Error mysql_error() = "" and mysql_errno() = "0"
If you have multiple open connections it will cause the failure, because instead of them they get the connection error in Handle $this->conn you’ll get the last open connection, so you can try…
-
5
votes2
answers2830
viewsA: How to check if a file has been selected in the input field?
The is_uploaded_file is not used for this, it is used to check if something passed came by upload, assuming that you have created a function to for example check the last modification of the file,…
-
2
votes1
answer743
viewsA: shell_exec() PHP of a Python script
You probably have different versions of Python installed, note that in Powershell you ran directly from the folder: c: wampx64 www python Which is probably not a global installation of Python, in…
-
0
votes1
answer286
viewsA: onclik event() Error opening camera
Just look at the first Exception (usually has the text Caused by), in your log see that contains the error: java.lang.Securityexception: Permission Denial ... with revoked permission…
-
1
votes3
answers10819
viewsA: Conditional phone mask (with 8 or 9 digits) in Ui Mask. How to do?
Like alternative suggestion you can use the https://github.com/assisrafael/angular-input-masks, lower the angular-input-masks-standalone.min.js via…
-
1
votes2
answers1371
viewsA: How to catch event that closes the browser?
What the @Wallace said this relatively correct, however what the author probably wants is to "delete Storage", when closing the last tab or window of a specific domain, then with this the…
-
2
votes1
answer1892
viewsA: Which bootstrap 4 files should be included in a project?
Is very broad, depends on the project, depends on the need, can’t say for sure. It may be that if the project is simple only bootstrap.min.css it will be necessary, if it is a project that will use…
twitter-bootstrapanswered Guilherme Nascimento 98,651 -
6
votes5
answers15911
viewsA: How to make a circle in CSS without Border-Radius 100%?
Outside border-radius and background if your desire is to really use in the images you can experience the clip-path: Using clip-path: Circle .arredondar { -webkit-clip-path: circle(50% at 50% 50%);…
-
1
votes1
answer281
viewsA: Boostrap Scrollspy
The possibility of not working for you is due to lack of one of these requirements: It is necessary util.js (if you compiled the bootstrap.js via source) Should be used with component Nav or the…
-
2
votes2
answers44
viewsA: HTML vs ASPX SEO
Probably not, SEO takes into account whether the URL is well written/intuitive and descriptive, if it is .html or .aspx or .foobar (it is possible to customize) will not influence. I believe that at…
-
1
votes2
answers59
viewsA: Detect Firefox add-ons with Javascript
Instead of checking with Javascript you can inject a script that creates a global variable (no window.), so for example (this example is with Webextension (supported by Chrome, Firefox and Edge) the…
-
4
votes1
answer167
viewsA: Problems in "Hello, world!" in PHP
Or did you disfigure the Apache on httpd.conf (because this version that uses Xampp is old, you may have done it and you don’t remember), or you nodepad.exe saved the document as Unicode or Unicode…
-
3
votes1
answer2545
viewsA: MP4 does not show video
Extensions in files like .mp4 or .webm do not guarantee that the format in fact is what it indicates, something else the extension .mp4 can refer to different video formats (encodings), in Chrome…
html5answered Guilherme Nascimento 98,651 -
2
votes2
answers119
viewsA: Iframe does not support the "resize:" property in Mozilla Firefox
Despite the property resize: not be supported in Firefox when used in iframes, as already stated in the other reply that was mentioned in the MDN, yet it is a property that will work perfectly in…
-
0
votes3
answers135
viewsA: Edittext style texts - Underline in Zigzag
This you wish is called Spell Check, I’m almost certain this should be enabled by default, however may "try to": editText.setInputType(InputType.TYPE_TEXT_FLAG_AUTO_CORRECT); I still believe that…
-
1
votes1
answer1166
viewsA: Check if input has negative value
Do not need a function just for this, to check if it is positive or negative just use < or >, for example: $input = 1; if ($input > -1) { echo 'Positivo'; } else if ($input < 0) { echo…
phpanswered Guilherme Nascimento 98,651 -
2
votes2
answers125
viewsA: I cannot use char '&' Qt Creator
This is because the & (And commercial - ampersand) is used by the system to separate two commands on the same line, is a "special" character, just like pipe (|) and the paranteses (( and )), and…
-
1
votes0
answers33
viewsQ: Qcoreapplication::applicationVersion does not "recognize" RC_FILE when using Mingw
I created a file rc (Resource File) simple and added it to the project (winvertest.pro): rcexample.rc #include "winver.h" VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1…
-
1
votes2
answers373
viewsA: Concatenate variable into array
When using simple quotes to concactnate you should use the point: $var = 'variavel'; echo 'foo ' . $var . ' bar'; Which will result in: foo variavel bar So your code should look like this: $str = '{…
-
0
votes2
answers1136
viewsA: Install PHPMYADMIN on linux with php5.6
The only way I see how to install without downloading such additional would be to download manually: https://www.phpmyadmin.net And put in a folder configured with Virtualhost or htdocs (if it’s a…
-
3
votes4
answers190
viewsA: What is the default value of the "cursor" attribute?
Not, the initial value is not cursor: default as the first response states, but yes cursor: auto, already default is a "cursor type" in this case: The answers that quote the cursor: auto yes are…
cssanswered Guilherme Nascimento 98,651 -
13
votes2
answers5686
viewsA: What is the difference between htmlspecialchars() and htmlentities()?
It’s not just with the <, > and &, htmlentities is much more than that htmlspecialchars Description string htmlspecialchars ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [,…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer25
viewsA: Return <andrebaill> result in browser
Use HTML entities like this: <<?php echo $valor->usu_id; ?>> A pure HTML example: Vira tag: <br> <foobar> <hr> É "visivel": <br> <foobar>…
htmlanswered Guilherme Nascimento 98,651 -
1
votes1
answer746
viewsA: Hide folder path with . htaccess
Create a file with the name in the root folder .htaccess and add this: RewriteEngine On RewriteRule ^([a-z0-9_]+)$ painel/view/$1.php [L] If the files have uppercase and minute letters you can…
htaccessanswered Guilherme Nascimento 98,651 -
5
votes2
answers1186
viewsA: How do I resolve these libpng errors in pygame?
That nay are mistakes, are "warnings" (Warning) and the problem may be in the image that is with the "color profile" (ICC profile) of the image and probably does not affect your application, you can…
-
3
votes2
answers245
viewsA: Responsive does not work right
col- should always be the son of .row, This would be correct in Bootstrap: <div class="row"> <div class="col-xs-4 col-md-4 col-sm-4"> ... </div> </div> And within ul can only…
-
9
votes1
answer436
viewsQ: How and when to use "Labels" in Javascript?
In objects/JSON we use : for keys and values, for example: {x: 1} As discussed in How to use the two points in Javascript? However, I was working on a small script to try to detect the JSON format…
javascriptasked Guilherme Nascimento 98,651 -
2
votes1
answer248
viewsA: Error including Composer (Class not found)
This scheme is strange, because when it installs it stays in the folder vendor, unless you have set up lib, it seems to me that you did not use Composer to install the packages, but tried to install…
-
14
votes2
answers438
viewsQ: What are the possible values in Document.readyState?
I noticed in the documentation of MDN, as in the documentation of W3 (not to be confused with w3schools) loading document still loading Interactive the document has already completed loading and the…
-
3
votes1
answer1151
viewsA: Use of CSS background-image and background-color
Flip the bars and add quotes: background-image: url("C:/Users/Caique/Documents/Study/HTML - CSS - JavaScript/Caelum/Mirror Fashion/caelum-arquivos-curso-web/mirrorfashion/img/sobre-background.jpg");…
-
1
votes1
answer86
viewsA: Error in imap_qprint
Change: $body = imap_qprint(imap_body($mailbox,$i)); For: $body = quoted_printable_decode(imap_body($mailbox,$i)); I think the only difference is that the quoted_printable_decode does not need the…
-
1
votes2
answers521
viewsA: Validation function gets number 0 or 1
As already stated in the other answer, the use of if is getting confused in the Ors: if((empty($valor)) OR (strlen($valor) != 1) OR ($valor !=1 || $valor !=0)){ I believe that if accepted values are…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer324
viewsA: ffmpeg-php does not work
Go on the php.ini open it with an editor like Notepad++ or Sublimetext and look for a place where it is written: ; Windows Extensions And add this line: extension=php_ffmpeg.dll If the line already…
-
2
votes2
answers60
viewsA: Access direct key
Your query is wrong: SELECT NOME WHERE ID = ? Foul FROM [NOME DA TABELA AQUI], it should be like this: DB::select( "SELECT NOME FROM minhatabela WHERE ID = ?", $nome ); And for the record, I have no…