Hi guys! im working with google places and i'm currently able to show 20 markers on the map. I have a FloatingActionButton on my map screen and once the user presses/clicks on it it should display the markers based on the next_page_token. Currently ive hard coded one in for testing and it works but im confused on how to implement it so that when the user clicks on the button then it finds new ones each time. My Maps class: package com.example.test.outandabout; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.HashMap; import java.util.List; import org.json.JSONObject; …

Member Avatar
+0 forum 0

Hi all, and thanks in advance for any replies. Google Places - great for helping nearby searchers find your business. But would signing up have a negative impact on searches outside of your business' region? For example (fictional): a user in London searches for "IT support" and finds my IT support business based in London. Great. But if a user in Leeds searches for "IT support", would my company's ranking be worse than if I had not used Google Places at all? Any thoughts would be appreciated. Regards, _Rade

Member Avatar
Member Avatar
+0 forum 1

Hi, I was assigned by my teacher to create a simple calculation program about movie tickets that are sold in a local movie theater. So, I created the coding, and it turned out perfect. Here it is: import java.util.Scanner; public class MovieTheater { public static void main(String[] args) { String movieName; double adultPrice, childPrice, totalAdultPrice, totalChildPrice, grossAmount, percentageDonation, amountDonated, netSale; int adultNumber, childNumber, totalTickets; Scanner keyboard = new Scanner(System.in); System.out.println(" Enter the Movie Title: "); movieName = keyboard.nextLine(); System.out.println(" Adult ticket price per person: "); adultPrice = keyboard.nextDouble(); System.out.println(" Child ticket price per person: "); childPrice = keyboard.nextDouble(); System.out.println(" Number …

Member Avatar
Member Avatar
+0 forum 2

Hi there, I'm having trouble with floats in Java. My program accepts a number in the form of a float. The number typically has two decimals (but not always). It seems to work fine in most cases. For example, I could put in 54.67, and that number would be passed to another function. Great. However, my problem is this: If I put in 54.60 as the number, it gets set as a float, which automatically rounds it to 54.6, and passes **that** to the other function. The other function doesn't work properly when this 0 is dropped. So my question …

Member Avatar
Member Avatar
+0 forum 4

Greetings. Ok so my problem is that I get a "Currency" formatted value from the database and this value sometimes comes as a whole number (without decimals) and sometimes it doesn't. But, when I output the information as "string" into an XML File, I [B][I]always need to show the 2 decimal places even if they are zero. [/I][/B] I tried with the following code: [CODE]price = string.Format("{0:N2", decimalPrice);[/CODE] This works if e.g: the variable decimalPrice has a value of 59.33 However if it has a value of 59 this will not work, and will throw a format exception. Any suggestions? …

Member Avatar
Member Avatar
+0 forum 1

Hi Daniweb! I couldnt find my problem anywhere else on this forum, so I decided to make my own thread... My problem: I'm trying to make a function to decide how many decimals a 'double' has. My code (slightly edited, here's the base of it): [CODE] // int m = 0; int decimal ( double total) { double dec = total - (int) total; if (dec) { m++ dec *=10; decimal (dec); } else return m; }[/CODE] The results: the funtion works, if there're no decimals. Else it returns my max, which is 5. ANY help would be very aprreciated! …

Member Avatar
Member Avatar
+0 forum 4

The End.