Posts by Thomerson Roncally • 839 points
24 posts
-
0
votes1
answer81
viewsQ: Doubt about LAMP development environment with Vagrant and provisioning with Puppet
After some problems regarding the incompatibility of locally developed applications with the server, I decided to use the tool Vagrant. I followed some tutorials, read your documentation, created my…
-
5
votes2
answers463
viewsQ: Toggle text and class of a link when clicked - jQuery
I’m trying to make the delegation an event click There is a link within a table, how this jsFiddle example shows: The result obtained as you can see, is: By clicking on the link "Activate", the…
-
5
votes2
answers1637
viewsQ: Force text to be downloaded in a format accepted by Msword with PHP?
I’d like to know how to force the download of a file, with some extension accepted by Microsoft Word, through function header. I searched a few times, tested the MIME types I found, like the ones…
-
3
votes1
answer3318
viewsQ: How to improve the quality of the saved image?
I use the tool html2canvas in a project to print a certain area of my code and save it as an image. I tried saving in the following formats, JPEG and PNG, but both are of the same quality, I would…
-
6
votes1
answer5665
viewsQ: Resize an image in a canvas element with js
Problem Image resizing with Javascript Possible solution Use the widget canvas to redesign the image, resize it and then render the image again. Below will be cited 2 cases of use merely…
-
1
votes5
answers1659
viewsA: Default parameters
Look, I’m not saying it’s the right one, but whenever I need to use parameters with values default, I try to leave them last in the function, as follows: function exemplo ($arg1, $arg2 = null) { //…
-
5
votes4
answers7944
viewsA: How to take print (screenshot) from a web page?
You can use the library html2canvas that fits exactly what you want, because it "print" any division of an html page. Here you can find the examples of use, but I’ll leave a snippet of code below to…
-
1
votes1
answer890
viewsQ: Javascript - Return image dimensions
Explanation Hello guys, I’m uploading an image, with Javascript, using the following code: $('#image-background').on("change", function(e) { var arq = URL.createObjectURL(e.target.files[0]);…
-
0
votes1
answer161
viewsQ: Changing a DIV background in iframe
Following staff, I have a form to upload any image... <form id="form-upload" enctype="multipart/form-data" action="url" method="post"> <input type="file" name="image" id="image" />…
-
8
votes1
answer6771
viewsQ: Structuring the PHP Router class with MVC
A friendly url of the type: www.meusite.com.br/controlador/metodo/argumentos Is treated in my class Request, where I "explode" the url, separating it into segments, which are respectively,…
-
0
votes1
answer429
viewsQ: Image positioning in div with drag and drop
Good morning, what I’m looking to do is, a system where the user upload of an image and have a preview of how the image will be positioned in the div, may move it to the position it deems best. It’s…
-
3
votes2
answers1392
viewsQ: "Transform" one element into another with Jquery
In my script, I have one iframe. <iframe id="result" name="result" src="url_do_documento" sandbox="allow-same-origin"></iframe> The file q o iframe reference, contains an element h1, as…
-
3
votes1
answer458
viewsQ: Handle ajax request returned data with Jquery
My request: $.post( "http://painel.thomerson.com.br/imagens/escolher-template", $(this).serialize(), function(data){ $("#Resultado").html(data); } ); What is happening is that by inserting the…
-
0
votes1
answer4718
viewsQ: How to update an iframe without refreshing the page?
I’m making a system, more precisely, a code editor HTML and CSS online, where I need to send two fields via POST to a php page, which will process the data and save it in a random name html file,…
-
1
votes1
answer2978
viewsQ: Customize Android Progressbar
I would like to develop a ProgressBar customized to use in my application, but I’m not sure how to do this. It is necessary to create a sub-class of the ProgressBar? You can only do it in xml? I’d…
-
0
votes8
answers481
viewsA: I can’t learn syntax for
Well, the first step is to learn what is scope, which according to Maurício Samy Silva (the renowned Maujor), in Javascript: A very important concept when declaring a variable is the so-called scope…
-
0
votes1
answer2757
viewsQ: Run radio player with extension . m3u8 on Html5
Can anyone give me an example of how to run a radio playlist in the . m3u8 extension with an audio player on Html5? This appears when informing the correct MIME…
-
2
votes2
answers304
viewsA: How to access specific <ul> items with :Nth-Child()?
To customize only the even items you would use the following pseudo-selector, li:nth-child(even){} ou li:nth-child(2n){} To customize only the odd items you would use this other, li:nth-child(odd){}…
-
3
votes2
answers89
viewsQ: PHP settings required for local server
I’m starting development in PHP, and I’ve already started to have some incompatibilities in my codes. I say as a matter of something working locally and when I upload to the server, something goes…
-
4
votes1
answer508
viewsQ: Discover an array key by the given value?
I wish that through a given value I could return the array key. Example: $array = array("primeiro" => 1, "segundo" => 2, "terceiro" => 3); to find out if the value exists in the array there…
phpasked Thomerson Roncally 839 -
5
votes1
answer7442
viewsQ: Warning when trying session_start(); PHP
Does anyone know what this Warning might be? Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at *caminho*) in *caminho* on…
-
3
votes1
answer1419
viewsQ: How to make a script run automatically?
I’m making a script for sending of emails to subscribers, as a newsletter, but I need it to run automatically and this execution is hourly. As my operating system is the Windows and initially want…
-
2
votes1
answer90
viewsQ: Doubt, query does not work exactly as I want... PHP
I have a table in the database called emails, with the following fields: id subject body e status (0, para não enviado, ou 1, para enviado). I was making a query to recover only the lines that have…
-
7
votes1
answer101
viewsA: Am I connecting the bank with PDO the right way?
It is in the way, the syntax for connection to the Pdo database is given as follows: $pdo = new PDO(dsn, user, password, options); Being dsn the connection string with the database(yours is…