Posts by Rafael Telles • 599 points
23 posts
-
3
votes1
answer1072
viewsA: Calculation of a high value to an exponent b
You should check if the exponent is negative, and if it is, reverse the base and change the exponent’s signal: if(expoente < 0) { expoente *= -1; base = 1 / base; } while(expoente != 0) { ...…
javaanswered Rafael Telles 599 -
2
votes1
answer336
viewsA: Blocking the Webview cache
Try disabling the cache like this: mWebView.getSettings().setAppCacheEnabled(false);
-
2
votes1
answer716
viewsA: Include angular.js using Maven in Java Spring project
Following the documentation (http://www.webjars.org/documentation#springmvc), you should put this tag in the spring configuration file: <mvc:resources mapping="/webjars/**"…
-
1
votes2
answers152
viewsA: Unity 5 error apparently code
The "Unitysampleassets" package was made available at the Unite event in 2014, in a talk on best practices for 2D games in Unity, you can download it here. In this file you will find this script…
-
1
votes2
answers1501
viewsA: How to get JSON from an external url
The problem is that the request does not return the call of a method and you want to interpret the answer as JSONP, you should simply change dataType: 'jsonp' To: dataType: 'json' EDIT You can still…
-
0
votes2
answers2095
viewsA: Open numeric keypad automatically
Add the tag below in the file config.xml <preference name="KeyboardDisplayRequiresUserAction" value="false" /> And then, in the controller, call the method focus() input right after everything…
-
2
votes1
answer161
viewsA: Calculate tangent line by mouse/mouse coordinate
To calculate the tangent line, we need to calculate the derivative, which will give us the angular coefficient of the line: Then we draw a line that passes through the mouse point and with the…
java-processinganswered Rafael Telles 599 -
5
votes4
answers2514
viewsA: Is there a difference between the is_file and file_exists function?
The is_file returns true only if the path is from a file (not/symlink directory). The file_exists does not make this distinction and returns true if "something" exists in the way. EDIT (only to…
phpanswered Rafael Telles 599 -
6
votes3
answers437
viewsA: Database should follow the OO standard?
Some "rules" of data normalization are defined, but these do not come from the OO paradigm, the database must be in accordance with these standards to ensure space saving, maintenance, etc. See more…
-
3
votes2
answers13570
viewsA: How to make a scroll to the end of a div?
You can do it like this: $('#div').animate({scrollTop: $('#div')[0].scrollHeight}, 500); Pen: http://codepen.io/raftelti/pen/EVxQXL…
-
0
votes1
answer54
viewsA: Bootloader - programming
The word equ serves to define constants, already << is an operator that "moves" the bits a number to the left, this type of operator is usually used to define flags. See more in:…
canswered Rafael Telles 599 -
2
votes2
answers188
viewsA: Invert order of names in inputs?
Good evening, your program is not working because you are trying to change the value of an input using the property innerHTML, the right property for this is the value. for (var i = 0; i < 5;…
-
4
votes2
answers3004
viewsA: What’s the difference between using Fileinputstream and Fileoutputstream or Scanner and Printstream?
Yes, Fileinputstream and Fileoutputstream: as the names suggest, are to handle files, the first has methods to read a file and the second has methods to write. Scanner and Printstream: are more…
-
1
votes1
answer1144
viewsA: Resize Canvas Chart
What you can do is use the canvas transformation methods to stretch the graph, but then you lose the graph mouse events (they get "crooked") var canvas = document.getElementById('canvas'); var ctx =…
-
1
votes1
answer161
viewsA: Eclipse github plugin
This repository has been moved to http://archive.eclipse.org/egit/github/updates-2.3/ Arrange the repository URL in Preferences Install/Update Available Software Sites.…
-
1
votes1
answer1828
viewsA: How to limit the minimum screen size?
If you want to limit the size of the browser window, you can’t. You could only do that if you opened the window with window.open(), doing something like that: window.addEventListener('resize',…
-
2
votes4
answers886
viewsA: Select data from two tables
You need to use a INNER JOIN, that selects columns of two tables according to a condition that relates data from the two tables: http://www.w3schools.com/sql/sql_join_inner.asp…
phpanswered Rafael Telles 599 -
0
votes2
answers132
viewsA: How to get the reference of a dynamically created Edittext when you click it?
A View reference that has been clicked is passed by reference to the method that processes the event: public void click(View view) Now, this other problem is the fault of the layout, you must be…
androidanswered Rafael Telles 599 -
1
votes1
answer167
viewsA: How to use a UI kit (PSD) in an Android application?
You should export all images in a format that Android accepts (PNG, JPEG, etc.) Then, just adjust the measurements and other properties of the standard interface components.
-
0
votes1
answer37
viewsA: mount a json file on client-side or server-side?
Depends, If the file is downloaded by the user: no problem at all, just be careful: if it is imported, you should do a security check. If JSON is sent to a server, do the server-side check, it can…
-
0
votes3
answers446
viewsA: How to let a div 'Fixed' be limited by a main div?
You can try using jQuery: $(window).bind('scroll', function() { if ($(window).scrollTop() > POSIÇÃO_Y) { $('.sua_div').addClass('fixed'); } else { $('.sua_div').removeClass('fixed'); } }); So…
-
2
votes2
answers1208
viewsA: How to save variables to be used in the next . Java?
Create a class that contains these properties and return an instance(in an array, for example) of that class. Kind of: public class FormaDePagamento { public String desc; public String valor; }…
-
0
votes4
answers12028
viewsA: How to get height of a div by jQuery?
Try it with this: var alturaDivTxt2 = $(".slide-txt")[0].getBoundingClientRect().height; Update: Use the window.getComputedStyle method, this method returns all computed CSS: var div =…