Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
11
votes2
answers1616
viewsA: What is the use of the pseudo class :root?
The :root in html documents will always refer to the element <html>, because even if you create a "custom" element instead of <html> the browser engine will always generate HTML again.…
-
2
votes2
answers211
viewsA: Alternative to the Event Trainer that fires on completion
A simple jQuery lib is https://github.com/aamirafridi/jQuery.Marquee Just call $("seu seletor(es)").marquee(); inside $(function() {...}) or $.ready(function() {...}) and apply overflow: hidden;: To…
-
1
votes1
answer655
viewsA: How to make my webview open links from other apps
First you must define in your AndroidManifest.xml the filter: <intent-filter> <action android:name="android.intent.action.VIEW"/> <category…
androidanswered Guilherme Nascimento 98,651 -
2
votes1
answer60
viewsA: Form does not execute PHP script
The variable $_POST["take_file"] does not exist because you set it to input=file the correct one would be this: if (isset($_FILES["take_file"])){ You are also using the variable $_FILES['file'] in…
-
0
votes1
answer94
viewsA: Error in ajax when sending by mobile
Must be the lack of Encode in the variables: var dados = "&nome=" + encodeUri(nome) + "&email=" + encodeUri(email) + "&assunto=" + encodeUri(assunto) + "&mensagem=" +…
-
1
votes2
answers1034
viewsA: Nameerror: name 'input' is not defined
You must be using Python2 and not 3, to work in Python2 you must use raw_input Change this: number = int(input("Escolha um numero: ")) For: number = int(raw_input("Escolha um numero: ")) If you are…
-
0
votes1
answer653
viewsA: Error sending email form by PHP
Your echo ""; is empty, see: if($enviaremail){ $mgm = "E-MAIL ENVIADO COM SUCESSO! <br> O link será enviado para o e-mail fornecido no formulário"; echo " <meta http-equiv='refresh'…
-
9
votes3
answers7080
viewsA: In a list, what is the difference between append and extend?
append will add any list as an item foo = [1, 2, 3] foo.append([4, 5]) print foo Returns: [1, 2, 3, [4, 5]] extend the elements would be almost like a "merge" foo = [1, 2, 3] foo.extend([4, 5])…
-
9
votes5
answers15940
viewsA: How to create a directory in Python?
There is more than one function for this: os.path.mkdir creates a folder (os.mkdir if it’s Python3) os.makedirs creates folder(s) recursively The archive main.py is inside ./app then you can just…
-
4
votes2
answers54475
viewsA: Place Javascript function inside onclick
There’s no reason to put a whole script inside a single button It is possible? The answer is yes Is recommended? The answer is nay I’ll explain later why it’s not recommended. Inline example Even if…
-
3
votes2
answers1672
viewsA: Rotation of photos in PHP
The problem is that it is no use to rotate with PHP, you would have to create an intelligent algorithm to detect that the photo is either -90° or +90° or +180°, PHP will not be able to do it alone…
phpanswered Guilherme Nascimento 98,651 -
1
votes2
answers3918
viewsA: SOAP error after changing php from 5.3 to 5.5
Check whether the SoapClient is sending the user-agent, the error from what I read is PARSE and not of connection, see: SOAP-ERROR: Parsing WSDL: Couldn’t load So try this: $opts = array( 'http'…
-
4
votes3
answers833
viewsA: Balloons with tips for using the system (Tour)
Note that in addition to the name "tour" can be called step-by-step guide (step by step guide), search terms such as hightlight intro can also help @Renan has specified the http://introjs.com, the…
-
14
votes3
answers20664
viewsA: How to get user IP via Javascript?
You can use a function I tried so, but due to the time of the call against the time of the injection of the external script it is not possible to obtain so "synchronous": function getIp() { if…
-
4
votes2
answers135
viewsA: How to upload an image that can be updated but still has the same name?
To upload it is necessary that the <form> has the attribute enctype="multipart/form-data" and method="POST", as I explained in: Upload does not work $_FILES Undefined index error So for…
-
1
votes1
answer1817
viewsA: Install certificate .CER.PEM Linux Centos7
As stated in Soen you first need to convert pfx to be supported in apache, using openssl. First install it (if not installed): yum install openssl Navigate to the folder where the xxxx.pfx and then…
-
0
votes3
answers401
viewsA: How do I send a field just by ajax?
Since you’re wearing it serialize, you can concatenate the variables like this: FormData + "&idAparelho=" + idAparelho An example: $(function () { $("#visualizarAparelhos").submit(function (e) {…
-
2
votes2
answers1185
viewsA: Dynamic calculations php
I do not disagree with the use of eval, the problem is that if you do not say the data processing can occur problems in the input values which will go from being a mathematical operation to being a…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer434
viewsA: How to correct what is red?
It turned red because it doesn’t have as the variable x have the 3 values at the same time, you are using the operator &&: if (x == 7 && x == 13 && x == 19) It would be like…
android-studioanswered Guilherme Nascimento 98,651 -
2
votes2
answers396
viewsA: Recycle Bin, Draft and Pending Revision in wordpress, how do they work?
I believe that the EMPTY_TRASH_DAYS be only for when delete, this does not affect the "drafts", then simply remove from the post, but if I am mistaken believe that just remove the action…
-
2
votes3
answers214
viewsA: Javascript Check if it is safe
This answer is a addendum the response of @hugomg, summarizing the problem of eval is that the types of data that will be executed, in the question the example is not technically insecure, however…
-
2
votes2
answers79
viewsA: Stop Mutiplos clicks on Ubmit!
Just create a variable and within .submit(...); set the value true and with the event jqXHR.ajax.always setar false again, at the beginning of .submit add a if to check if you are already as true.…
-
4
votes1
answer403
viewsA: How to force ie10 to download page completely?
The fault is not well of IE, of course if compared to other browsers IE is more "precarious", but the problem most often are the multiple requests with session that "hold" the server and your IE…
-
2
votes2
answers264
viewsA: Add code before the </head> and after the <body>
Can use document.createElement with appendChild and insertBefore, to insert do this can do so: //Esta função é mais rapida que usar window.onload function readyDom(callback) { if…
javascriptanswered Guilherme Nascimento 98,651 -
2
votes3
answers2005
viewsA: Picking up content within multiple Ivs
Instead of .text(), use .html() along with .each, thus: $(function() { $("#testar").click(function() { var htmlStr = ""; $(".conteudo").each(function() { htmlStr += $(this).html(); });…
-
3
votes2
answers363
viewsA: Alternatives to Google Maps
To use the Openstreetmap you can download the https://github.com/osmdroid/osmdroid, go to the page and download the latest "release" https://github.com/osmdroid/osmdroid/releases (for example…
-
3
votes1
answer413
viewsA: Send address to search in google maps
Examples of use cited in https://developers.google.com/maps/documentation/android-api/intents Find nearby restaurants: Uri gmmIntentUri = Uri.parse("geo:0,0?q=restaurants"); Intent mapIntent = new…
-
1
votes3
answers2917
viewsA: How to call javascript function in Asp.net?
You don’t call it on Asp.net, Asp.net is back-end. You call it in html+javascript. In case the script seems to need onkeydown instead of onkeypress, but since I don’t know what the script does, so I…
-
1
votes1
answer107
viewsA: Firefox redirects to wyciwyg://url
I could not reproduce what happened with your code, I’m using Firefox 50 too, the document.write just delete page content and rewrite, for example: setInterval(function() { document.open();…
-
0
votes1
answer564
viewsA: Environment for HTML and PHP execution outside the Browser
I’m pretty sure you’re referring to https://github.com/cztomczak/phpdesktop I think it is not totally independent, requires either Chrome or embedded Internet Explorer: Download Chrome:…
-
2
votes1
answer582
viewsA: How to create "responsive layouts" on Android?
I don’t think you can work like Meteor in the scheme at Android, but Android has layouts that can be used by include, for example: Its Main Layout: <LinearLayout…
-
8
votes1
answer5696
viewsA: Download failure when trying to update plugins in Wordpress
The Wordpress uses the extensions Curl and Openssl to download the plugins, in case the extensions were disabled so: If it is windows: ;extension=php_curl.dll ;extension=php_openssl.dll If like-Unix…
-
7
votes2
answers331
viewsA: Should email HTML 5 still be done inside tables?
The Gmail is just one client, there are several like Thunderbird (Desktop), outlook.com (web), mail.yahoo.com (web) and each email system can render in a way, one of the biggest headaches of…
-
3
votes3
answers686
viewsA: How to change a text variable to number value?
Use parseFloat, for the parseInt will convert to integer and so will lose the pennies of value, should stay like this: $(document).ready(function(e) { $('.pizzadisponivel').click(function(e){…
-
2
votes1
answer5714
viewsA: Error Sorry, the page you are Looking for could not be found. in Arabic
The briefcase /public and the folder will not be considered a route, if you do this will appear: <?php Route::get('/', function () { return view('welcome'); }); Route::get('/public', function ()…
laravel-5answered Guilherme Nascimento 98,651 -
4
votes1
answer241
viewsA: Doubt about Maximum Execution time
Add set_time_limit(0); at the top of the script that is occurring the problem The documentation says that in safe mode this does not work, but if your php is updated maybe there is no more safe…
phpanswered Guilherme Nascimento 98,651 -
4
votes4
answers5885
viewsA: How to smooth the font with CSS in Chrome?
The -webkit-font-smoothing: antialiased; actually is a technique created for browser Safari for retina screens on Mac computers (OS X system) So much so that the version of this property for firefox…
-
0
votes2
answers297
viewsA: How to pause CSS animation while music is stopped?
An alternative without importing jQuery: var audio = document.getElementById("player"); var animacao = document.getElementById("animacao"); audio.addEventListener("click", function() { if…
-
3
votes1
answer3650
viewsA: CSS - Centralize li
The use of LI is wrong, LI is always son of UL, there can be a tag between them. Outside adjust this, you must fix the width, in case it seems that there are only 3 items, then 32% for each one…
-
4
votes3
answers193
viewsA: How do I open a DIV that occupies the entire internal space of the browser?
If you need to just open but not occupy the entire page screen, just view-port: var exemplo = document.getElementById("exemplo"); var chamar = document.getElementById("chamar"); chamar.onclick =…
javascriptanswered Guilherme Nascimento 98,651 -
23
votes1
answer8714
viewsA: Information Protection when inspecting code via browser
PHP nay difficult to copy anything from front-end, you have to understand a few things first: front-end The front-end is a relative term, but in practice it is usually used to refer to what will be…
-
4
votes1
answer1930
viewsA: Mount playlist with items from the folder/directory and play the playlist in loop
Basically to create a playlist with the video tag you will need to use javascript, using an array and the event onended on the tag <video>: <video id="player-video"…
-
3
votes3
answers568
viewsA: Scroll bar in a SELECT in html
Can use overflow-x and white-space: nowrap;, note that the elements have to use display: inline-block;, I believe this doesn’t work with float, then remove it from its elements. In case your code…
-
9
votes4
answers25024
viewsA: Difference between If and Elif
In this section if variable is less than 10, first will set the value 1 and then the else of the second if will set 0, this because they are two separate ifs: if variavel < 10: variavel = 1 if…
pythonanswered Guilherme Nascimento 98,651 -
2
votes4
answers1038
viewsA: How to create a regex to filter and delete files with a particular chunk in the name
The regex can be like this Copia - Copia.[^.]+$ Explanation: Copia - Copia\\.[^.]+$ ^ ^ ^ 1 2 3 The Copia - Copia\\. is the party you wish to find [^.] the sign of ^ if you’re inside [...] indicates…
-
5
votes3
answers312
viewsA: Transform a string into multiple substrings whose contents are between apostrophes
Using regex would look something like: '([^']+)' This way he’ll take "unlimited" An example would be this (I don’t have much understanding of C#, any flaw can criticize/correct): using System; using…
-
0
votes2
answers3912
viewsA: Emulator does not load
Probably you enabled the emulator does not support using the hardware camera or there is no camera on the hardware, this if you selected the option Webcam0 for example. Do the following in AVD…
-
1
votes2
answers1542
viewsA: PHP progress bar
The required will not prevent you from triggering the upload function depending on the way you wrote the script, the upload will process even if empty, this is because the upload progress is not…
-
18
votes1
answer4514
viewsQ: How does "position: Sticky" work?
The sticky is a new property value position and I read a little bit and understood that with it it is possible to create HTML elements that behave at a time like position: fixed and in another as…
-
10
votes2
answers1043
viewsA: What is the default value for the "position" attribute?
Default value (by default) is static for any HTML element that does not have the position specified position: static; As explained in https://www.w3.org/TR/css-position-3/#position-Property…
cssanswered Guilherme Nascimento 98,651