Posts by Murilo Melo • 2,272 points
151 posts
-
0
votes1
answer38
viewsA: Identifying number of hits on the page
An alternative using PHP (since the language to be used was not specified): <?php //Iniciar a sessão session_start(); //Verificar se a variável de contador existe (caso não exista, será criada)…
-
0
votes1
answer27
viewsA: Dynamic filename usage for file creation
After verifying that there is a method to collect the hostname (getenv("COMPUTERNAME"), this to windows), performed some tests concatenating the return of getenv with the file extension and worked,…
-
-1
votes1
answer27
viewsQ: Dynamic filename usage for file creation
I want to create files with dynamic names for storing logs, however, I have no idea how to get the name I want and also do not know how to format the string and use it with the "path/filename.txt".…
-
0
votes1
answer93
viewsQ: Problem searching and filtering date data on object
I have the following functions to search and sort a user for a certain date, however, when running these functions on an object, it generates an error KeyError: 0 in function listagemData #Criar…
-
2
votes1
answer2176
viewsA: ERROR 1292 (22007): Incorrect date value: '0000-00-00' when changing table engine (Mysql)
After a little more in-depth research, I found a solution to the problem. If needed to temporarily disable the strict mode, using set session sql_mode = 'No_engine_substitution'; After that, it was…
-
1
votes1
answer2176
viewsQ: ERROR 1292 (22007): Incorrect date value: '0000-00-00' when changing table engine (Mysql)
I am trying to change the engine of a table of MyISAM for InnoDB, and it occurs that the column date_install generates errors due to zero dates: 0000-00-00. In this case, I used the following query:…
-
0
votes2
answers35
viewsA: Menu close reads target as Undefined
I checked the Script above, the same if solved just by removing the statement CloseMenu() at the end of the creation of the
-
-1
votes1
answer24
viewsQ: Query error using 1 Where and 2 joins in search query
Hello, I’m running the following query in mysql: select * from usuarios where login='gamboamurilo' or email='[email protected]' and senha='8b0a60f71e758c8b27e7688ee754cd85' inner join…
-
1
votes1
answer2232
viewsQ: Error in mail() - Must Issue the STARTTLS command first
Well, I researched about the error, many users said that should be added the ssl:// at the smtp.google.com or the tls:// at the imap.google.com, using ports 465(or 993 as an alternative) and 587…
-
0
votes1
answer424
viewsQ: error in Math.sqrt
I’m using the module Math in python, and I came up with a problem, when using Math.sqrt for the 75 root, it returns me 7.5, even using float(), and the root is around 8.66 How can I fix this problem…
-
1
votes1
answer667
viewsQ: Back to top button
I created a basic script to display/hide a return button at the top of the page: $(document).ready(function(){ // Add smooth scrolling to all links $("a").on('click', function(event) { // Make sure…
-
1
votes6
answers2884
viewsQ: music does not play
I have the following python code #*-coding:utf-8;-* import pygame pygame.init() pygame.mixer.music.load('ex1.mp3') pygame.mixer.music.play() pygame.event.wait() In this case, it should play a song…
-
1
votes3
answers268
viewsA: Error when calculating a loop value
In this case, simply reset the Count if the value of the highest, or lowest grade is updated, causing the count of students with the same value (being the highest, or the lowest only) to resume. if…
-
1
votes3
answers268
viewsQ: Error when calculating a loop value
#O usuário informa o número de alunos totais na sala, em seguida são declaradas as variáveis que complementarão os loops alunos = int(input("Qual o número de alunos na sala?\n")) notasAlunos = []…
-
0
votes1
answer231
viewsQ: Use of picture tag
Good afternoon, I have the following structure: <picture> <source media="(min-width:min-width:1440px)" srcset="img/main_banner_info-1440px+.png"> <source…
-
0
votes1
answer36
viewsQ: xmlhttp is not defined
I’m having some problems when performing an ajax request by javascript, however, it appears that the variable xmlhttp was not defined, even though I defined it before the function and before using…
-
1
votes1
answer187
viewsQ: Use of picture tag showing multiple images simultaneously
Hello, I’m having some problems with the picture tag, in this case we use the tag to show images responsibly, adapting the image for each device, but if I want to show more than one image…
-
3
votes2
answers182
viewsQ: Does dynamic SEO work?
I am studying SEO, and I saw that for certain subjects, we use different microformats, for the identification and rankings of the pages, however, I thought of a doubt, I researched in several places…
seoasked Murilo Melo 2,272 -
0
votes1
answer47
viewsQ: Problems with ajax request
Well, I am trying to perform a simple ajax request, but the called content is not being displayed. How can I resolve ? var xmlhttp; function callContent(){ var mainContent =…
-
0
votes1
answer26
viewsQ: Selecting all page elements?
I was thinking about Grid-CSS, I read on some websites about frameworks that exist for it, and that in general are very bad, because they limit the capacity of the technology, so I thought, why no…
-
1
votes1
answer82
viewsA: toggle menu function does not work with data-Attributes
Well, after some time dedicated to solving this problem, I came up with a solution to my problem. In this case, by printing i at certain points of the main function, it returned either a number, or…
-
2
votes1
answer82
viewsQ: toggle menu function does not work with data-Attributes
I am trying to make a function that causes the buttons to change only the data-Attributes of the menu with corresponding value, however, no error is shown on the console, but also does not work:…
-
-1
votes1
answer154
viewsQ: Change file contents with ajax
Hello, first, I would like to clarify that I searched both here in the stack, as in other sites something that answered my question, but I did not find. My question is, how can I rewrite the…
-
0
votes1
answer51
viewsQ: use of regex on a switch
I’m trying to use regular expressions to validate a switch, but it occurs to me on the console that "day.match" is not a Function: function dayOfWeek(day){ var regex = /[1-7]/g;…
-
1
votes1
answer92
viewsQ: list-style does not return to default
Well, I’m developing a website, and the following problem has arisen: I reset all elements of the site; *{ color:inherit; font-family:inherit; font-size:inherit; font-weight:inherit;…
-
1
votes1
answer526
viewsQ: Paging with Jquery
I searched some sites and here in the stack looking for how to create a pagination script with the following features: The elements are collected in the HTML I can use the function at any time and…
-
2
votes4
answers4366
viewsA: How to ensure an image is centralized and responsive
Well, first, to leave a responsive image, you’ll need the following pattern for the element img: For displaying wider than higher images img{ min-width:100%; max-height:100%; } For displaying images…
-
0
votes2
answers61
viewsQ: Form field above all elements on page
I am developing a site, but there was a small bug that I can not solve, there is a search form in the main div, and a menu that is fixed, above any element on the page. However, when opening the…
-
0
votes2
answers828
viewsA: Creation of diagonal div
I made some changes to Guilherme Nascimento’s response so that the "pseudo-element" is responsive if the banner changes in size in all possible resolutions. var windowHeight = $(window).height();…
-
3
votes2
answers828
viewsQ: Creation of diagonal div
Well, I’m having doubts about creating a div, with two elements, separated by a diagonal line, according to the image below, how can I create ? The text should remain straight The Skew property, as…
-
4
votes2
answers618
viewsQ: Grid styling for gallery using flex display
Well, I’m trying to create a gallery, display:flex, how can I accomplish this? I thought about using the float, but I remembered that the flex display ignores any float :/…
-
-1
votes4
answers2279
viewsA: Responsive image
Well, after much study time, (and because I just remembered), I found the solution to the problem with responsive images. To solve the problem that I had in this case, it was enough that the parent…
-
0
votes2
answers54
viewsQ: Delay error in transition
I’m doing a CSS animation with Hover, but a problem has arisen, when giving the item the Hover, it first performs the transition in the first element within itself, and after that, it makes the…
-
0
votes2
answers51
viewsA: Perform multiple functions when the page loads
$(document).ready(){ //a chamada de todas as suas funções, ex: conecta(); imprimeConsole(); removeCache(); } It must be after configuration/definition of all functions, as one of the last, if not…
javascriptanswered Murilo Melo 2,272 -
2
votes2
answers78
viewsQ: Search script does not return results or errors
Well, I created a search script in PHP, however, it does not display results, and also does not display errors. Phomularius <form class="navbar-form navbar-right" method="post"…
-
3
votes1
answer49
viewsQ: Display only a maximum number of characters
My question, I believe, is quite simple, as I can do to display only a maximum amount of characters to the user, for example, 25 characters + "..." The idea is to limit the characters of these…
-
-1
votes2
answers503
viewsQ: Passing $_FILES in a registration function
Well, I’m thinking about a way to register items in a database, but I thought: "and if the item has an image ?" So I wrote a script to send this image, however, I don’t know if it’s correct or not…
-
0
votes1
answer56
viewsQ: Script to preview not working
I’m trying to preview the image, but I can’t. I created the following code in pure javascript: var imageFileInput = document.getElementById("fileUpload"); imageFileInput.onchange = function(event){…
-
2
votes3
answers52
viewsQ: Multiple foreign keys in a single query
Well, I’m having some problems creating a query in mysql that searches several tables in a single query, I searched here in the stack, I found some similar questions, but I couldn’t understand the…
-
0
votes1
answer35
viewsQ: Function to change Height with errors
184 function bannerPrincipal(){ 185 var bannerHolder = document.getElementById("banner-principal"); 186 var windowSize = window.innerHeight; 187 bannerHolder.css.height == windowSize+"px"; 188…
-
0
votes1
answer25
viewsQ: foreign key problems when selecting items
Well, I’m trying to select all items from two separate listings, but without success, I’m using: Query select t*, d.id as id_discvinculada from textos as t join disciplinas as d on…
-
0
votes1
answer22
viewsQ: Specific cell change in Mysql
Well, I am trying to change only a specific cell in Mysql using a PHP form, however, I cannot perform such action and no error is shown so I try to fix it, how can I fix the problem? Logic <?php…
-
0
votes2
answers35
viewsQ: Menu close reads target as Undefined
I am mounting a simple menu that ends when clicking on "Document", however, it appears that the target property cannot be read to Undefined "Uncaught TypeError: Cannot read property 'target' of…
-
0
votes1
answer636
viewsQ: How to create an infinite loop on a Carousel?
Well, I’m creating a Carousel, but it’s come to a point where I’m stuck because I don’t know how to do it, I need to create an infinite loop between the items inside the Carousel, how can I do that…
-
1
votes1
answer54
viewsQ: Carousel rotation, cannot read null "style" property
Well, I am trying to make a Carousel in JS vanilla, however, there is an error when creating the script part for the Carousel rotation JS //Cada Carousel var bannersHolders =…
-
2
votes1
answer30
viewsQ: defining sizes according to full load, or resize a page
Well, I’m trying to set a width according to the width of the screen of the user browser, however, in the console is not pointed any error, but the code also does not run var bannersWidth =…
-
1
votes1
answer62
viewsQ: Empty vector displays the final result of the function
I am doing tests with array/vector and, as first display of the vector should be shown empty, as second, would come full. What is the problem, why it occurs ? and how can I correct ? <ul>…
-
0
votes1
answer61
viewsQ: Changing the identification data of an upload file
I am first trying to rename a file according to what the user provides us, however error occurs, but it is given as $_FILES["arquivo_foto"]["error"] -> 0 Sending script <?php $diretorioimagens…
-
3
votes2
answers27
viewsQ: Define size in px based on size in %
I’m having trouble developing a resize script function resizeImagePreview(){ var imageHolder = document.getElementById("image-holder"); imageHolder.style.width = "25%";…
javascriptasked Murilo Melo 2,272 -
4
votes2
answers7451
viewsQ: .Empty() in javascript, how to do?
I am using a preview script for images created with jquery, but I want to perform it in Javascript Vanilla, I am looking for a way to replace the variable command All.Empty(); however I could not…