"One voice can change a room, and if one voice can change a room, then it can change a city, and if it can change a city, it can change a state, and if it change a state, it can change a nation, and if it can change a nation, it can change the world. Your voice can change the world." -Barack Obama (source)
I am working on a stream that takes based on a List of Data<Number,Number> elements. and I gotta map those Number values into a List of Points (interface) and collect it to a list
that's how it currently without any styling looks :D imgur.com/a/fhEy7
@Mathur Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
compiler says: The method map(Function<? super capture#2-of ? extends XYChart.Data<Number,Number>,? extends R>) in the type Stream<capture#2-of ? extends XYChart.Data<Number,Number>> is not applicable for the arguments ((<no type> i) -> {})
ok I get that I have different types on each side of the lambda
i was going to make a new controller (some kind of utility controller) but instantiating the controller everytime i want to use its method feels off to me
Understandable... I doubt that there is a huge difference in this particular case though. In either case you have to add either fields in the class or more entries in the Map. Now you can choose which of the ways is the one you like more: Add fields or add entries. However there is one thing you can do with the Map way better: Loop. Put the keys/requests in seperate arrays and loop over them to shorten the code. So I would go for the map one as well I think
ok, thanks guys. I did see the point, but what actually made me very confused was that the guy felt so strongly against it that he downvoted the answer
but then again, I still think that people don't know what a downvote means :D
Hi In Android App Admob Ads are showing but impressions are not showing on admod dashboard. The app has 100+ download and have 10 days before live on play store.
@TarunSachdeva Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
So you would write a (private) method and access that in the scheduleAtFixedRate (sAFR) method @Julo0sS So if your example is sendPackage you do sAFR(() -> sendPackage(), 0, 1, TimeUnit.Seconds); to run that every second
Write a function named maxOccurDigit that returns the digit that occur the most. If there is no such digit, it will return -1. For example maxOccurDigit(327277) would return 7 because 7 occurs three times in the number and all other digits occur less than three times.
@ItachiUchiha the result of linesmoothing moisture total longterm data points: 70 moisture post simple: 45 temperature total longterm data points: 70 temperature post simple: 9 relhumidity total longterm data points: 70 relhumidity post simple: 10