Posts by Charles Fay • 1,197 points
43 posts
-
1
votes0
answers373
viewsQ: What size should I set to store a Base64 string in a VARCHAR field?
I need to store an image that is in Base64 in the mysql database... My doubts are: 1 - I must compress this string before saving to the bank, if yes what is the best way to do this? 1.2 - The Base64…
-
4
votes2
answers87
viewsQ: Select only 24 records per day
I need help to elaborate a query that selects only 24 records per day. For example: Day 1: 100 records Day 2: 50 records Day 3: 34 records I want to take only 24 of each day: 1, 2 and 3...(in this…
mysqlasked Charles Fay 1,197 -
3
votes1
answer80
viewsA: Load pages without images and css in Phantomjs
After much research I found the solution here: https://www.scrapehero.com/how-to-increase-web-scraping-speed-using-puppeteer/ Basically, it’s this chunk of code that points to the font, css, and…
-
0
votes1
answer80
viewsQ: Load pages without images and css in Phantomjs
Does anyone know any way to load a page faster using phantomjs... Because I have a bot that goes through certain pages through pagination, however I need a way to improve the loading time of these…
-
0
votes2
answers721
viewsQ: How to change the main URL in Codeigniter
I need to change the URL of a site in Codigniter, at the site root: "public_html" has the "application" folder of the Framework and has the folder: "site_new" which is where the current site is.…
-
2
votes1
answer1695
viewsA: Uninstall plugin in sublime
For those who need to remove a plugin in sublime, follow the guidelines below: Ctrl + shift + p *Type: package control: remove package **Select the plugin you want to remove... That’s it, thank you!…
sublime-textanswered Charles Fay 1,197 -
-1
votes1
answer1695
viewsQ: Uninstall plugin in sublime
I need to remove the sublime SFTP plugin. I already uninstalled and installed again, and I’m deploying by Fillezila, but sublime keeps trying to connect to FTP every time... I need to remove this…
sublime-textasked Charles Fay 1,197 -
0
votes0
answers277
viewsQ: How to open the Messenger Customer Chat Plugin from another Facebook button?
I’m implementing the Facebook Chat plugin on a website, where it renders an iframe on the page. I wonder if it is possible to use a button of my page to do the same action of the button that opens…
-
3
votes1
answer715
viewsQ: How to increase performance in PHP?
If I increase the memory_limit (default: 256MB) in PHP settings, my application will run faster or I will end up losing performance because it consumes more server CPU processing?…
-
1
votes1
answer450
viewsQ: In which programming language does a Crawler/scrapper scan the DOM faster?
I developed a script in which I use the class DOMDocument PHP to make a Crawler on a third party website. The speed of script does not meet the expected goal, I would like to know in which…
-
0
votes3
answers868
viewsQ: Catch string inside <a> tag without attributes
I’m using gift in PHP to get the link of a tag , where through "getattribute" I can get that link by the href attribute. Script by Crawler: <?php //carregamento da url $dom = new DOMDocument();…
-
0
votes0
answers33
viewsQ: Watermark with images in production
I need to put watermark on images that are already in production, I did a search and only found ways to do this while uploading the image, but would have to apply the watermark during image…
phpasked Charles Fay 1,197 -
2
votes2
answers3195
viewsQ: Run JS on third party page
I would like to know all possible ways how to run a JS(site) on a third-party page, where my real intention is to manipulate the frontend even to give me the custom view of a page x. I can already…
-
0
votes2
answers1791
viewsQ: Catch string inside PHP div
I have a variable that stores an HTML block: $qtd = '<div id="itens"> <span> 435 itens encontrados </span> </div>'; I need to get the text that’s inside this div and this…
phpasked Charles Fay 1,197 -
2
votes2
answers636
viewsQ: How to call a function only 1 time with mouse scroll?
I need when the user scrolls the mouse up or down, to trigger a specific function only once... I am using the following code but is not meeting my need: var stopScroll = false;…
-
1
votes1
answer77
viewsQ: Remove cloned DIV by clicking button
Some time ago I asked a question about how to clone a form DIV when clicking a button ( + )... I got the following answer that helped me at the time. REPLY Now, I need to add a new button ( - ) so…
-
4
votes1
answer2452
viewsQ: Swap/Edit word already translated in Wordpress
I am setting up a virtual store Woocommerce (Wordpress) and recently installed a translation pt_BR. It’s all translated correctly, except for the term: QUICK VIEW which appears translated as -…
-
0
votes3
answers76
viewsQ: How to get only strings containing the word "x"
I’m picking up through a parser with PHP DOM all the links on a page. I need to pick up only the links that contain the word "buy-Toyota" I was using the following code, but suddenly it stopped…
-
16
votes1
answer7765
viewsQ: Show image under another with css Hover
How do I make when I hover under an image, another image appears on top with opacity... For example: I have a div with the cover image of a movie, when I move the mouse under the div, I would like…
-
0
votes2
answers232
viewsA: Restrict access to a folder on the server after login
In fact I did so: But the credits are for @Mastria $user = $_SESSION['login']; //Caso o usuário não esteja autenticado, abre tela de login if ( !isset($_SESSION['login']) and…
-
2
votes2
answers232
viewsQ: Restrict access to a folder on the server after login
I have the following problem: I have 1 application used by 5 users... For each user there is a folder on the server, because for each one there is a configuration and some files are different, so…
-
12
votes3
answers17172
viewsQ: How to pick up content within a string up to a "bar/" character
I got the following String: $link = '13542345/essa_e_minhastring'; How do I take only the value up to the "/" bar and ignore the rest ? I would like to assign this value to a variable. I’m using the…
phpasked Charles Fay 1,197 -
0
votes4
answers93
viewsQ: Help with programming logic
I have a div that is composed of some text fields, and a button that calls a js function that duplicates that div if the user clicks... Example: Code: <div id="duplicar"> <!--.....aqui vai…
phpasked Charles Fay 1,197 -
6
votes5
answers2441
viewsQ: How to concatenate String within a repeat loop?
I need to put some values together string. How do I concatenate values into one string with a loop of repetition. Example: for($c=0; $c < $tam; $c++){ //concatenar sempre o valor $minhastring =…
-
3
votes3
answers8039
viewsQ: Search field inside select box how to do?
I would like to know if there is any way to put a search field inside a select box, because for example...I have a selectbox with +3000 thousand registered items, there arises my need to have a…
-
5
votes1
answer2348
viewsQ: Problem with accentuation when generating PDF with dompdf
I am generating a PDF report using the dompdf API, and the accentuation words are not being displayed correctly. I put the charset='utf-8' tag inside the head, but it does not solve the problem…
-
1
votes3
answers1664
viewsQ: Abbreviate content inside cell (HTML table)
I have a table that is composed of values that are pulled from the database.... This table has the predefined size, and it turns out that when the value pulled from the bank is greater than the…
-
1
votes3
answers6114
viewsA: Display message after MYSQL query return empty
With the reply of @Everson Moura I formulated the following logic: 1-Count the number of lines of the query 2-If the number of lines is == 0, then: displays message My code stayed: $chave =…
-
1
votes3
answers6114
viewsQ: Display message after MYSQL query return empty
I have a script that makes a query in the database and displays the result... I would like when the query returns empty, a message is displayed to the user. The code: <?php //variavel dinamica…
-
10
votes3
answers11643
viewsQ: How to convert code block into single line?
I need to convert certain blocks of code into a single line. How can I do that? I’m using Notepad++
-
0
votes1
answer9931
viewsQ: Select like (2 different parameters)
I have a table with several cars, I need to get only the ones I need. Example: goal fox Parati Kombi Voyage I want to catch only goal and Kombi. I am using the following command to pick up where GOL…
-
3
votes1
answer21225
viewsQ: Parse error problem: syntax error, Unexpected T_VARIABLE
I’m having trouble inserting a variable into an array... I did some research here and I couldn’t find any similar question that could help me solve this, so I’m creating this. The mistake: Parse…
phpasked Charles Fay 1,197 -
2
votes2
answers9672
viewsA: Play alert sound after database query (PHP + MYSQL)
I found the answer: Instead of using my javascript function, I only used the line: <embed src='alert.mp3'width='1' height='1'> And that solved the problem. Final code: <?php //seleciona o…
-
4
votes2
answers9672
viewsQ: Play alert sound after database query (PHP + MYSQL)
I need a warning sound to be played after a bank appointment... Logical example: NUM_LINHAS = TABLE ROW NUMBER SE (NUM_LINHAS > 0){ play(); } My Java function that plays sound: <audio…
-
1
votes1
answer4011
viewsQ: Update sql with 2 conditions
I have a table with the column STATURE This column consists of 3 possible values: NEW, VISUALIZED, DISCARDED I have a function where I need to implement an SQL row that updates my table and changes…
-
2
votes2
answers2256
viewsQ: Break line after semicolon ;
I have a text file (word) composed of four pages with several email addresses on each side separated by comma and dot. Is that way: [email protected]; [email protected]; [email protected];…
-
1
votes2
answers2392
viewsQ: How to make setTimeout run "infinitely"
I need a function run every 2 minutes. I found in this link a solution to my need: Link The Code below, calls an Alert after 5 seconds while leaving the mouse stationary. Observing I put 5 seconds…
-
2
votes2
answers713
viewsA: Problem with UPDATE mysql
I’ve solved the mystery! *If someone has this same problem, follow here the solution I found: Instead of using: WHERE campo = 'link'; I used: WHERE campo like '%link%'; Ready! That way the table was…
-
1
votes2
answers713
viewsQ: Problem with UPDATE mysql
I have a problem executing an UPDATE command in my Database... My table has 2 columns: -Column 1: link (PK) varchar -Column 2: varchar status I need to update only the "statuz" field of my table.…
-
0
votes3
answers664
viewsQ: Problem with window.open() JS
I have a table composed of 3 columns: link, status, action. In the action column, I have 2 links that will serve as "buttons": VIEW & DISCARD This table has on average +100 lines... I need that…
-
3
votes1
answer1380
viewsQ: Clone Input text and pass the value of cloned input via POST
I need to clone an Input text by clicking on a "+" button and then pass the value of this cloned field via POST to the other form data... I’m using a Javascript function to make the clones…
-
4
votes1
answer299
viewsQ: Help with PHP repeat structure - PARSER - simple_html_dom.php
I’m doing a parser with simple_html_dom.php where I pull all the links from a given page. I can pull the links and assign to an array, here comes the problem: this page has a maximum display limit…
-
1
votes0
answers308
viewsQ: Page monitoring with PHP
Hello, I wonder if there is any way to monitor a page of a particular site via PHP, constantly...and signal as soon as the page is updated. I found a desktop program that does this…
phpasked Charles Fay 1,197