Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
1
votes2
answers9379
viewsA: Save cookie and read its value when accessing the website to check if expired
You must use document.cookie to create cookies as needed and the script must run on a server (like Apache for example), local access (protocol file://) usually does not work with cookies. note that…
-
14
votes2
answers1991
viewsA: Apache/PHP server does not respond while making a SOAP request
You’re probably using it session_start, the PHP locks the file (LOCK) session, even if you change page the session is still the same and the session file too. Note: Other visitors to the page are…
-
2
votes3
answers397
viewsA: Can reference arguments be harmful?
This answer is only complementary; In short The rumours on the use of references &$variavel referred to only when you call the functions and not when you declare them, i.e.: This is permitted…
phpanswered Guilherme Nascimento 98,651 -
7
votes3
answers397
viewsQ: Can reference arguments be harmful?
By default, arguments of a function are passed by the value (i.e., if the value of the parameter within the function is changed, it is not changed outside the function). To allow a function to…
phpasked Guilherme Nascimento 98,651 -
2
votes3
answers1196
viewsA: getJSON does not work
In accordance with the documentation the jQuery.ajax (and their "cousins") use Deferred (as in your code), in case you can’t see the error, because you’re catching the jqXHR instead of textStatus or…
jqueryanswered Guilherme Nascimento 98,651 -
3
votes1
answer135
viewsA: navigateToURL is not sending POST
When rotating the script for Adobe Flash Professional IDE instead of the browser the program will convert POST for GET when to use navigateToURL(...);, for this reason you will never get the VALOR…
-
1
votes1
answer358
viewsA: Table with different size on various monitors
In my view the use of tables for layouts is a little complex and is not considered appropriate, especially if using these classes from bootstrap which are made for the use of elements such as div…
-
1
votes3
answers173
viewsA: Are there any techniques to apply maintenance in the code?
There is no standard technique unfortunately, but there are several techniques, I do not know if this is the best, but it is something that we can apply (based on Soen) would create a variable and…
-
2
votes2
answers117
viewsA: Use multiple names with distinct functions in a variable
Not, the comma (,) do not join the variables, this is just a way to define them without writing so much, use var x, y; and var x; var y; are the same thing. For example: var x = 1, y =2;…
-
5
votes3
answers3638
viewsA: json_decode returns null
The url http://s.anapro.com.br/a-p/dados/b3gkhu%252f3ohE%253d/estoque.json is returning characters in content compatible with iso-8859-1/windows-1252, to use the json_decode it is necessary to use…
-
2
votes3
answers2029
viewsA: Pass Google Maps API to JPG image
As already quoted, html2canvas is a great library for use, before we start keep in mind: html2canvas does not work real DOM elements it just simulates them with Canvas It is considered alpha or…
-
6
votes1
answer9291
viewsA: Execute cmd commands from Java
As the answer is in Soen you can pick up the output from Process using .getOutputStream() and in it you will add the other commands, the code should look like this: import java.io.*; public class…
-
2
votes2
answers235
viewsA: OuterHTML return of elements
This answer is only complementary, the example from @Tobymosque is very good, but the use of element.outerHTML is not cross-Platform (believe that most engines today support, but there may still be…
javascriptanswered Guilherme Nascimento 98,651 -
4
votes1
answer105
viewsA: What is the reason for the suffix "? algumnumero" in the link of some CSS?
This is used to prevent caching in files that have been updated, in the case for the browser (or client software that supports HTTP) it considers these urls different addresses and therefore for…
cssanswered Guilherme Nascimento 98,651 -
1
votes1
answer609
viewsA: External links are not 'loading' ? (by left clicking)
I found out, using $(".scroll").click(function(event){ event.preventDefault(); All elements with class="scroll" were affected and the child elements too, you applied the class .scroll in various…
-
5
votes3
answers3857
viewsA: Pagseguro does not redirect customer after payment
I believe you’re using the v2, as you did not inform as configured, I will only assume the answer as to documentation For full integration create the token In PHP we should call the class…
-
2
votes2
answers1840
viewsA: Websocket does not connect to server
In a brief reply, you probably forgot the // and you changed the ws for sw, I believe that the right thing should be: var socket = new WebSocket('ws://localhost:8080');…
-
13
votes2
answers791
viewsA: How to do Tilt button?
An alternative would be to use the pseudo elements :before and :after combined with border and position you can add these two "corners" inclined, ie the effect is "simulated", example: .exemplo {…
-
1
votes3
answers6109
viewsA: Undefined Index while recovering data from POST
Just to complement and be a little more direct, the point is that you are using apostrophes ('...') and putting variables inside them like this '$minha_variavel', but variables only perform inside…
phpanswered Guilherme Nascimento 98,651 -
4
votes1
answer7022
viewsA: How to use jsPDF addHTML?
jsPDF addHTML is a "super new" method and probably does not support all CSS and HTML properties, so this should be the reason for some of the problems you face. A simple example according to the…
-
1
votes1
answer962
viewsA: Unity 3D - Cinematographic scenes (cutscenes)
The Rpgmaker system is based on events that usually work by collision or map blocks. unity3d works "free" so the link you provided is just a system rpg semi-ready, you don’t need "something ready"…
-
2
votes0
answers111
viewsQ: How to use Geolocation API with Qtwebkit?
It is possible to use Geolocation API with desktop applications using QWebView? I tried to Qty Webkit and HTML5 Geolocation, but it doesn’t work. I tried to it’s the Qt5 position api support for…
-
1
votes1
answer134
viewsA: How to customize "Notification Web API" in Qt?
To customize the Notifications Web API in the QtWebkit will be necessary to use the "Webkit plugins", ie create a plugin and put in the directory qtdir/plugins/webkit. Note: To create the plugins…
-
1
votes1
answer139
viewsA: Capture Webview image and display in Imagebutton
As this response from Soen, you will need the class Bitmap, Canvas and BitmapDrawable. An example would be something like: ImageButton imageBtn; WebView myWebView; ... btn.setOnClickListener(new…
androidanswered Guilherme Nascimento 98,651 -
0
votes1
answer214
viewsA: How to use qtwebkit-plugins in my project?
In the Qt 5.2+ "packages are no longer used" com.nokia.Qt.* now we must use org.qt-project.Qt.*, so that the qtwebkit-plugins operation it is necessary to modify the qwebkitplatformplugin.h Change…
-
5
votes1
answer214
viewsQ: How to use qtwebkit-plugins in my project?
Qtwebkit-plugins is a library that provides functionalities for QWebView, as SpellCheck/Corretor ortografico and Notification Web API. Read about in: SpellCheck Notification Web API I tried to…
-
3
votes1
answer134
viewsQ: How to customize "Notification Web API" in Qt?
I am creating a simple browser using Qtwebkit and added in it the "support" for Notification Web API using the QWebPage::setFeaturePermission. An example: function notifyMe() { if…
-
0
votes4
answers57975
viewsA: How to clear html form fields?
In your code you said that the variables refer to the fields, but in fact they refer only to the values, the most correct would be to use something like var [SUA VARIAVEL] = $("[SEU SELETOR]");,…
-
4
votes2
answers8009
viewsA: Set JS variable in input value HTML
Your problem is not with jQuery or Javascript, but with commas (, commas), the correct would be ; (point and comma - semicolon), see you did so: document.getElementById("nome").value = data.nome,…
-
5
votes1
answer536
viewsA: Is there a facebook like button for each product?
Yes there is, according to the documentation Facebook like button, exists the attribute data-href where you can set the absolute URL of the page you will like. HTML5 <div class="fb-like"…
facebookanswered Guilherme Nascimento 98,651 -
12
votes4
answers2074
viewsA: How to get the format in hours when it exceeds 24?
Note: In case the author solved using Mysql, then this answer may to chance data coming from another "source" where it does not have a resource similar to SEC_TO_TIME. If the time format is in…
-
4
votes1
answer372
viewsQ: How does Xcache really work?
How really the XCache works with PHP? It is necessary to use the functions of XCache to be able to use your "advantages"? For example: <?php echo xcache_inc('count'); ?> Or from the moment I…
-
7
votes5
answers1721
viewsA: Is it possible to change the type of the variable in Java?
The short answer (as already stated) is nay. To understand the reason note that there are Strongly typed languages, Weakly typed languages and Languages not typed Strongly typed languages are…
-
12
votes3
answers5444
viewsA: How to calculate mathematical expressions in a string?
To capture the value of TextView you must use the method getText() and convert to string using toString() TextView myTextView; ... String data = myTextView.getText().toString(); Parse and evaluate…
javaanswered Guilherme Nascimento 98,651 -
4
votes3
answers2527
viewsA: How to determine the sort of accented characters in Mysql?
Apparently the problem occurs specifically with the latin1_general_ci (according to this link): latin1_general_ci: There is no distinction between upper and lower case letters. Searching for teste,…
-
2
votes2
answers1998
viewsA: Open xls (password protected) file in Delphi and save data in Firebird table
I don’t know much about Object Pascal or Delphi, but I will try to provide a reasonable response. Security with the original file The reason for this is to prevent two applications from accessing…
-
4
votes1
answer2752
viewsQ: Error write failed: No space left on device
By reinstalling the Apache and PHP server on my machine I am getting this error: Warning: Unknown(): write failed: No space left on device (28) in Unknown on line 0 And if I try to run any session…
phpasked Guilherme Nascimento 98,651 -
5
votes1
answer2752
viewsA: Error write failed: No space left on device
This problem usually occurs for reasons such as: The directory configured (in the case /tmp) is not allowed to write. The directory does not allow access from the current user (the server may have…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer417
viewsA: setInterval with auto-clearInterval
The reason the site "hangs" is probably because it is generating numerous calls from setInterval. The setInterval never stops except when called the clearInterval, other than setTimeout that stops…
-
0
votes2
answers226
viewsA: Custom HTML font inside IE10?
The Internet Explorer browser has partial font support .ttf, read more on: http://blogs.msdn.com/b/ie/archive/2010/07/15/the-css-corner-better-web-typography-for-better-design.aspx For Internet…
-
6
votes1
answer6287
viewsA: Unexpected 'use' (T_USE) error when using autoload
As this response from Soen: This is because you probably set the namespace within a method or function, read on PHP: Using Namespaces: The use must be declared in the outermost scope of a file (in…
-
2
votes1
answer118
viewsQ: Detect errors and potential problems (lint or code quality tool)
It is possible to analyze (check) a PHP code to determine the "quality" of the organization and detect potential problems? http://en.wikipedia.org/wiki/Lint_(software)…
phpasked Guilherme Nascimento 98,651 -
2
votes1
answer118
viewsA: Detect errors and potential problems (lint or code quality tool)
PHP already provides this type of tool per command line, one can test the "code quality" per command line: php -l <fileName> An example in Windows would be: D:\wamp\php\php.exe -l…
phpanswered Guilherme Nascimento 98,651 -
22
votes4
answers68381
viewsQ: Script returning Parse error: syntax error, Unexpected end of file
When including this method to a PHP code <?php function meuMetodo($a, $b) { $c = $a + $b; if ($c > 1) { return TRUE; } else { return $c; } ?> This error occurs: Parse error: syntax error,…
phpasked Guilherme Nascimento 98,651 -
31
votes4
answers68381
viewsA: Script returning Parse error: syntax error, Unexpected end of file
This usually occurs when we forget to close one { (key, key, Brace or Curly Bracket). In the case of the code, it’s like this: <?php function meuMetodo($a, $b) { $c = $a + $b; if ($c > 1) {…
phpanswered Guilherme Nascimento 98,651 -
10
votes1
answer11862
viewsQ: Upload does not work $_FILES Undefined index error
While uploading a file I’m getting the following error: Notice: Undefined index: file in Z: web upload.php on line 3 upload.php: <?php $location = 'uploads/'; $arquivo = $_FILES['file']; if…
phpasked Guilherme Nascimento 98,651 -
23
votes1
answer11862
viewsA: Upload does not work $_FILES Undefined index error
To upload files it is necessary to set the enctype for multipart/form-data on the tag <form> Example: <form enctype="multipart/form-data" action="upload.php" method="POST"> In addition…
phpanswered Guilherme Nascimento 98,651 -
7
votes1
answer4280
viewsQ: Error $HTTP_RAW_POST_DATA is deprecated
After upgrading PHP to version 5.6 I started receiving the following message: Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be Removed in a Future version. To avoid…
phpasked Guilherme Nascimento 98,651 -
11
votes1
answer4280
viewsA: Error $HTTP_RAW_POST_DATA is deprecated
The $HTTP_RAW_POST_DATA is out of use from version 5.6 underlined text, what causes the Warning, as described in the documentation: http://php.net/manual/en/reserved.variables.httprawpostdata.php…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer3027
viewsQ: Anonymous function returns: syntax error, Unexpected T_FUNCTION
When trying to use this function: <?php echo preg_replace_callback('~-([a-z])~', function ($match) { return strtoupper($match[1]); }, 'hello-world'); PHP returns this error: Parse error: syntax…