Posts by Lucas Torres • 775 points
80 posts
-
1
votes1
answer93
viewsA: .htaccess does not accept file for 403 error
ErrorDocument 403 /403.php The /403.php may not be the absolute path to the root of your folder public_html,htdocs or www for example, but rather the root of your file system. This can be based on…
-
0
votes1
answer24
viewsA: Sending Post to PHP
This may be due to post_max_size. There are two different locations you can set this up: php.ini post_max_size=20M upload_max_filesize=20M .htaccess / httpd.conf / virtualhost include php_value…
-
0
votes2
answers118
viewsA: Create data loop received by post and insert into mysql
$_POST is an array that contains a series of key/value pairs with the field name and its value, passed by POST in the request HTTP. So just walk the same with the foreach (as done in a normal…
-
0
votes1
answer372
viewsQ: SHA256 hash generation of compressed.zip files
I would like to generate a hash with SHA256 of a set of files. For this I compressed all in format .zip and I am using the following code(Python): from hashlib import sha256 myFile =…
-
1
votes2
answers41
viewsA: Doubt about functions in php
Your question is not very clear, but if the question is "functions are invoked automatically" the answer is no. You should call the function in each part of your code that you want to use it. Taking…
-
0
votes1
answer81
viewsQ: Picking up data in pairs in sequential lines
I’m reading a spreadsheet csv with pandas across pd.read_csv(). The spreadsheet contains vehicle location data every moment. For example: Place 1: Latitude a, Longitude a Place 2: Latitude b,…
-
0
votes1
answer1158
viewsA: Fill JS Form - Web Scraping in Python - Selenium and Phantomps
Check the name of the element you want to access. The element Dt_Ref does not exist according to error: data = driver.find_element_by_name('Dt_Ref') "errorMessage":"Unable to find element with name…
-
1
votes1
answer238
viewsQ: Return all data to a mysql_fetch_assoc
I have a query that returns the data below: nome -------- vencimento Joao -------- 09/08/2012 Maria ------- 04/12/2015 That is to say, two records. However, by putting it in PHP code only the top…
-
0
votes2
answers161
viewsA: Cordova-plugin-globalization Unable to download plugin
Apparently it is a proxy error, do a test. Try to route the internet from your mobile and perform the download. Also do it from the command line: cordova plugin add cordova-plugin-globalization…
-
0
votes1
answer49
viewsA: HTML5 - Block direct audio access
In your file .htaccess add: RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(.+.)?seusite.com/audios [NC]RewriteRule .*.(wav|mp3)$ http://www.seusite.com/erro.php [L]…
-
0
votes2
answers134
viewsA: Notification button update
Just add a call first, and then count the time: mostrarNotificacao() setInterval(mostrarNotificacao, 90000); function mostrarNotificacao(){ //function mostrarModal(idPedidos){…
-
0
votes1
answer125
viewsQ: Javascript forwarding does not work with external script
Javascript forwarding does not work with external script. I have a page with the following code: <input type="text" name="login" id="login"> <input type="password" name="senha"…
javascriptasked Lucas Torres 775 -
1
votes1
answer172
viewsQ: Txt Manipulation - Separating blocks based on a pattern
I have a txt with some information. txt follows the following pattern: 1 - Beginning of the block 2 - Information 3 - Description of line 2 So for example 190845 3890580235203895 0329045832854880328…
-
1
votes3
answers37
viewsA: Doubt about why it does not give nullpointexception
The null is not running because your block if always returns true. Also, in java, each instruction has only one return. If you still want to return two values, you can try concatenating them…
javaanswered Lucas Torres 775 -
0
votes1
answer48
viewsA: Problems with PHP function - PDO
Apparently, you are passing an empty or wrong variable in the command prepare Use the find command of your IDE and look for prepare and check past variables.
-
1
votes2
answers257
viewsA: Return 0 from HTTP
Then, as we saw in the comment, the returned error changes as a function of the initially fed value. There is no HTTP error with code 0 or 3. The numbers you are viewing are returned by your code or…
-
0
votes1
answer62
viewsA: How do I show a php error in jQuery?
I haven’t worked with jquery for a long time, but I think that’s how it is: $('#cadastrar').on('click', function(){ var opcaoCadastrar = $(this).attr("value"); var nome = $('#nome').val();…
-
1
votes1
answer86
viewsA: How to calculate the speed of a user’s internet connection?
You can do as per the @diegofm comment, but note that this measure will never give a certain value, for the following reasons: The connection can oscillate; The route to your website may vary…
-
0
votes1
answer96
viewsA: I can’t read the value that comes from Iraq to Cordova
Try to rotate the following command: cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git
-
1
votes3
answers1184
viewsA: javascript numeral validation
You don’t need Javascript for this, just go to your form and change the input to a number(HTML5 type): Example: <input type="number" size="6" name="age" min="18" max="99" value="21" required…
-
1
votes1
answer517
viewsQ: Read XML tag blocks based on a search
I have a folder where insert logs are stored in the database. Log files follow this structure: <item xsi:type="tns:StatusResultReport"> <id xsi:type="xsd:int">1569692</id>…
-
1
votes1
answer196
viewsA: Sync data offline with Phonegap
You can work with a conditional. Cordova has the connection plugin as below. function checkConnection() { var networkState = navigator.connection.type; var states = {}; states[Connection.UNKNOWN] =…
-
1
votes1
answer281
viewsA: How to Write and Update HTML File with Jquery?
Well, you can check the answer at can create txt with js? If it’s an app and you’re using jquery, you’re probably using Cordova for development(confirm me) then you can also use the plugin File of…
-
1
votes1
answer112
viewsQ: Ignore file with Python
I’m developing a client that le files .JSON and sends them to an API. Files are deposited periodically in a folder. However, what I want is that when an error occurs with the file (file being used,…
-
0
votes1
answer98
viewsA: Run firebase on a single domain
About the domain, you can configure this type of access in the firebase console. There, add the domains you can access. By default it comes marked with the localhost About hiding, I don’t think it’s…
-
1
votes1
answer1181
viewsA: Save user information to Firebase Realtime Database
Firebase’s recommendation is like the recommendation of any other language: It is recommended, but not mandatory. What happens is that actually using token is a safety recommendation. Because by…
-
2
votes1
answer620
viewsQ: Using glob in Python
I am mounting a client that will play the found files in a folder for a SOAP Webservice This Webservice has two methods that we will call MET1 and MET2. When found files end with . XML and start…
-
-1
votes2
answers142
viewsA: How can I separate this javascript string into two php variables?
First remove the location of the function and leave so: return position.coords.latitude+","+ position.coords.longitude; Afterward: $teste = "<script>getLocation()</script>"; echo $teste;…
-
0
votes3
answers3141
viewsA: How to monitor a file in real time on Windows?
Use the command below to always monitor the last line of the file (in powershell) >powershell >Get-Content SEU_ARQUIVO –Wait
-
0
votes4
answers2194
viewsA: How to block the click on an input
Well, the codes above work, but since the problem is to open the datepicker, you can also disable yourself datepicker. Appendage var tag = document.getElementByTagName('span'); tag.data-role = null;…
-
0
votes1
answer103
viewsA: create two markers with drag drop in google maps api
Creating a map and adding 2 "draggable markers": var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var mapOptions = { zoom: 4, center: myLatlng } var map = new…
-
0
votes3
answers362
viewsA: how best to create a cookie for the user voting system to vote once
<?php // Cria o cookie usuario só que irá durar 1 dia setcookie('usuario', '[email protected]', (time() + (1 * 24 * 3600))); ?> Okay, if the cookie exists, he can’t vote, if it doesn’t…
phpanswered Lucas Torres 775 -
5
votes5
answers7965
viewsA: Some way to get the price of the dollar
You can use the Central Bank website: http://blog.tiagocrizanto.com/configuracoes-do-webservice-do-banco-central-cotacoes-diversas/ I believe I’m more reliable and because it’s a state service, you…
-
0
votes1
answer1255
viewsA: Force link opening in mobile browser and not on facebook?
By doing this you are in a way circumventing the permissions of the user because the configuration of the browser depends exclusively on it. This setting is internal within the Facebook app. What…
-
0
votes2
answers211
viewsA: Dynamic search for selection
Function keys (F1, F2, F3, F4...) are usually already used for certain functions of the browser, so it is not possible to monitor them. If you want to capture any other key you can simply use the…
-
0
votes2
answers1635
viewsQ: Search all columns of a table
I’m using the function below to do a "live" search on a table. The problem is that I want it to bring data to all columns, and it’s currently only bringing the first. function pesquisaTabela() { //…
-
1
votes2
answers74
viewsQ: Skip file when entering an Exception
Good afternoon Below is a method I use to read certain files from a folder. The problem is as follows. If the folder has 50 files (or 60, or 70, or 80 ...) and the method is reading a "faulty" file…
-
-1
votes1
answer42
viewsQ: Print JSON.Parse
Good morning, I have a variable that stores data from a localStorage, which in turn contains the data below: Array[3] 0:"{"Token":-6742.075757575755,"Solicitacao":"3359659","Justificativa":"jjjj"}"…
-
2
votes1
answer132
viewsQ: Trayicon with hidden console
I have a program in java, no graphical interface, just console. The only output commands are System.out.println(). I implemented it so the program would have a trayicon. The problem is that I only…
-
-3
votes3
answers761
viewsA: Abort AJAX request
Try adding a simple break (http://php.net/manual/en/control-structures.break.php), or exit(http://php.net/manual/en/function.exit.php) in the code php…
-
0
votes1
answer1090
viewsA: Return of webservice in XML - php
Try it this way try{ $client = new SoapClient($wsdl, array('trace' => $trace, 'exceptions' => $exceptions)); $response = $client->ReadRecordAuth(array('DataServerName' =>…
-
0
votes2
answers72
viewsA: Error opening network link
Solved by removing a bar at the beginning, which caused the system not to find the file. $dir = "\\SR9\Infraestrutura\Controles\Termos\A\\" ;
-
0
votes1
answer515
viewsA: Capture return of a Webservice
Printed with: $result = $data->InsereSMPResult->MensagensErro->RetornoMensagem['Codigo']
-
0
votes1
answer68
viewsA: Printing and vector allocation in php cli
There was a mistake in my Return that caused the php, although filling, did not return the updated vector. The question code is fully functional.
-
1
votes1
answer163
viewsA: My site does not load all scripts, it is heavy? how to solve?
For safety, in your case, a response https is being served, so you need the request to be made as well https, and is not being(http://stats.hosting24.com/count.php)…
-
0
votes0
answers198
viewsQ: Java error running via jar
I have a code that makes a request to a WS. When I run via Netbeans, the code works perfectly, but when I do it via java -jar programa.jar the system shows the following error:…
-
1
votes1
answer1181
viewsQ: How to close a file in Java?
I’m trying to delete a file using File, but I have the following mistake: The file is already being used by another process. I also have this error when trying to rename using Files. How can I…
-
1
votes1
answer830
viewsQ: Read XML with Java
I’m using the following code to send a .xml via SOAP package consumirwebserviceporrequisicaoxml; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; import…
-
1
votes1
answer71
viewsQ: getelementsbytagname returning zero
I am using the following code to read a file .xml try { File fXmlFile = new File("C:\\res\\teste.xml"); // C:/.../teste.xml DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();…
-
1
votes1
answer67
viewsQ: Error: Cannot find Symbol getRootElement
I’m trying to read a file .xml using the code below public static String lerArquivoXML(String string){ SAXBuilder builder = new SAXBuilder(); File xmlFile = new File("c:\\teste.xml"); try { Document…