Posts by Paulo Sérgio Filho • 122 points
30 posts
-
2
votes1
answer267
viewsQ: How to optimize a Node.js script
Hello, I would like the help of users to optimize a script I made in Node.js. I do not understand much of the language and I made a very amateur system that is a little slow. var express =…
-
0
votes1
answer131
viewsQ: Global variable inside require Node.js
I have the following function: function album(music){ var album; request('http://localhost/socket/source.php?music='+music+'', function (error, response, result){ data = JSON.parse(result); album =…
-
0
votes1
answer92
viewsQ: How to list all xml for php
Good evening. I have the following xml file: <MusicHistory CompactMode="1"> <Item0 Block="2018-02-11T23:00:00" Folder="Musicas" Music="Zara Larsson - So Good" Composer="" Comment=""…
-
4
votes3
answers1038
viewsQ: Turn m:s into seconds
How to turn a value into seconds? For example: 01:32, in case it would be 92 seconds. I would like to do this in php, I already searched the net but I can not find anything.
phpasked Paulo Sérgio Filho 122 -
0
votes1
answer153
viewsQ: Return value with Xmlhttprequest
dataPacket: function(type){ aTurn.packet = new XMLHttpRequest(); aTurn.packet.open('GET', 'teste.php', true); aTurn.packet.send(); aTurn.packet.onreadystatechange = function(){…
-
0
votes1
answer56
viewsQ: Counter from a value
Hello, I am creating a time counter, to make a music progress bar. I am using the following code. However, this counter starts counting at 00:00 as obviously, but I would like it to start counting…
-
1
votes1
answer462
viewsQ: Convert mm:ss to milliseconds
I would like to convert the value mm:ss into milliseconds, could guide me on how to do this? var time = '03:51'; var mili = ?
-
0
votes1
answer178
viewsQ: Remove category posts specifies wordpress
Hello, I downloaded the theme dooplay and I’m trying to remove from a widget posts that are category 764, but I have not had success so far, could help me in this? This is the original query code:…
-
2
votes1
answer104
viewsQ: Search in multiple tables
Hi, I’m trying to search 3 different tables, check my code: $buscando = $pdo->query("SELECT * FROM filmes WHERE nome LIKE '%$busca%' AND status='ativo' ORDER BY nome ASC"); The tables would be:…
-
0
votes1
answer203
viewsQ: How to make a jquery global variable?
I have this following variable: Site = { Alert: function(titulo, conteudo, data){ var id = Math.round(Math.random()*10000); } } I’d like to access it anywhere in my code, specifically here: User = {…
jqueryasked Paulo Sérgio Filho 122 -
0
votes1
answer35
viewsQ: Query revision
I have this query in order to list users with more comments, however, it cannot display users with the banned column=true. SELECT * FROM usuarios a INNER JOIN topicos_comentarios b ON a.usuario =…
-
1
votes3
answers76
viewsQ: How to do sub-consultation with Pdo
I would like to perform a sub-query within that query: $ranking = $pdo->query("SELECT * FROM usuarios_emblemas GROUP BY usuario ORDER BY count(usuario) DESC LIMIT 3"); It would be to block the…
-
1
votes1
answer58
viewsQ: query Pdo error (Sort by Count)
I am trying to make a ranking based on the amount of coins each. In descending order. I used this query in Pdo: $ranking = $pdo->query("SELECT * FROM usuarios WHERE banido='false' GROUP BY…
-
0
votes1
answer102
viewsQ: Know Count() output in query
I have the following query on Pdo: $ranking = $pdo->query("SELECT * FROM usuarios GROUP BY moedas ORDER BY count(moedas) DESC LIMIT 3"); I use this to make a ranking to know users with more…
-
0
votes1
answer2869
viewsQ: Calculate percentage of votes
Hello, I have a voting system for a news that contains like and deslike. However, I would like to calculate a percentage of this news, based on the amount of votes, positive or negative. For…
phpasked Paulo Sérgio Filho 122 -
0
votes1
answer49
viewsQ: Merge upload and input ajax
I have this form: <form id="formForum" autocomplete="off"> <div class="boxContent"> <div class="form" style="margin-top: 0"> <div class="profile" style="background-image:…
-
0
votes1
answer41
viewsQ: Function simulating if in php
It would be possible to minimize or make a function that has the same functioning of this code below? if($rank <= 50){ echo 'Descolorido'; } else if($rank <= 100){ echo 'Azul Bebê'; } else…
phpasked Paulo Sérgio Filho 122 -
0
votes1
answer160
viewsQ: Know the position on a listing
I’m wearing this query to know a user’s feedback quantity: $comentarios = $pdo->query("SELECT * FROM topicos_comentarios WHERE autor='".$ver['autor']."'")->rowCount(); However, I would like to…
-
-1
votes1
answer77
viewsQ: How to minimize jquery script
Is there any way to minimize/simplify this script in jquery? $("#men").click(function() { $("#men").addClass('active-men').addClass('selected');…
jqueryasked Paulo Sérgio Filho 122 -
0
votes1
answer89
viewsQ: rowCount does not return zero
I have this script: <?php include 'config.php'; if(isset($_POST)){ $user = isset($_POST['user']) ? strip_tags($_POST['user']) : 'HabboColorFS'; $rank = $pdo->query("SELECT * FROM…
-
1
votes2
answers873
viewsQ: View weekdays in order with PHP
I have this html: <div class="base-semana"> <div class="dia-semana"> <div class="dial"> DIA DA SEMANA </div> </div> </div> The Divs with "day-week" class have 7…
phpasked Paulo Sérgio Filho 122 -
0
votes1
answer461
viewsQ: Insert multiple html with ajax
I have the following code in jquery: musicas: function(){ $.ajax({ url: 'assets/includes/oloco.php', type: 'GET', dataType: 'json', beforeSend: function(){ efeito.inicio(); }, success:…
-
-1
votes1
answer44
viewsQ: Error in Where with variable
$inter = $pdo->query("SELECT * FROM noticias WHERE status = 'ativo' AND fixo != 's' AND comentarios != 's' ORDER BY id DESC LIMIT 5"); $i = 1; $num = ''; while($in = $inter->fetch()) { if($i…
phpasked Paulo Sérgio Filho 122 -
0
votes2
answers112
viewsQ: How to select the first xml element
I have the following xml: <SONG> <PLAYEDAT>1487812025</PLAYEDAT> <TITLE>John Legend - Love Me Now</TITLE> <METADATA> <TIT2>John Legend - Love Me…
-
1
votes1
answer196
viewsQ: Php file to work alone automatically
I have a php file that sends information to: http://air.radiotime.com/Playing.ashx?partnerId=PARTNERID&partnerKey=PARTNERKEY&id=ID&title=MUSICA&artist=ARTISTA However, it only sends…
-
0
votes1
answer171
viewsQ: Change properties of a div with one click
I have the following html: <div id="personalizada"> <i class="fa fa-plus" aria-hidden="true"></i> </div> <div class="balao"></div> I would like when I click…
-
5
votes2
answers4213
viewsQ: Convert hour format in seconds
I have a value displayed by a json: "tempoShoutcast":"03:11:48" How can I turn this format into seconds?
-
1
votes1
answer94
viewsQ: SYNTAX ERROR WHERE - PHP
I have the following code in php: $sql = "SELECT * FROM musicas_curtidas GROUP BY musica ORDER BY count(musica) WHERE musica != 'Rádio Turn - Você em primeiro lugar!' AND WHERE musica != 'Radio Turn…
-
1
votes1
answer242
viewsQ: Change php value with variable in url?
I have the following code: $ip = 'stream.radioturn.com.br'; $port = '8000'; I would like to change the same values with a variable in the url, for example: app.php?ip=ipqualquer.com.br&port=2531…
phpasked Paulo Sérgio Filho 122 -
5
votes3
answers998
viewsQ: Responsive font according to text size
How can I make a source responsive according to the size of the text? I have a website: radioturn.com.br The name of the song is constantly updated, I would like to remove the mark and let it stand…