Posts by Leo Letto • 3,303 points
170 posts
-
0
votes1
answer448
viewsQ: How to prepare the content of a JSON for download?
In a certain area of my site, the user can select some rows of the database to export them to a JSON, after selecting all that want an Ajax call is made to get the data from it, but within the…
-
0
votes1
answer1496
viewsQ: How do I get the share list for a Facebook post?
I’m trying to get a list of shares from a post but it looks like something’s wrong; When I use the 1365084196885691/sharedpostsin the Facebook API I get the following JSON : { "data": [ { "story":…
-
0
votes1
answer146
viewsQ: How to read and block this TXT with PHP?
How can I read a TXT file in this format to insert into an episode table? This is the structure: temporada{ numero_episodio - nome_do_episodio } A practical example: 1{ 1 - Episódio número 1 na 1ª…
-
0
votes1
answer119
viewsQ: How to create an interaction between 3 pages?
Such interaction will work as a type of remote control, exemplifying would be something like: Page A, B and C On page A the user has access to certain commands. Page B is responsible for receiving…
-
5
votes2
answers658
viewsQ: Ask and store user permission to use full-screen?
Apps usually asks for permission to use Smartphone features like microphone, camera... I wonder if it is possible to do the same on a page so that the Fullscreen mode is activated automatically…
-
0
votes1
answer1255
viewsQ: Force link opening in mobile browser and not on facebook?
When sharing the link of a page on facebook either by messenger or in some post when the user clicks, the same will open in the browser of facebook itself, which in turn is giving some "weird" bugs…
-
3
votes2
answers985
viewsQ: How to make this icon with pure CSS?
You can do the image icon with CSS below? If yes, how can I? I tried to do it like this, but I can’t create the third page, I can only do two: .pages:before{ content: ""; width:25px; height:20px;…
-
10
votes1
answer501
viewsQ: Live on Facebook using Ffmpeg?
I’m using ffmpeg to try to stream a live on Facebook, using the function concat to stream multiple video files, but at the end of the first file, Facebook hangs and does not continue playing the…
-
2
votes2
answers686
viewsQ: Distinguish equal fields in a SELECT with LEFT JOIN
In a SELECT done in two tables with similar fields I would like to distinguish the field of each table when displaying the results. For example: $sql = BD::conn()->prepare("SELECT a.*, b.* FROM…
-
-2
votes1
answer207
viewsQ: What is the error in this while PHP?
The code below selects all the results whose thumbnail of the video has not yet been created and if it has not been, it creates a new one, but I am getting an error that I cannot find the solution:…
-
1
votes1
answer75
viewsQ: Why doesn’t this function work in Mobile Browser?
I’m using the code below to search for data in a json, and it works perfectly in Chrome and Firefox, but in mobile browser it doesn’t work, and just doesn’t return anything: function…
-
1
votes1
answer38
viewsQ: List tables to make recommendations to the customer?
I have a table "likes", "commented" and "visited", each time a user likes, comments or visits a particular book on my page a record is inserted in the database for such: Table likes:…
-
4
votes2
answers558
viewsQ: Sort by the number of repetitions in a column?
In a query in Mysql I need to select the results and sort the results based on the amount they repeat using the column id_livro, for example: My table comments: +----------------+-------------+ |…
-
4
votes2
answers629
viewsQ: Multiple Access-Control-Allow-Origin domains
I have a page that serves some data in JSON format based on the data received from the database, but I need to free access so that the mobile version can also obtain such data, as I can put more…
-
0
votes4
answers1052
viewsQ: How to mount 3-column CSS mosaic?
I am having difficulties to assemble the mosaic of the example below for the mobile version of my site The version in orientation:portrait must be something similar to that:…
-
2
votes2
answers376
viewsA: Dynamic Css background URL
You can create a PHP page to generate dynamic CSS according to your need as follows: Create the.php style page Put the header the same for css header("Content-type: text/css") Example: <?php…
-
1
votes1
answer2784
viewsQ: Domain pointing to a port IP?
In cPanel with a Record Type A I can only specify the IP to which the domain should be routed, this will by default redirect to port 80, but if the destination settings are running on a port other…
-
3
votes1
answer757
viewsA: Block Curl access to my server?
If you have access to htaccess file add that line to it: <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "www.seudominio.com" </IfModule> If not, you will have to add…
-
3
votes2
answers972
viewsQ: Point to a folder before DOCUMENT ROOT?
Below follows the folder structure: /home/web/site/public_html If I give an echo $_SERVER['DOCUMENT_ROOT'] I’ll get the path to public_html, but I’d like to make some files inaccessible directly by…
-
2
votes3
answers2135
viewsQ: How to put an element in Fullscreen
I searched a little about the same on google and most people talk to use position: absolute; z-index:9999; width:100%; height:100%; top:0; left:0; However the code above only works to put in…
-
2
votes2
answers2141
viewsQ: UPDATE in multiple tables with the same column?
Let’s imagine a scenario where I need to give a update in 10 different tables in the same column in all of them updating a certain data, the syntax below will work? UPDATE tab1, tab2, tab3... SET…
-
1
votes1
answer37
viewsQ: Help with SELECT returns
The SELECT below when run directly in Phpmyadmin, returns all the results I want, but when I use in PHP function it comes empty: $user = $_SESSION["usuario"]["id"]; $sel =…
-
3
votes1
answer341
viewsQ: Sort an object’s keys by simulating ORDER BY ASC NAME
In mysql in command SELECT * FROM minha-tabela ORDER BY nome ASC the list will be returned with all results ordered ascendingly based on the column nome, i wonder how I can do the same with a js…
-
4
votes1
answer31
viewsA: Javascript function is giving error
Yours is not being closed function ChangeSituacao(){ var vRads = document.getElementsByName('ind_situacao'); for(var i = 0; i < vRads.Length; i++){ alert(vRads[i].checked); } //Você esqueceu de…
javascriptanswered Leo Letto 3,303 -
1
votes1
answer367
viewsQ: Check the existence of an element by the Value attribute?
I need to basically check if a certain div exists within a list, the structure is like this: <div class="content" id="divCheck"> <div class="filho" value="1"></div> <div…
-
2
votes3
answers58
viewsQ: What’s wrong with this js code?
The first part of the code separates the URL into / This is the current URL www.meudominio.com/category/action var url_atual = decodeURI(window.location.href); var replace_url =…
-
1
votes1
answer50
viewsQ: Protect script with user data?
Currently on my page I load some scripts returned by PHP as follows: $(".div").html($("<script />", { src: 'http://www.dominio.com/functions/dados.php?user='+xxxx+'&acao='+xxxx+'' }));…
-
1
votes1
answer40
viewsQ: How will this if be interpreted?
I have a function that performs different actions on the page according to the callback passed to her, I am using if to verify which callback called on function('callback') but now I needed to do an…
-
2
votes2
answers1193
viewsA: How to exchange the position (css) attribute of a div
Assuming you don’t know the offset (position in the scroll of your element) we first need to discover it: //detecta scroll na janela $(window).on("scroll", function() { var retangulo =…
-
5
votes3
answers350
viewsA: Selecting src from an input using ID in Jquery
You could use the . attr like this: if($('#img').attr('src') != ""){ } This way it will check if the src attribute of your image element is not empty and if it is not if it will be true, otherwise…
-
0
votes1
answer75
viewsA: Do not show file in plot bar
Activate the mod_rewrite in Apache, it is usually already activated. Use the following command: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^admin/?$ admin/index.php [NC,L]…
-
3
votes3
answers1793
views -
9
votes2
answers300
viewsQ: Is it possible to do this effect with CSS?
Indeed demonstrated in the video below Sony Spherize makes it seem as if the photo character is "breathing", there is some way to do it the same, or simulate something similar to CSS? Link to the…
-
2
votes0
answers28
viewsQ: Select in two tables with clause WHERE?
I need to check if a particular e-mail exists in two tables, if it exists in one of the two tables the user will not be able to register, facilitating would be the code below, the column email is…
-
5
votes2
answers768
viewsQ: How to make a gradient at the ends of a line, with CSS?
Probably this may be a repeated question, but since I don’t know the name of the effect I can’t find anything on it, the effect I want to do on the edge is exactly the same as the image below: How…
-
1
votes1
answer44
viewsA: SELECT user by Date
Come on, since you didn’t specify the average amount of emails I’ll create a simple example of how to do this: I’ll use PDO for the appointments, but you can do as you like $select =…
-
1
votes2
answers613
viewsA: Hide a button until 2 input is filled
You can apply a keyup to the input and go checking their value for example: $(document).on('keyup', '.form input', function(){ var val1 = $('.input1').val(); var val2 = $('.input2').val(); if(val1…
-
0
votes0
answers223
viewsQ: Split and swap the array key?
When using the function split in a string obviously the keys will be enumerated from 0 to ... but I would like to choose which key should be, using just one of the words that will be in the string,…
-
7
votes2
answers1078
viewsQ: Render subtitles in video with ffmpeg?
I have some subtitle files that are separate from their respective videos, and I would like to join them using the code below: ffmpeg -i videoSemLegenda.mp4 -i legenda.vtt -c copy -c:s mov_text…
-
8
votes1
answer713
viewsQ: How to put the scrollbar inside the body?
I stylized the scrollbar of my site for Webkit, and I put the background of the track as Transparent, but I would like Thumb to overlap with the body content, simulating a position effect Absolute,…
-
3
votes1
answer1996
viewsQ: Advantages and disadvantages of using PHP Video Stream?
Researching a little about the performance of videos for stream, I found a solution that fits me well, that would use a PHP script to send the video in parts to the player, and such method would not…
-
0
votes1
answer472
viewsQ: Upload images using PHP?
I have a page that loads about 90% of the content based on images, the size of the images varies from 20kb up to 150kb depending on the size of the page, to improve the loading performance of the…
-
1
votes0
answers67
viewsQ: Protocols for multimedia transfer?
I’m developing a video site, and these are stored on a windows server, currently using http://path.mp4 to fetch the video files for the HTML5 player, but then I wondered if HTTP is appropriate for…
-
3
votes1
answer398
viewsA: Stylized Div with CSS
You can use the background: linear-gradient You can do so to generate different in the background: background-color:#4fd8e8; background-image: linear-gradient(to bottom, rgba(255,255,255,.1),…
-
1
votes2
answers309
views -
1
votes0
answers42
viewsQ: Reset functions?
On a supposed page where all the content all the site is loaded in dynamic Ivs without the refresh need, when closing one of these Ivs it is possible to reset the Function that added the content to…
-
7
votes1
answer1569
viewsA: When clicking button, increase or decrease height of a div
Try with the Animate like this $('#seuBotao').on('click', function(){ if($('.sua-div').height() == 30){ $('.sua-div').animate({"height" : "200px"}, 200); }else{ $('.sua-div').animate({"height" :…
-
1
votes3
answers1270
viewsA: How do I not display the directory list?
Add this line at the beginning of your htaccess and you’re done Options All -Indexes
-
2
votes3
answers87
viewsA: How to make animation to show the rest of the paragraph?
A good way to display / hide would be using toggle $('#detalhes').click(function(){ $('.minhaDiv').slideToggle(400); }); Where 400 is the time in ms of animation; Or you can use the Animate:…
-
2
votes1
answer443
viewsA: Fill a list with Json return
I don’t know how your json is, but if all the data is returned at once you can use each to go through it and add row by row in the value table you should return the value within each, if it’s a…