Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
2
votes1
answer1234
viewsA: PHP - Parse error: syntax error, Unexpected 'endif' (T_ENDIF)
You may have forgotten to start the if (): somewhere up or it may also be that your IF is like this: <? if (...): ?> Instead of: <?php if (...): ?> This is because the short_open_tag…
-
2
votes1
answer2725
viewsA: emoji no Pycharm
I’m not sure, but I think you named your main script with the same name as the lib emoji, then at the time of import emoji it ends up importing the main script instead of the lib class. Change the…
python-3.xanswered Guilherme Nascimento 98,651 -
5
votes3
answers306
viewsA: How to remove internal dashes from a <SELECT> in Firefox
In Windows this does not occur, at least not in Firefox, I am almost certain that this is a situation that occurs on Ubuntu or in the specific graphical environment, because the controls rendered in…
-
10
votes3
answers158
viewsA: Css3 stop after finishing rotation?
With Jquery Using so, as in the other answer will make all elements that has the class class="openn" are affected, which can be a major headache: $('.openn').hover(function(){ // afeta TODOS os…
-
2
votes2
answers412
viewsA: How can I style the <select> arrow in Firefox?
Simply purely with CSS does not give, you will have to simulate the arrow maybe with an image via background, it is necessary to remove the decoration of the element using appearance: (with prefixes…
-
1
votes1
answer137
viewsA: Apply CSS to a line
[Editing] I can’t say for certain, but input-group (I believe that the style="padding-left:16px" also be a gambit to try to fix something) should not be used in the same element with col-, he must…
-
2
votes2
answers1179
viewsA: .htaccess change extensions . php and . html automatically?
My suggestion is to check if the "file" (being real or "virtual") is considered only in URL after Slash (/), this because it would avoid conflicts with files with different names (it is a little…
-
1
votes3
answers2210
viewsA: How to display the value of a variable in a modal bootstrap with PHP?
Single quotes do not accept variables: <?php echo'.$imc.';?> You messed up because of this: echo 'alert("'.$imc.'");'; Actually simple quotes there are "concatenating" only, I believe what you…
-
0
votes2
answers121
viewsA: setTimeout doing lose value of variable?
Beyond the bind quoted by Thiago (who will affect the this) you can simply create a variable to refer to the this: var $this = this; setTimeout(function(){ if(vetor[0] != vetor[1] &&…
-
1
votes1
answer361
viewsA: Problem sending email via PHP. Hidden copy is not coming
The Gmail probably thinking it’s SPAM, and it won’t get in the Inbox, maybe even the SPAM box will arrive (check this first), recommend you try sending via SMTP. There is a library called phpmailer,…
phpanswered Guilherme Nascimento 98,651 -
0
votes4
answers687
viewsA: Add all values that are in the database and show on screen
Use the AS mysql to create a "nickname" that is accessible in fetchObject/fetchAssoc: <tr> <th style="text-align:center;">Valor Total:<?php $sql = $pdo->prepare("SELECT SUM(valor)…
-
3
votes1
answer69
viewsA: Problem when registering user in the list
The variable input is within the scope CadastraUsuarios.menu: CadastraUsuarios { public void menu(){ Scanner entrada = new Scanner(System.in); There is no way to have access in a totally different…
javaanswered Guilherme Nascimento 98,651 -
7
votes1
answer3043
viewsA: #1264 - Out of range value for column 'ano' at Row 1
It has nothing to do with "single quotes", columns like int do not need "quotes" in past values That mistake: 1264 - Out of range value for column Indicates that the entered value has exceeded the…
mysqlanswered Guilherme Nascimento 98,651 -
4
votes2
answers1903
viewsA: How to convert Lowercase String to UPPERCASE?
With .toUpperCase and .trim() (tip from Jefferson), thus: System.out.println("MENU DE ESCOLHAS"); System.out.println("A- INCLUIR CLIENTES NA LISTA"); System.out.println("B- INCLUIR FUNCIONARIOS NA…
-
3
votes1
answer85
viewsA: Query by index in column of type JSON
I believe you can use JSON_EXTRACT, but if it is JSON type can already do so: ... WHERE `extra`->'$.tensao' = 200 You can also use the JSON_CONTAINS, something like: ... WHERE…
mysqlanswered Guilherme Nascimento 98,651 -
1
votes3
answers2388
viewsA: How to change the home page of the directory through . htaccess?
I wanted that when accessing my site, the person be redirected to start.html. - Robson If I understand, you want to redirect yourself, when accessing something like http://meusite.com it will direct…
htaccessanswered Guilherme Nascimento 98,651 -
5
votes2
answers272
viewsA: Focus() event does not work on the browser console
I believe it’s something related to "behavioural policies", the same occurs in Firefox as well as in Chrome. When you are in Devtools (Chrome or Firefox console) the browser tab or window is not in…
-
2
votes1
answer143
viewsA: Problem in footer html+css
There’s one left } in #redes: #redes{ color: white; font-size: 25px; font-family: impact; width: 22%; display: inline-block; } } <------ aqui Is missing one } in: #sobree{ color: blue; font-size:…
-
8
votes4
answers3300
viewsA: How to make Youtube embed responsive on the site, when opening want Width appear 100%
Not possible with CSS adjust the video, because the video is in an Iframe, so use width: who will adjust is Iframe, the only way I think will work is to use the Youtube API Iframe An example using…
-
1
votes1
answer262
viewsA: Field validation in Lumen 5.5
Not working is very ambiguous, probably it is occurring 500 Internal server error (if DEBUG is turned off) or this displaying an Exception. It seems to me it’s a series of typo: Has a { not…
-
1
votes1
answer169
viewsA: Java-Full screen in 16bit
It is very likely that your video card or your video driver can’t stand it the change, especially if your driver is generic, for example this using a newer operating system than your graphics card,…
-
1
votes1
answer144
viewsA: How to insert thumbnail in file . MP3
As per this link http://ffmpeg.org/ffmpeg-formats.html#mp3, you should do so (at the terminal): ffmpeg -i ArquivoOriginal.mp3 \ -i CapaDoAlbum.png \ -c copy \ -map 0 \ -map 1 \ -metadata:s:v…
-
0
votes1
answer848
viewsA: Convert . Jar to . Dex
In Github there is the following project: https://github.com/pxb1988/dex2jar You can download the compiled version on https://sourceforge.net/projects/dex2jar/files/ Inside the folder should contain…
-
1
votes1
answer669
viewsA: Warning: Invalid argument supplied for foreach() in C: xampp htdocs tccSistreinamento view modulos aluno tmp listAluno.php on line 10
Probably the data passed on json_decode is not a valid JSON format string, so there must have been some error while decoding and it won’t work. If the variable $obj is a string, it should contain a…
phpanswered Guilherme Nascimento 98,651 -
1
votes3
answers1047
viewsA: Laravel - parse_url() expects Parameter 1 to be string, array Given
Are you sure you know what these methods use? The Request::create is a method to request a URL as if "was a browser calling", an example of a call via POST: $request =…
laravelanswered Guilherme Nascimento 98,651 -
0
votes2
answers1363
viewsA: How do I save a txt in ANSI with fwrite?
I believe that ANSI is actually referring to the characters compatible with iso-8859-1 or windows-1252 (or other close to this), summarizing anything other than Unicode accentuated latinos, this…
phpanswered Guilherme Nascimento 98,651 -
4
votes2
answers352
viewsA: Result with incorrect formatting
Your error log level is probably not displaying Warnings and/or Notices, but if it were enabled it might display this notification in the middle of the page: Notice: A non well Formed Numeric value…
-
7
votes4
answers11575
viewsA: Use . env file in PHP project?
I believe that if it is without the use of frameworks, you are also considering not using external libraries. So, you parse the .ini with parse_ini_file (which may actually have any extension) which…
-
1
votes2
answers963
viewsA: Could someone explain to me why this error is returning to me? (Uncaught Referenceerror: Response is not defined)
The functions $.ajax, $.get, $.post, $.getJson are all functions asynchronous, because Ajax is an asynchronous request technique (without paging) via Xmlhttprequest API, To use Ajax you need…
-
2
votes2
answers5450
viewsA: How to run . mkv files in all browsers?
The extent .mkv and .mp4 has nothing to do with the format of the video, you could rename a file with the mp4 format to the extent video.foobaz that would still be an archive .mp4. Videos are not…
-
2
votes3
answers809
viewsA: Link to *.exe download
If the mistake is something like: Interrupted or Failed or network failure There’s no way to fix it in HTML, use attribute download HTML5 will not make it work, .exe usually already lowers directly,…
htmlanswered Guilherme Nascimento 98,651 -
3
votes1
answer98
viewsA: Why does this infinite loop happen?
I’m pretty sure it’s because of the quotes: "x=100; x!=65; x-=5" Remove them: while(x=100; x!=65; x-=5){ values between quotation marks in C are char *, which means you didn’t pass the variables,…
-
1
votes2
answers531
viewsA: Coding conflict using Tinker and Laravel
The mistake: SQLSTATE[HY000]: General error: 1366 Incorrect string value Indicates that the table does not accept the character type, if this is actually your example: $post = new App\post();…
-
3
votes3
answers719
viewsA: Why static methods can be called through the "instance" of the Python 3 class?
I believe this is because the @staticmethod just doesn’t turn the first argument of the method into "self", for example if you try something like: class Person: x = 1 def foo(self, bar): x = bar…
-
2
votes3
answers87
viewsA: I cannot pass Methods as Parameter in PHP
I believe you have two mistakes first currentYear() will look for a function and not a method within the class: $current_year = currentYear() To access the method is required $this Second, even if I…
-
2
votes2
answers155
viewsA: How to account for % div’s width of a responsive website
I believe that there is no calculation, there are many techniques for different things, responsive websites usually use a media-query for each size, for example, bootstrap uses the following sizes…
cssanswered Guilherme Nascimento 98,651 -
4
votes2
answers4742
viewsA: What is the "res.send()" command for in Express?
Node.js is an engine, this function can be any "lib", in case it is probably from Express, which is a lib that can be used together with Nodejs In case you must have misspelled, must refer to…
-
5
votes1
answer958
viewsA: How to clear a 301 redirect that has already been stored in the browser cache?
The redirect "cache" is in the client (browser or database searchers), what you have to do is move the new address pass to redirect to the old again. Supposing first you move http://site/foo.html…
htaccessanswered Guilherme Nascimento 98,651 -
6
votes3
answers729
viewsA: Get font size in HTML
Equivalent to bfavaretto, but compatible for older browsers: function getStyle(elem, prop) { if (elem.currentStyle) { //IE8 prop = prop.replace(/-([a-z])/gi, function (value) { return…
-
0
votes1
answer1700
viewsA: Routes with slim PHP framework
If you’re using PHP Built-in web server just navigate to the folder public by CMD or Terminal (depends on your operating system), assuming it is in the folder Documents (in windows), do this: cd…
-
0
votes1
answer46
viewsA: Leave only letters and numbers of a cookie
Do so: $cookie = 'ct0=945d9ead4b3ce88d5aba8f09a4d78aee;'; $ct0 = explode('ct0=', $cookie); $ct0 = trim($ct0[1]); //Limpa qualquer espaçamento $ct0 = trim($ct0, ';'); //Remove o `;` Or more…
phpanswered Guilherme Nascimento 98,651 -
1
votes3
answers1111
viewsA: Invert Divs positions with responsive
Your CSS is perfect, just reverse the order of Divs, you will also need to add float: left; for a-center and remove it in media-query (@media screen and (max-width: 600px)): .a-right { padding: 2%;…
-
2
votes1
answer1444
viewsA: How to get the value of a field on the same page
Just use the action="" empty and do so: <?php if (isset($_GET['nome'])) { $nome = $_GET['nome']; echo 'Olá', htmlentities($nome), '!'; } ?> <form method="get" action=""> Nome: <input…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer304
viewsA: Scrolling Nav effect does not work in Google Chrome
This was due to a change in Chrome 61, as per Blog (15 August 2017): To align with the spec and preserve browser Consistency, the scrollingElement is now the documentElement in standards mode.…
-
2
votes6
answers4895
viewsA: Success message after completing the PHP form
First of all make a check of the mysqli_query, for this use the mysqli_error($conn): if ($resultado_msg_contato) { //Mensagem de successo } else { //Mensagem de erro com mysqli_error($conn) } You…
-
8
votes2
answers2446
viewsA: jQuery - how to change text after "<i>" element?
To change the text afterward and not the whole text of .file-caption-name. you can do two ways, add an inline span element: $(document).on("click", "#trocar", function () { $(".file-caption-name…
-
5
votes1
answer973
viewsA: Site does not open on IOS,
There are 3 features that are not loaded, all with 404 (Not Found): https://aramaquinas.com.br/image/catalog/ban1xx.jpg https://aramaquinas.com.br/image/catalog/ban2x.jpg…
redirectinganswered Guilherme Nascimento 98,651 -
2
votes1
answer1098
viewsA: jQuery does not work on Electron App
From what I understand Eletron uses Node.js or jQuery ends up working as if it wasn’t running in a "browser", so instead of jQuery being accessible in the scope of window. it ends up only accessible…
-
2
votes2
answers852
viewsA: Align height 3 Divs in a row - bootstrap
I would say that the simplest way is that for your case where the content is not would be to fix a minimum height with min-height, thus: .precos .col-md-4 { padding: 15px; } .item { min-height:…
-
8
votes2
answers13204
viewsA: What is regex to validate only points, numbers and commas?
Would this be: ^[\d,.?!]+$ The ^ check from the beginning The $ Czech from the end The \d czech numbers Anything inside of [...] will be considered, regardless of position, then can remove ? and !…
regexanswered Guilherme Nascimento 98,651