69 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for Jon_7

On my page (http://www.50allstars.com/2017/10/test.html) I'm attempting to align some divs, but the middle div shifts downward whenever I view it on mobile. I've tried adjusting widths, maybe it has something to do with the device-width property, but I really have no clue. Any help would be great. I've included screenshots …

Member Avatar for Jon_7
0
1K
Member Avatar for William Hemsworth

I'm working on a program that requires some very low level optimization. My question is, when precision isn't an important factor, how can I automatically use the most efficient floating point type for whatever architecture the program is being run on? As far as I'm aware, floats are more efficient …

0
194
Member Avatar for Matthew N.

Hey, I'm making a website, and have some css to put two divs next to each other. This is my css and HTML code : [CODE].class1 { float:left; border-right:2px solid #000; } .class2 { float:right; } .class3 { clear:both; }[/CODE] HTML : [CODE] <div class="class1"> Div 1 </div> <div class="class2"> …

Member Avatar for nivabeath1
0
4K
Member Avatar for terence193

I am trying to make a function that rounds number.. I declared the function above the main and voided it Then I recalled the function in the program and listed the variables needed in brackets and then I wrote the function I can't work out what is wrong. [ICODE]#include<stdio.h> #include<math.h> …

Member Avatar for panpwintphyu.loo
0
237
Member Avatar for McLaren

hello, [CODE] <div> <div class="floatLeft"></div> <div class="center"></div> <div class="floatRight"></div> </div> [/CODE] The question is - how do I make the div with class "center" actually in the center. Those 3 divs doesn't take all the width available. Another divs are floated as class name says.Or should I use different technique?

Member Avatar for clintmannar
0
3K
Member Avatar for hrsht

Hey, I want my ads to float in the right sidebar as "Daniweb." On Daniweb the social sharing buttons and related posts are sticky, I want the same configuration for my website.

Member Avatar for ellysdirectory
0
248
Member Avatar for rabadiyaronak

i have two different programs that compare float and double variales and gives output , i shown that below : 1. #include<stdio.h> main() { int r; float f=22.5; double d=22.5; r=(f==d); printf("r=%d",r); } **Output:- r=1** 2. #include<stdio.h> main() { int r; float f=22.7; double d=22.7; r=(f==d); printf("r=%d",r); } **Output:- r=0** …

Member Avatar for jwenting
0
289
Member Avatar for dinhunzvi

i have a function which is supposed to check if a number is a floating-point number. this is the structure of the function function isValidFloat( $string ){ if( !preg_match( "/^[0-9]+(.[0-9]+)?$/", $string ) ){ return false; } } for numbers such as 1 or 8 it's correctly validating but not for …

Member Avatar for pritaeas
0
217
Member Avatar for kevwood

hi all not been here for a while, a long time since i have been working in the industry but ha life goes on haha. I am stuck trying to get the layout to work exactly how i would like, i have a container div which i would like to …

Member Avatar for kevwood
0
194
Member Avatar for droid2014

Hi - I am having an issue and can't seem to get my head around it. I am trying to calculate GBP from EUR - which should be easy but for some reason my returned value is always a few GBP more than it should be, yet I do the …

Member Avatar for droid2014
0
223
Member Avatar for skyyadav

I am reading these values from a file 12.1 13.4 12.4find gg 16.77 56.55 My program should display the average of 5 float no and ignore find and gg. I did while((inputfile >> f)) { //cout << "ssss"; //continue; //} sum += f; count ++; cout << fixed << f …

Member Avatar for Banfa
0
958
Member Avatar for skyyadav

I am reading these values from a file 12.1 13.4 12.4find gg 16.77 56.55 My program should display the average of 5 float no and ignore find and gg. I did while((inputfile >> f)) { istringstream iss(f); if(!(iss(f)) { iss.clear(); continue; } sum += f; count ++; cout << fixed …

Member Avatar for tinstaafl
0
313
Member Avatar for kamalashraf

i am getting result of average in int instead of float, tell me where i have made mistake. this is the code. #include<iostream> using namespace std; void getData (int a[], int s); int numbersSum (int a[], int s); float average (int sum, int size); int main() { int size=0; int …

Member Avatar for Ancient Dragon
0
320
Member Avatar for RHNation

def main(): print ('Welcome to the mpg calculator program') print() #get the miles driven using the input function miles_driven = input ("Please enter miles driven: ") miles_driven = float (miles_driven) #get the gallons used using the input function gallons_used = input ("Please enter gallons used: ") galons_used = float (gallons_used) …

Member Avatar for farmwife
0
297
Member Avatar for BlackJax96

Hi, I want to convert a float value to 32bit hex and the code I have right now returns 64bit hex. The float is stored in a string called value. [CODE] result = Convert.ToDouble(value); long lVal = BitConverter.DoubleToInt64Bits(result); string hex = lVal.ToString("X"); OutputBox.Text += ("\nConverted the " + value.GetType().Name + …

Member Avatar for Ketsuekiame
0
3K
Member Avatar for Squidge

Hi all, I seem to have an issue with my CSS. The page setup that has the issue is: <footer> <section 1></section 1> <section 2></section 2> <section 3></section 3> </footer> The sections are set to 33% width and floating left. The containing footer does not seem to expand in height: …

Member Avatar for Squidge
0
178
Member Avatar for Monkey101

For my webpage I want to set up columns (boxes). For example I have an image floating to the left then I want to float another image or a plain box underneath the image. This is my HTML code <div style="float: left; background-color: white;"> <img src="Images/Books.jpg" alt="Books" width="225" height="125"/> </div> …

Member Avatar for Monkey101
0
219
Member Avatar for sparsh610_1

hello everyone ,, have a look on the program really difficult for me to understand the concept please help

Member Avatar for sepp2k
0
226
Member Avatar for ctkam

how to make the image shows side by side but center of the div thankx in advance the css used .img-wrap { width:200px; margin: auto; } .img-wrap img{ display:inline-block; float:left; } the html <div class="img-wrap"> <img src="img/first.png" /><img src="img/second.png" /> </div>

Member Avatar for ctkam
0
220
Member Avatar for SamD34

Hi, I want to declare a float[] in .h and initialize in .m as explained below: .h file ` @interface A: NSObject { float data[10]; } @end ` .m file @implementation A -(void) loadData{ data={1,2,3,4,5,6,7,8,9,10};//Does not work } @end I could have intialized in the following manner, but Could it …

Member Avatar for great_learner
0
317
Member Avatar for JySysAdmin

Hello this is my first post here, Google has led me to this site a few times and I made an account today to ask a question about CSS Floats. I have Django code to generate a DIV for each srvr object in my database. Here is my HTML: {% …

Member Avatar for JySysAdmin
0
602
Member Avatar for xikhari.some1behindu

I am currently working in a Statistics Calculator which should display mean, standard deviation, median and mode. I have the graphical interface ![Sin_título](/attachments/large/4/Sin_título.png "Sin_título") This one has a text box where you get to write the list and by clicking the button it stores the fist value and goes to …

Member Avatar for xikhari.some1behindu
0
235
Member Avatar for spowel4

I understand that when casting a string to a float, php will evaluate from left to right and stop at the first invalid character. So for example, the string "1-23" will cast to a 1. I need to evaluate the entire string though, so that the string "1-23" would not …

Member Avatar for spowel4
0
219
Member Avatar for mmcdonald

Hi all, I have a menu on the left side of my design. When the user scrolls and the object hits the top of the screen I want it to float there. I have the float working fine now, but how can I say "Only float when you meet the …

Member Avatar for mmcdonald
0
219
Member Avatar for OrangeTree

Hi everyone :). **Strange situation** with this code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <div align="center"> <div style="width: 500px; background-color: blue"> <div style="width: 200px; float: left"> <p>Some text.</p> </div> <div style="width: 210px; float: right"> <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/13/DuskyDolphin.jpg/220px-DuskyDolphin.jpg" alt="Dolphin"> </div> </div> </div> </body> </html> Display in **IE** (9) is …

Member Avatar for OrangeTree
0
186
Member Avatar for NubTruck

I have been reading some tutorials about floats from various sources on the web. They say that if you want to float one div element next to another you are to put a float attribute into one of the div elements. for example one website says this... > Quote From …

Member Avatar for AleMonteiro
0
238
Member Avatar for titusnainggolan

I have the code below #include <stdio.h> int main(){ float n; scanf("%f",&n); printf("%f",n); return 0; } Then, I run the code input: 45321.56 is not same with output:45321.558594 I want to get output which same as the input. How to solve this problem? Thank you

Member Avatar for WaltP
0
358
Member Avatar for TarkiB

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 …

Member Avatar for JamesCherrill
0
405
Member Avatar for Reliable

I made a website that has a floated div which contains the contact form. The entire website can be seen on all platofrms and on all browsers except for teh contact form. After some research I believe the floatd div is rpeventing the contact form from being viewed on tablets …

Member Avatar for dany12
0
146
Member Avatar for Bowsan22

So ive been trying to get an average of this array needed, and I seem to be having trouble with it. So far, my current code just adds the numbers up, but doesnt really average them out at all: [CODE]import java.util.Scanner; import java.util.Arrays; public class Grades { public static void …

Member Avatar for Xinen
0
325

The End.