Questions tagged [floating]

This tag is related to GUI elements that either should be or appear to be floating above a panel or background, or in case of certain types of general layout.

This tag is related to GUI elements that either should be or appear to be floating above a panel or background, or in case of certain types of general layout.

800 questions
2
votes
3 answers

How to convert float into Hours Minutes Seconds?

I've values in float and I am trying to convert them into Hours:Min:Seconds but I've failed. I've followed the following post: Converting a float to hh:mm format For example I've got a value in float format: time=0.6 result =…
user3162878
  • 598
  • 3
  • 10
  • 25
2
votes
2 answers

Floating texts in Unity

My 2D platformer game level has treasure chests placed all over the map and when a chest is collected I need to display a message. The messages are contained in a List and they are displayed one by one as the treasures are collected. These…
Vipin Verma
  • 5,330
  • 11
  • 50
  • 92
2
votes
1 answer

Unable to drop rows in pandas DataFrame which contain zeros

Editing a large dataframe in python. How do you drop entire rows in the dataframe if a specific column's row has the value 0.0? When I drop the 0.0s in the overall satisfaction column the edits are not displayed in my scatterplot matrix of the…
Fluora07
  • 23
  • 2
2
votes
4 answers

getting exponent of a floating number in c

Sorry if this is already been asked, and I've seen other way of extracting the exponent of a floating point number, however this is what is given to me: unsigned f2i(float f) { union { unsigned i; float f; } x; x.i = 0; x.f = f; …
Nam Vu
  • 1,727
  • 1
  • 11
  • 24
2
votes
1 answer

How to remove and set border color of a widget (FloatigSearchView)? Specifically the bottom border color

I imported floatingsearchview into my app and I can't change the bottom border color and remove other borders. At this point it looks like this I'm trying to get it to work like on the example below Link to the lib: https…
JustNice
  • 23
  • 3
2
votes
1 answer

Putting floating point ranges into bins

Given 5 ranges [(0., 0.), (0., 0.3), (0.3, 0.5), (0.5, 0.8), (0.8, 1.0)] that corresponds to: [0.0, 0.0] (0.0, 0.3] (0.3, 0.5] (0.5, 0.8] (0.8, 1.0] And a list of input floats: [0.5293113408538, 0.3105914215541, 0.7748290363338001, …
alvas
  • 115,346
  • 109
  • 446
  • 738
2
votes
1 answer

Optimal way to negate a floating point value in C#

What is faster from a code execution perspective: double a = 1.234; double minus_a = -a; or: double a = 1.234; double minus_a = a * -1; Does the second case actually perform floating point multiplication? Or is the compiler smart enough to…
Arvind
  • 93
  • 8
2
votes
1 answer

Dim background of an activity

I am trying to show an activity as a floating window with a dimmed background and I'm using the following code to do that, which is taken from the Google I/O 2016 project: protected void setupFloatingWindow(int width, int height, int alpha,…
Sandra
  • 4,239
  • 10
  • 47
  • 80
2
votes
4 answers

How Floating Point precision setting works

I have seen many answers on how to set precision for floating point numbers and everywhere we are doing something like below : double RoundDouble(double doValue,int nPrecision) { return…
PapaDiHatti
  • 1,841
  • 19
  • 26
2
votes
3 answers

Floating div after certain % of website scrolling

I really don't know where to start to search. And to be honest I did not even know how to search for, because I don't know how it calls. (maybe headsup? but all I get is car tuning stuff) What am I looking for its in the attached image. When a user…
Fly Guy
  • 35
  • 6
2
votes
1 answer

Floating Action Button (FAB) not being sticky when html page has scrollbar

I have created FAB button on page that has scroll bar. My expectation is FAB button will be sticky on right down corner when page is getting scrolled. However, the button also scroll with page. This gives indication that z-index of FAB is at same…
2
votes
0 answers

How to open the FloatingView (library) and show a custom layout in it?

I'm using FloatingView library in my app. I have successfully started it, now what I want is I want a custom layout to be shown inside it when it get clicked like what happens in facebook messenger chat heads. Here's ChatHeadService.java file's…
Hammad Nasir
  • 2,889
  • 7
  • 52
  • 133
2
votes
1 answer

Decimal to half-precision floating point

I'm currently trying to convert 44/7 to half-precision floating point format. I'm not sure if I've done it correctly so far, so I'd really appreciate it if someone could have a look at it. 44/7 = 6,285714285714... 6 in dual -> 110; 0.285714 * 2 =…
user6247041
  • 23
  • 1
  • 4
2
votes
1 answer

Ideas for a new way of storing very large numbers (for 3D coordinates)

When creating a large game world, the standard seems to be to go with a floating point number, specifically a double precision float, for world coordinates. You could use a 64 bit integer, which gives you plus or minus 9 quintillion range, (9 x…
Zebrafish
  • 11,682
  • 3
  • 43
  • 119
2
votes
1 answer

rewriting a floating point sum from Python to Rust

I've been trying to rewrite the code below for summing floating point numbers while minimizing the rounding errors, but I found it pretty hard to do in Rust. Any suggestions would be greatly appreciated. I attach my non-working Rust attempt def…
Sidious Lord
  • 385
  • 1
  • 2
  • 7